-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Add service ota_update to shelly integration #48448
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
Changes from all commits
63b4db9
68e9361
35b37b1
901d494
f5417b0
8f8cc86
91b37b1
2a3bdc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # shelly service descriptions. | ||
|
|
||
| ota_update: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should add a flag named
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| name: OTA Update | ||
| description: Trigger an over-the-air (OTA) update. | ||
| target: | ||
| device: | ||
| integration: shelly | ||
| entity: | ||
| integration: none | ||
| fields: | ||
| url: | ||
| name: Firmware url | ||
| description: Run firmware update from specified URL | ||
| required: false | ||
| example: http://api.shelly.cloud/firmware/rc/SHPLG-S.zip | ||
| advanced: true | ||
| selector: | ||
| text: | ||
| beta: | ||
| name: Beta | ||
| description: Run firmware update from beta URL (if available) | ||
| required: false | ||
| default: false | ||
| example: true | ||
| selector: | ||
| boolean: | ||
| force: | ||
| name: Force | ||
| description: Force firmware update | ||
| required: false | ||
| default: false | ||
| example: true | ||
| selector: | ||
| boolean: | ||
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.
This should be implemented as an entity service:
https://developers.home-assistant.io/docs/dev_101_services#entity-services
Uh oh!
There was an error while loading. Please reload this page.
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.
Hi @frenck
sorry but I'm not sure if I get it correct 😕
The service I want to implement is not related to a specific entity/sensor or platform, but to a device - therefore I added this service as integration service.
To be honest I was also wondering why I have to extract the device_ids from area_id (and filter them to get only shelly devices) to get afterwards the (config_)entry_id from the devices and in addition have to care about that no duplicated device_ids were processed 🤔
Nevertheless it works as expected - yesterday I have already updated 5 Shelly devices at the same time with one service call 😎
Surely it is more realistic that I'm total wrong and have missed something essential 🙈
I would be very grateful for hints on this, also about extended examples.
Uh oh!
There was an error while loading. Please reload this page.
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.
When implemented as an entity service, it will support a
target, in that case Home Assistant will resolve/handle devices, areas and entity ID references for you, and call the matching entity services (no matter what the user has put in).The example is in the link above. If you search the codebase for
async_register_entity_service, you'll find dozens of examples.