michaelarnauts / home-assistant-comfoconnect

Home Assistant integration for Zehnder ComfoAir trough a Zehnder ComfoConnect LAN C.
Other
26 stars 13 forks source link

How to decrease the frequency of the event state changes of the sensors? #19

Closed gertst closed 1 year ago

gertst commented 1 year ago

Hi Michael,

This is rather a question than a bug, but I don't know where to get the answer, so I hope you can help me...

The sensors of the ComfoAir are updated very frequently, and especially for the temperatures, I would like to only update once each 5 minutes or so. The reason is because I'm sending all this data to my Loxone server using a websocket (in Node Red) and I don't want to overload the msg queue ;)

Any hints on how to do this? I can of course write my own debounce, but I'm sure I read somewhere that there is already something build in, in HA?

I also want to thank you for providing this integration! Where can I donate to buy you a beer?

Thanks a lot! Gert

michaelarnauts commented 1 year ago

I'm using a Throttle utility helper from Home Assistant. See here: https://github.com/michaelarnauts/home-assistant-comfoconnect/blob/master/custom_components/comfoconnect/sensor.py#L372. So to throttle without Home Assistant, you should build something yourself.

I only throttle some sensors (like the Fan Duty or Fan Speed), see here: https://github.com/michaelarnauts/home-assistant-comfoconnect/blob/master/custom_components/comfoconnect/sensor.py#L83

You might also be interested in this discussion at the aiocomfoconnect repo to integrate over MQTT.

gertst commented 1 year ago

Thanks for the info and link!