Skip to content
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

Assume entity state after triggering a call #248

Open
LucasHokerberg opened this issue Dec 28, 2023 · 2 comments
Open

Assume entity state after triggering a call #248

LucasHokerberg opened this issue Dec 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@LucasHokerberg
Copy link

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
When for instance triggering the "unlock" call, the state of the entity is still "locked" until the next polling interval (e.g., minutes later).
Instead, it would be nice if the integration would assume that the state is "unlocked".
If the call fails for whatever reason, the state would correct it-self after the next polling interval.

Preferably, we get a configuration option to turn "Assume state" on or off.

Describe alternatives you've considered
None

Additional context
n/a

@LucasHokerberg LucasHokerberg changed the title Assume state after atriggering action Assume entity state after triggering a call Dec 28, 2023
@dvx76
Copy link
Member

dvx76 commented Dec 29, 2023

Seems reasonable. Would use the assumed_state entity attribute (https://developers.home-assistant.io/docs/core/entity?_highlight=assumed_state#generic-properties).

Might be complicated by the API still returning the "old" value on the next poll, while the change is still "in progress". What should happen then?

@dvx76 dvx76 added the enhancement New feature or request label Dec 29, 2023
@LucasHokerberg
Copy link
Author

I would assume that if the call is not done by the next poll, the call failed and it make sense to see that e.g., the door is still locked.

Or is it a possibility that a poll runs in parallel with a not finished call? In that case, maybe polls need to be deferred until any running call is done, or the assumed state should not be changed unless there are no running calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants