Mobile app to notify when sensor is disabled#71561
Conversation
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( |
273944b to
d07f4ab
Compare
|
Just wondering... how does that app know that a sensor is enabled again... without updating it? |
|
It will need to sync the entity registry. We can add a new webhook for this or they use existing entity registry command. I guess we could store an integer ("Current sync state") in the config entry that we send back to indicate if a sync is required. |
Right, but if we go that path, is this PR still needed? |
Unless I'm mistaken, there is currently no option to be 100% certain that a certain entity in the registry matches an entity the app has registered, because the available entity registry (via websocket) doesn't expose a stable ID for the sensor (the |
|
I talked to @zacwest (in person!). We decided to update |
d07f4ab to
a11e906
Compare
|
I've sketched out a full plan based on my conversations with Zac and pushed to this branch. Updated docs for this is home-assistant/developers.home-assistant#1325 |
Breaking change
Proposed change
This will add a new
is_disabledfield set toTrueto the success response for a sensor that is disabled. This allows the app to update the settings and stop reporting the sensor.I initially had made it an error but realized that it would be backwards incompatible.
CC @home-assistant/android @home-assistant/ios-developers
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: