Make state enforcement configurable when coordinator data is stale #2805
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Current Behavior
When the DataUpdateCoordinator returns stale data (logging "Coordinator data for [entity_id] is too old to be returned"), the component attempts to enforce its last known state by sending commands to the device approximately every 90 seconds.
This results in:
set_light_state
commands being sent to AlexaIn my case, the entity is a light that only connects to Alexa. I turn the light manually and a minute later, it pops back on.
Example log pattern:
Desired Behavior
Add a configuration option to control how the component handles stale coordinator data. For example:
When set to "unknown", instead of trying to enforce the last known state, the component would simply mark the entity state as unknown until fresh data is available.
Use Case
This would be particularly useful for:
Current Workaround
Currently using a helper boolean that Alexa updates directly and a separate automation to maintain state, but this shouldn't be necessary.
The text was updated successfully, but these errors were encountered: