Closed WhistleMaster closed 7 years ago
Can you please share your MQTT Binary Sensor config so that I could get a better understanding of what might be going wrong?
Sure ! I've just replaced the IP, users and the passwords.
{
"broker": {
"host": "localhost",
"username": "user",
"password": "pwd"
},
"bridges": [
{
"host": "XXX.XXX.XXX.XXX",
"username": "user",
"interval": 1000,
"prefix": "hue"
}
]
}
I've done some tests. When the sensors are defined as binary_sensor, the state is not updated:
binary_sensor:
- platform: mqtt
device_class: motion
state_topic: hue/my_sensor/presence
name: 'Sensor Motion'
In the log, the message is received but the state not update:
2017-08-30 17:27:08 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on hue/my_sensor/presence: true
However, when using normal sensor, the state is updated:
sensor:
- platform: mqtt
state_topic: hue/my_sensor/presence
name: 'Sensor Motion'
I got it... To use in a binary_sensor, you have to specify:
payload_on: "true"
payload_off: "false"
I had a feeling this was the case. I'm glad you were able to figure it out!
Hue Motion sensors seem to not be fully working using hue-mqtt-bridge when integrated into Home Assistant. The sensors values are pushed on the brokers but the binary_sensors are not updated into HA.