automation: - id: '1593119650807' alias: Button Office Lamp description: '' trigger: - entity_id: binary_sensor.office_button_a from: 'off' platform: state to: 'on' condition: [] action: - device_id: 1cdb60766cbb4ffc8b12ac9713fb1b55 domain: switch entity_id: switch.office_lamp type: toggle binary sensor: platform: mqtt state_topic: "tele/RF_Bridge/RESULT" name: Office Button A value_template: '{{value_json.RfReceived.Data}}' payload_on: '00A0B4' payload_off: '00A0B4off' device_class: power #optimistic: false qos: 1 #retain: false off_delay: 1 switch: platform: mqtt name: "button_office_lamp_1" command_topic: "cmnd/RF_Bridge/power" state_topic: "tele/RF_Bridge/POWER" qos: 1 payload_on: "ON" payload_off: "OFF" retain: true