Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

MQTT autodiscovery - add "force_update" #37

Open
aherbjornsen opened this issue Aug 30, 2019 · 2 comments
Open

MQTT autodiscovery - add "force_update" #37

aherbjornsen opened this issue Aug 30, 2019 · 2 comments

Comments

@aherbjornsen
Copy link

The new autodiscovery is working great.
However, I try to monitor for stale sensors and then it would be nice if the announcement included a 'force_update= true'

I solved this by adding
payload['force_update'] = True
to plantgw.py around line 300

But this should probably be configurable from .plantgw.yaml

@bimmerhead23
Copy link

The new autodiscovery is working great.
However, I try to monitor for stale sensors and then it would be nice if the announcement included a 'force_update= true'

I solved this by adding
payload['force_update'] = True
to plantgw.py around line 300

But this should probably be configurable from .plantgw.yaml

I found plantgw.py in /usr/local/lib/python3.7/dist-packages/plantgw/ and added the line above. How do I recompile and get this change into my instance?

@aherbjornsen
Copy link
Author

You do not have to recompile anything, just make the change in the py-file.

Anyway, I found that this did not help because Home Assistant changes the sensor last_updated time when it receive announcements (and not only when it receives actual sensor updates).

I've created an issue here: home-assistant/core#26725
Unfortunately there was not much interest in the problem, so it is now closed.

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

No branches or pull requests

2 participants