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

Feature: MQTT / Homeassistant autodiscovery - sensors should force update #116

Open
sgofferj opened this issue Sep 4, 2024 · 0 comments

Comments

@sgofferj
Copy link

sgofferj commented Sep 4, 2024

At the moment, the autodiscovered sensors are not force-updated. That leads to skewed statistics because Homeassistant doesn't update an MQTT sensor when the value is the same and then by extension doesn't update the recorder database nor forwards values e.g. to Influxdb.

That leads to skewed statistics.
Example:
My weight has been constant at 95kg for a week. Then I go out, drink some alcohol. The next morning, my weight is at 98kg. Because Homeassistant only records changed data unless forced otherwise, in the graph it will look like my weight has risen constantly from 95kg to 98kg the whole week, instead of the spike related to the night out.

Solution:
Add force_update: true to the sensor configuration in the autodiscovery. That will make Homeassistant update the value every time it receives one, no matter if it's identical to the previous one.

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

No branches or pull requests

1 participant