Commit Graph

3 Commits (llm-task-action)

Author SHA1 Message Date
epenet c3ade400fb
Use Platform constant in tests (#145801)
* Use Platform constant in tests

* spelling

* Fix platform
2025-05-28 15:51:37 +02:00
puddly 6a012498a5
Fix entity names for HA hardware firmware update entities (#142029)
* Fix entity names for HA hardware firmware update entities

* Fix unit tests
2025-04-01 18:43:01 -04:00
puddly 537302ce56
ZBT-1 and Yellow firmware update entities for Zigbee/Thread (#138505)
* Initial implementation of hardware update model

* Fixes

* WIP: change the `homeassistant_sky_connect` integration type

* More fixes

* WIP

* Display firmware info in the device page

* Make progress more responsive

* WIP: Yellow

* Abstract the bootloader reset type

* Clean up comments

* Make the Yellow integration non-hardware

* Use the correct radio device for Yellow

* Avoid hardcoding strings

* Use `FIRMWARE_VERSION` within config flows

* Fix up unit tests

* Revert integration type changes

* Rewrite hardware ownership context manager name, for clarity

* Move manifest parsing logic into a new package

Pass the correct type to the firmware API library

* Create and delete entities instead of mutating the entity description

* Move entity replacement into a `async_setup_entry` callback

* Change update entity category from "diagnostic" to "config"

* Have the client library handle firmware fetching

* Switch from dispatcher to `async_on_state_change`

* Remove unnecessary type annotation on base update entity

* Simplify state recomputation

* Remove device registry code, since the devices will not be visible

* Further simplify state computation

* Give the device-less update entity a more descriptive name

* Limit state changes to integer increments when sending firmware update progress

* Re-raise `HomeAssistantError` if there is a problem during flashing

* Remove unnecessary state write during entity creation

* Rename `_maybe_recompute_state` to `_update_attributes`

* Bump the flasher to 0.0.30

* Add some tests

* Ensure the update entity has a sensible name

* Initial ZBT-1 unit tests

* Replace `_update_config_entry_after_install` with a more explicit `_firmware_info_callback` override

* Write the firmware version to the config entry as well

* Test the hardware update platform independently

* Add unit tests to the Yellow and ZBT-1 integrations

* Load firmware info from the config entry when creating the update entity

* Test entity state restoration

* Test the reloading of integrations marked as "owning"

* Test installation failure cases

* Test firmware type change callback failure case

* Address review comments
2025-03-15 00:28:02 +01:00