@rak wrote:
Hi,
digging into MQTT and a switch.
switch: - platform: mqtt name: "Venus GX Relay 0" state_topic: "N/xxx/system/0/Relay/0/State" value_template: "{{ value_json.value == 1 }}" command_topic: "W/xxx/system/0/Relay/0/State" payload_on: '{"value": 1}' payload_off: '{"value": 0}'
The MQTT state is a json object. See Payload on/off.
I cant get the state extracted with the value template. Any help appreatiated.
Regards
Ralf
Posts: 9
Participants: 3