Hello, I would expect that mqtt is fast communication that saves battery rather than HA api. However, looking at the log (I have 3 sensors), it takes pretty long. First the state is sent:
Received 6:50:38 PM
QoS: 0
Payload: 3.51
Then other info:
Received 6:50:53 PM
QoS: 0
Payload:
Received 6:51:05 PM
QoS: 0
Payload:
Received 6:51:19 PM
QoS: 0
Payload:
From the log I can see that last message is sent 41 seconds after the first one. Is this necessary? If we want to optimize battery I would expect that mqtt should take 1 second as other Arduino sensors that I created.
Is there any way to strip out all unnecessary mqtt communication and send only state? Or may this be caused by mqtt broker? ESPhome sensor log says it actually takes one second…