Fix bug with RainMachine update entity (#78411)
* Fix bug with RainMachine update entity * Commentpull/78423/head
parent
416a5cb279
commit
5501b7e710
|
@ -99,4 +99,11 @@ class RainMachineUpdateEntity(RainMachineEntity, UpdateEntity):
|
|||
UpdateStates.UPGRADING,
|
||||
UpdateStates.REBOOT,
|
||||
)
|
||||
self._attr_latest_version = data["packageDetails"]["newVersion"]
|
||||
|
||||
# The RainMachine API docs say that multiple "packages" can be updated, but
|
||||
# don't give details on what types exist (which makes it impossible to have
|
||||
# update entities per update type); so, we use the first one (with the idea that
|
||||
# after it succeeds, the entity will show the next update):
|
||||
package_details = data["packageDetails"][0]
|
||||
self._attr_latest_version = package_details["newVersion"]
|
||||
self._attr_title = package_details["packageName"]
|
||||
|
|
Loading…
Reference in New Issue