mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Fix bug with RainMachine update entity (#78411)
* Fix bug with RainMachine update entity * Comment
This commit is contained in:
parent
416a5cb279
commit
5501b7e710
@ -99,4 +99,11 @@ class RainMachineUpdateEntity(RainMachineEntity, UpdateEntity):
|
|||||||
UpdateStates.UPGRADING,
|
UpdateStates.UPGRADING,
|
||||||
UpdateStates.REBOOT,
|
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…
x
Reference in New Issue
Block a user