Skip to content

SMART attributes should be force updated by default #40

Description

@xxxarmitagexxx

Sensors whose values don't change between polls (e.g. SMART Status: PASSED, Reallocated Sector Count: 0) never triggered a state_changed event in Home Assistant

For those of us who are storing the timeseries in InfluxDB or prometeus, this means that new readings from the agent are not writing to new data points. When using those entities' time series in Grafana, this result in large gaps, for some the last recorded value being whenever HA last restarted where all entities are updated.

This can be fixed by adding _attr_force_update = True to SmartSnifferSensor, SmartSnifferAttentionSensor, and SmartSnifferAttentionReasonsSensor. This tells HA to write the state on every coordinator poll regardless of whether the value changed.

Ideally this should be option exposed when setting up the integration in Home Assistant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions