@Dreamoffice wrote:
hi
actually i try to setup new MQTT light but i have some problems.
This setup as a switch is running:switch: - platform: mqtt name: Licht Garage state_topic: "stat/garage/RESULT" value_template: "{{value_json.S29cmnd_D0.STATE }}" payload_on: "ON" payload_off: 'OFF' state_on: "ON" state_off: "OFF" command_topic: "cmnd/garage/Sensor29" payload_on: "0, ON" payload_off: "0, OFF"
but if i set it up as light the state is noch changing. when i switch on the light the button jumps back to off. how can i fix it?
this code is not running, how can i read the state?light: - platform: mqtt name: Licht Garage state_topic: "stat/garage/RESULT" value_template: "{{value_json.S29cmnd_D0.STATE }}" payload_on: "ON" payload_off: 'OFF' # state_on: "ON" # state_off: "OFF" command_topic: "cmnd/garage/Sensor29" payload_on: "0, ON" payload_off: "0, OFF"
Posts: 5
Participants: 2