Show OTA update progress for Shelly gen2 devices (#99534)

* Show OTA update progress

* Use an event listener instead of a dispatcher

* Add tests

* Fix name

* Improve tests coverage

* Fix subscribe/unsubscribe logic

* Use async_on_remove()
This commit is contained in:
Maciej Bieniek 2023-09-06 06:17:45 +00:00 committed by GitHub
parent 4f05e61072
commit d9a1ebafdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 159 additions and 20 deletions

View file

@ -181,3 +181,8 @@ PUSH_UPDATE_ISSUE_ID = "push_update_{unique}"
NOT_CALIBRATED_ISSUE_ID = "not_calibrated_{unique}"
GAS_VALVE_OPEN_STATES = ("opening", "opened")
OTA_BEGIN = "ota_begin"
OTA_ERROR = "ota_error"
OTA_PROGRESS = "ota_progress"
OTA_SUCCESS = "ota_success"