python-openevse-http 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openevsehttp/client.py +10 -0
- openevsehttp/commands.py +4 -0
- openevsehttp/properties.py +11 -1
- {python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/METADATA +1 -1
- {python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/RECORD +8 -8
- {python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/WHEEL +0 -0
- {python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/licenses/LICENSE +0 -0
- {python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/top_level.txt +0 -0
openevsehttp/client.py
CHANGED
|
@@ -337,6 +337,16 @@ class OpenEVSE(CommandsMixin, ManagersMixin, SensorsMixin, PropertiesMixin):
|
|
|
337
337
|
# TODO: update specific endpoints based on _version prefix
|
|
338
338
|
if any(key in keys for key in UPDATE_TRIGGERS):
|
|
339
339
|
await self.update()
|
|
340
|
+
|
|
341
|
+
if "ota" in keys:
|
|
342
|
+
ota_val = data["ota"]
|
|
343
|
+
if ota_val == "started":
|
|
344
|
+
self._status["ota_update"] = 1
|
|
345
|
+
elif ota_val in ("completed", "failed"):
|
|
346
|
+
self._status["ota_update"] = 0
|
|
347
|
+
data.pop("ota_progress", None)
|
|
348
|
+
self._status.pop("ota_progress", None)
|
|
349
|
+
|
|
340
350
|
self._status.update(data)
|
|
341
351
|
|
|
342
352
|
if self.callback is not None:
|
openevsehttp/commands.py
CHANGED
|
@@ -447,6 +447,10 @@ class CommandsMixin:
|
|
|
447
447
|
2. Pass firmware_url to tell the device to download the file directly.
|
|
448
448
|
3. Pass neither to automatically resolve the latest matching binary URL from GitHub.
|
|
449
449
|
"""
|
|
450
|
+
if not self._version_check("4.1.7"):
|
|
451
|
+
_LOGGER.debug("Feature not supported for older firmware.")
|
|
452
|
+
raise UnsupportedFeature
|
|
453
|
+
|
|
450
454
|
if firmware_bytes is not None and firmware_url is not None:
|
|
451
455
|
raise ValueError("Cannot specify both firmware_bytes and firmware_url")
|
|
452
456
|
|
openevsehttp/properties.py
CHANGED
|
@@ -341,7 +341,17 @@ class PropertiesMixin:
|
|
|
341
341
|
@property
|
|
342
342
|
def ota_update(self) -> bool:
|
|
343
343
|
"""Return if an OTA update is active."""
|
|
344
|
-
return self._status.get("ota_update", False)
|
|
344
|
+
return bool(self._status.get("ota_update", False))
|
|
345
|
+
|
|
346
|
+
@property
|
|
347
|
+
def ota_progress(self) -> int | None:
|
|
348
|
+
"""Return the progress of the current OTA update."""
|
|
349
|
+
return self._status.get("ota_progress")
|
|
350
|
+
|
|
351
|
+
@property
|
|
352
|
+
def ota_state(self) -> str | None:
|
|
353
|
+
"""Return the state of the current OTA update."""
|
|
354
|
+
return self._status.get("ota")
|
|
345
355
|
|
|
346
356
|
@property
|
|
347
357
|
def manual_override(self) -> bool:
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
openevsehttp/__init__.py,sha256=I6a1mjOZHYiWb_qfCuDuFLOOncrkkB_7uwybtOIujfY,1165
|
|
2
2
|
openevsehttp/__main__.py,sha256=EHmSdT7GjAVvHQxvLBTjZXsj_V5SB6B2_kpgUAT7mPM,146
|
|
3
|
-
openevsehttp/client.py,sha256=
|
|
4
|
-
openevsehttp/commands.py,sha256=
|
|
3
|
+
openevsehttp/client.py,sha256=XaKet6ZldNVhFbZjoPksaahDNflXmOpeRpa1Jn9pmZ8,17882
|
|
4
|
+
openevsehttp/commands.py,sha256=DKgrzHiOa7wtu47PEMsQeLwYIFpIeYZczCGxPfPPir8,23538
|
|
5
5
|
openevsehttp/const.py,sha256=y-2hGv_PCal_-VCSGC7IIyzQYtfeVdq3MjOhBWIdZvc,1440
|
|
6
6
|
openevsehttp/exceptions.py,sha256=bqz-tHTW1AYJMKcm0s5M6z5tA6XZgjnCiBLW1XrZ_70,672
|
|
7
7
|
openevsehttp/managers.py,sha256=kEX1ZD9u-FY0UEZJsxeFEGBSGzSlkbBc0kmxCiMJtJw,5373
|
|
8
|
-
openevsehttp/properties.py,sha256=
|
|
8
|
+
openevsehttp/properties.py,sha256=9fmJo6xU8im-Dd2QoH8f2E-0veD8uL1QQYiaERvIRr8,17430
|
|
9
9
|
openevsehttp/sensors.py,sha256=sJP2FPnU1Lk5S3VUyFT14JM1nKEBQPsjl-DiZI-pZrs,4673
|
|
10
10
|
openevsehttp/utils.py,sha256=e3HH_jwZgb1iBWJgIoMOM0JPrQNwXyVdOx5vTWOh4T0,858
|
|
11
11
|
openevsehttp/websocket.py,sha256=Mi_WFmlT3-9i6bbHIN6ua09SD8CpIle2vRXB3HyWzmM,10066
|
|
12
|
-
python_openevse_http-0.4.
|
|
13
|
-
python_openevse_http-0.4.
|
|
14
|
-
python_openevse_http-0.4.
|
|
15
|
-
python_openevse_http-0.4.
|
|
16
|
-
python_openevse_http-0.4.
|
|
12
|
+
python_openevse_http-0.4.1.dist-info/licenses/LICENSE,sha256=hSB6TOQ7rmwSGb6XzqRjDGMvmUj5_GlacqQin3tegtA,11341
|
|
13
|
+
python_openevse_http-0.4.1.dist-info/METADATA,sha256=tSggymHMnub1tTeWnNQ__TKJOEHG9jfVut2acfuFJb4,4363
|
|
14
|
+
python_openevse_http-0.4.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
15
|
+
python_openevse_http-0.4.1.dist-info/top_level.txt,sha256=u8RUkoEIE33Cjn6gmqiEoVpZ0VZ59WJ3FXBwwOg0CPE,13
|
|
16
|
+
python_openevse_http-0.4.1.dist-info/RECORD,,
|
|
File without changes
|
{python_openevse_http-0.4.0.dist-info → python_openevse_http-0.4.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|