-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update entity platform #68248
Add update entity platform #68248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool new feature!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the UpdateEntity be used to downgrade versions?
That is up to the implementer of the platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
return STATE_ON | ||
return STATE_OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 👍 It means we think of it as representing version.
e137e99
to
777e5ba
Compare
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: