zepiaf / hydroqc

Hydro Quebec API wrapper.
MIT License
9 stars 4 forks source link

Add retain and qos to mqtt publish #15

Closed mdallaire closed 2 years ago

mdallaire commented 2 years ago

After some testing with mqtt.py I had some runs that would not populate all the values (start with no end or vice-versa). Adding a qos of 1 seems to have solved it.

I also enabled retain so that if mqtt.py publishes while the client system (home-assistant, node-red, etc) is not connected to MQTT the information can still be fetched later on when the connection is re-established.