Skip to content

Conversation

virtualj
Copy link

Sensors data was not updating. They get values only when starting Home Assistant. MQTT messages updates was not correctly managed to update sensors. Added also italian translation

MQTT messages does not contains params keyword but they are already the dictionary data with key and values of sensors. the else statement updates self.params for this kind of messages
updates home assistant sensors with new received values from mttq messages
raw = self._prepare_data_data_topic(raw_data)
self.data.update_data(raw)
if self.data.update_data(raw):
self.coordinator.async_set_updated_data(self.data)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this manual update?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this line the home Assistant sensor does not get updated value. May be the error is somewhere else, but in this way works for me

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

Successfully merging this pull request may close these issues.

2 participants