Skip to content

Commit

Permalink
Display updates only if update is ready for installation on device (#462
Browse files Browse the repository at this point in the history
)
  • Loading branch information
SukramJ authored May 26, 2023
1 parent 9530a49 commit 85c06c8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion custom_components/homematicip_local/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"manufacturerURL": "http://www.homematic.com"
}
],
"version": "1.36.0",
"version": "1.38.0",
"zeroconf": []
}
14 changes: 10 additions & 4 deletions custom_components/homematicip_local/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 85c06c8

Please sign in to comment.