diff --git a/README.md b/README.md index 2806a392..d9b4cc17 100644 --- a/README.md +++ b/README.md @@ -511,12 +511,10 @@ Homematic offers the possibility to update the device firmware. To do this, the To simplify this process, this integration offers update entities per device. -Initially, the firmware file must be uploaded via the CCU. A query of available firmware information from eq3 does not take place. All firmware information used is provided by the local CCU. Version 0.0.0 means no firmware information is available. +Initially, the firmware file must be uploaded via the CCU. A query of available firmware information from eq3 does not take place. All firmware information used is provided by the local CCU. Since the CCU does not send any events for firmware updates, the current status of firmware updates is requested via regular queries. Since device updates are usually very rare and the transmission takes a long time, the query is only made every **6 hours**. -Devices for which the firmware is currently being transferred or for which a transfer is pending are displayed in the update entity as `in process`/`installing`. This information can be delayed up to **6 hours** in HA. - If devices whose firmware is currently being transferred were discovered via the update, their statuses are then queried **every hour**. As soon as the firmware has been successfully transferred to the device, it can be updated on the device by clicking on `install`. This information can be delayed up to **1 hour** in HA. diff --git a/changelog.md b/changelog.md index 489383e3..8a3698fe 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# Version 1.38.0 (2023-05-26) + +- Display updates only if update is ready for installation on device + # Version 1.37.0 (2023-05-15) - Bump hahomematic to 2023.5.2 diff --git a/custom_components/homematicip_local/manifest.json b/custom_components/homematicip_local/manifest.json index de3339fa..6a4f75ea 100644 --- a/custom_components/homematicip_local/manifest.json +++ b/custom_components/homematicip_local/manifest.json @@ -17,6 +17,6 @@ "manufacturerURL": "http://www.homematic.com" } ], - "version": "1.36.0", + "version": "1.38.0", "zeroconf": [] } diff --git a/custom_components/homematicip_local/update.py b/custom_components/homematicip_local/update.py index f2ea60e1..3042f9d6 100644 --- a/custom_components/homematicip_local/update.py +++ b/custom_components/homematicip_local/update.py @@ -125,15 +125,21 @@ def installed_version(self) -> str | None: @property def in_progress(self) -> bool | int | None: """Update installation progress.""" - return self._hm_entity.firmware_update_state not in ( - HmDeviceFirmwareState.UP_TO_DATE, - HmDeviceFirmwareState.READY_FOR_UPDATE, + return self._hm_entity.firmware_update_state in ( + HmDeviceFirmwareState.DO_UPDATE_PENDING, + HmDeviceFirmwareState.PERFORMING_UPDATE, ) @property def latest_version(self) -> str | None: """Latest version available for install.""" - return self._hm_entity.available_firmware + if self._hm_entity.firmware_update_state in ( + HmDeviceFirmwareState.READY_FOR_UPDATE, + HmDeviceFirmwareState.DO_UPDATE_PENDING, + HmDeviceFirmwareState.PERFORMING_UPDATE, + ): + return self._hm_entity.available_firmware + return None @property def name(self) -> str | None: