"Read-only" mode for entities #13
Replies: 12 comments 12 replies
-
To add some other use cases for this feature...
|
Beta Was this translation helpful? Give feedback.
-
Another usecase: This could potentially allow us to have automations create and use entities. The entity would be generated by the automation and only the automation could alter it. |
Beta Was this translation helpful? Give feedback.
-
I would like to add to the above, one of the devices I worked on support (this is not released yet due to manufacture decision) has an option to disable remote control for a Switch (safety feature, so that only local control works).
So having something that will show that an entity is currently read-only would solve this issue in the most user friendly way |
Beta Was this translation helpful? Give feedback.
-
Conditional read-only entity state would be great. Use cases:
So, if an Entity triggers an Automation which is set to a Single mode, that Entity should ideally visually reflect when its Automation is currently in progress (and show that progress if possible), and remain read-only while it is. It'd be good to have something like that for scenes also, or any entities. Specify an "unavailable time period till next repeated activation" - stackable on top of the scene's or Single mode automation's execution time. As @thecode said, it's pretty key to let the user know the reason they can't have it right now (not in a system log but via dashboard UI pop-up or voice), to avoid them jabbing at at tablet screen or wall keypad button. In fact, if the entity triggers an Automation and that Automation has the In addition to making some entities conditionally read-only, I'd like certain other entities to remain controllable, but through the "Are you sure? Because ( So: hidden < read-only < controllable, but with a confirmation pop-up not single-tap, < controllable fully, incl single tap |
Beta Was this translation helpful? Give feedback.
-
was the Area-card already mentioned? |
Beta Was this translation helpful? Give feedback.
-
There is also a use case for buttons:
This is not the same as being unavailable, which means that the entity is not connected to the integration cloud- or back-end. A suggested alternative is to have the button available but give an error message when the user press the button and the device is in the wrong state. IMHO this is not great UX, as it requires the user to press the button to find out if its disabled or not. Edit: Actually, this line of reasoning will hold for any user-input entity types. (Binary) switch, button, number, etc. An entity may be connected to the integration back-end and thus be available, but be functionally disabled due to some state of the device that prevents the use of it. |
Beta Was this translation helpful? Give feedback.
-
One major use case I have for a configurable or settable read only state is for covers. I have a lot of blinds hanging in front of inward opening windows. Operating those while the window is open creates a terrible mess as the blind unfolds on top of the window. I currently have over 12 template covers, a lot of scripting and a lot of "unsafe" hidden covers that would no longer be needed if I can just make the original cover read only when the window is open. |
Beta Was this translation helpful? Give feedback.
-
I think override support using automations would, so automations could still operate the entity when blocked if needed. Say a cover that cant be operated in windy conditions. You still want lt to close. Maybe the confirmation variant would work here, with a way to mark an action as confirmed from the start. |
Beta Was this translation helpful? Give feedback.
-
Encountered another use-case in the integration I'm maintaining: The API vendor (which the integration works towards) requires that the integration does not send a value change request if in a specific mode. This value is represented as a number entity in HA. Normally, changing the value will send an update command to the API, except when in this specific mode. Yet, the entity is not unavailable. Currently the only way to handle this is to leave the number entity enabled, but give an error to the user if the user attempts to set a value when in the mode that doesn't permit update. There is no way the user can see that state without adjusting the number entity. |
Beta Was this translation helpful? Give feedback.
-
More use cases :
A generic suggestion can be to have an optional template on entities that are controlable. HA will check for existance and execute this template before the command execution commands and this template can return true or false indicating if the command should or not be executed. This template should receive the current state, command requested to make the decision, this can allow blinds/cover to be closed but not opened on winds and maybe all other conditions that are suggested here, including checking other entities. |
Beta Was this translation helpful? Give feedback.
-
I think there are 2 different cases which sometimes seem to be discussed as same:
For the example of covers with wind sensors, both could apply. A cover can have a "hardwired" wind sensor or a user could have an external wind sensor (maybe of a different manufacturer or protocol) and wants to couple its state to a cover via HA. IMHO latter could be achieved via some helper (like switch-as-x). |
Beta Was this translation helpful? Give feedback.
-
For Overkiz this would be really relevant as well. Covers and other entities can be locked. This lock can be set by users via remote or based on other sensors/data. E.g. block cover opening with wind, open pergola automatically and block closing with snow. An (optional) override option would be great here. Currently we can't easily add an override option to Overkiz as the frontend doesn't support this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your request
Introduce a standardized "read-only" mode across all Home Assistant (HA) entities, where the current state remains visible to users and automations, but any attempt to set or change the state (e.g., via UI, service calls, or automations) is blocked (or postponed).
The existing "unavailable" state partially addresses this by preventing state changes, but it also hides or invalidates the entity's current state, making it unusable for monitoring or reference.
The frontend could disable action buttons for entities flagged as 'read-only' and optionally display a message explaining the reason.
Use cases
What areas might this affect?
Probably the base entity model, automations and the frontend.
Anything else?
There is an architecture discussion about this same topic, but for covers only: home-assistant/architecture#545
Beta Was this translation helpful? Give feedback.
All reactions