08-16-2024, 11:46 AM
Hello,
MQTT solution:
There is manual on the webpage, which i copied and replaced UID string:
https://www.kincony.com/kc868-h32b-integ...-mqtt.html
Problem was quotation marks:
In the manual there are quotation marks :
payload_on: ‘{“relay1”:{“on”:1}}’
payload_off: ‘{“relay1”:{“on”:0}}’
Which does not work
But i write them manualy:
payload_on: "{"relay1":{"on":1}}"
payload_off: "{"relay1":{"on":1}}"
Then then it started to work:
root mqtt broker definition moved from .yaml into gui > But now what I am fighting with state, home assistant is unable to read state from the example.
mqtt:
- switch:
unique_id: id_mqtt-relay-1
name: "mqtt-relay-1"
state_topic: "relay32/091be9d88a5a21ae54aaf363/state"
command_topic: "relay32/091be9d88a5a21ae54aaf363/set"
payload_on: ‘{"relay1":{"on":1}}’
payload_off: ‘{"relay1":{"on":0}}’
value_template: ‘{{ value_json.relay1.on }}’
state_on: 1
state_off: 0
Please share how to update value_template for state in HA 2024.8.1
I am fighting several hours now, and only one think what i have is just that relay control, but status is unknow. So i dont know if it is open or cloded.
MQTT solution:
There is manual on the webpage, which i copied and replaced UID string:
https://www.kincony.com/kc868-h32b-integ...-mqtt.html
Problem was quotation marks:
In the manual there are quotation marks :
payload_on: ‘{“relay1”:{“on”:1}}’
payload_off: ‘{“relay1”:{“on”:0}}’
Which does not work
But i write them manualy:
payload_on: "{"relay1":{"on":1}}"
payload_off: "{"relay1":{"on":1}}"
Then then it started to work:
root mqtt broker definition moved from .yaml into gui > But now what I am fighting with state, home assistant is unable to read state from the example.
mqtt:
- switch:
unique_id: id_mqtt-relay-1
name: "mqtt-relay-1"
state_topic: "relay32/091be9d88a5a21ae54aaf363/state"
command_topic: "relay32/091be9d88a5a21ae54aaf363/set"
payload_on: ‘{"relay1":{"on":1}}’
payload_off: ‘{"relay1":{"on":0}}’
value_template: ‘{{ value_json.relay1.on }}’
state_on: 1
state_off: 0
Please share how to update value_template for state in HA 2024.8.1
I am fighting several hours now, and only one think what i have is just that relay control, but status is unknow. So i dont know if it is open or cloded.