Conversation
gwww
left a comment
There was a problem hiding this comment.
Can the UpdateEntity be used to downgrade versions?
That is up to the implementer of the platform. |
| return STATE_ON | ||
| return STATE_OFF |
There was a problem hiding this comment.
Should update in progress also be a state? I guess it depends on what the update entity describes. If it describes the availability of an update, on/off seems fine. If it describes an update, maybe ready/applying/on_latest would fit better? After all, that is also what the entity row would show
There was a problem hiding this comment.
Good question, and initially I wrote it as such as well. I kept it binary and simple. The progress moved to an attribute.
My train of though here was three fold:
- it still isn't updated while updating.
- the current form allows for translations in the frontend.
- the main use case of the entity state would be dermining if there is an update pending (and automate notification on that). Less possible states makes that easier I guess.
There was a problem hiding this comment.
Ok 👍 It means we think of it as representing version.
e137e99 to
777e5ba
Compare
|
Updates:
For the latter, I'll mark this PR as a draft as it needs to be rebased once #68394 is merged. |
777e5ba to
724ff1d
Compare
|
Rebased onto the latest dev, now #68394 is merged. |
Proposed change
This PR adds a new entity platform to Home Assistant:
update.Based on the original work by @ludeeus in #66552, but this time as an entity platform.
A screen recorder from earlier in the development process, to give an idea of what this entity can do (will update with a new one, once I finish the demo integration part)
The next step is to adjust the frontend to handle this entity and show pending updates in the configuration screen.
TODO:
Future steps:
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: