Skip to content

Force update clarification on attributes #2811

@koopee

Description

@koopee

| force_update | `bool` | `False` | Write each update to the state machine, even if the data is the same. Example use: when you are directly reading the value from a connected sensor instead of a cache. Use with caution, will spam the state machine. |

I’m not completely sure what “each update” means here.

For example:

I have an entity that updates its state at regular intervals (say, once per hour).

This entity also has attributes that may update independently of the main state.

So If I enable force_update:

  1. Every scheduled state update generates a new state change event, even when the new state value is the same as the old one. This is clear, but
  2. If an attribute changes between two state updates, does the attribute change also trigger a state change event because of force_update, or is "force update" only tied to the state value itself?

| force_update | `bool` | `False` | Write each update to the state machine, even if the data is the same. Example use: when you are directly reading the value from a connected sensor instead of a cache. Use with caution, will spam the state machine. |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions