MQTT sensor update issue

Hi All,

I’ve been running HA for many years and have recently come across an issue with MQTT/sensor updates.

I have a number of home brew sensors that send temp/humidity every minute, which all works as intended,or so I thought!
The issue is, that I am trying to create an automation to control a dehumidifier via a bathroom sensor and a trend sensor.

I can see from the logs that the sensors are updating every minute as expected…

2020-02-11 11:55:47 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'
2020-02-11 11:56:26 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'
2020-02-11 11:57:05 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'
2020-02-11 11:58:28 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'
2020-02-11 11:59:04 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'
2020-02-11 12:00:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on Climate/Bathroom/sensor1: b'{"temperature":"18.60","humidity":"46","battery":"90"}\r'

However, if there is no change in temp, or humidity, the sensor is not updated.

Bathroom

This has not been an issue before, but when using the binary sensor (Trend) the gradient either doesn’t exist, or is erroneous.

Shower

I can understand if duplicate MQTT values are not stored to save storage space, but is this intended behaviour, or am I missing something in the config?

Thanks in advance,

Mark

force_update

(boolean)

Sends update events even if the value hasn’t changed. Useful if you want to have meaningful value graphs in history.

Default value:

false

Do you have that set to true?

2 Likes

Many thanks :grinning:
All working as expected.

I completely missed the sensor docs and was concentrating on the config :open_mouth:

Bathroom2

1 Like