Helo,
I’m implimenting my home lights into HA, I have a domotica system PHC from PEHA, i’m using MQTT from the mosquitto broker on HA. I can switch the light in HA but the status is always unknown.
Yaml config:
mqtt:
light:
- name: "Kantoor Hanglampen"
unique_id: "omx_2_out7"
state_topic: "phc/p2m/sta/omx.2.out7"
command_topic: "phc/m2p/cmd/ccmd"
state_value_template: >
{% if value == '0' %}
off
{% elif value == '1' %}
on
{% endif %}
payload_on: "omx.2.out7.on"
payload_off: "omx.2.out7.off"
qos: 0
retain: false
Mosquito listening to topic: phc/p2m/sta/omx.2.out7
status 0 is correct for when i switch the light off, and 1 for on
Message 4 received on phc/p2m/sta/omx.2.out7 at 10:32 AM:
0
QoS: 0 - Retain: false
Message 3 received on phc/p2m/sta/omx.2.out7 at 10:32 AM:
1
QoS: 0 - Retain: false
So the status is reaching the HA correctly I assume, but it is not showing in the entity:
Can somebody suggest a way to include the status?