MQTT Domoticz Terraza

#

#

MQTT Domoticz Switch

#

#

automation:

#

#

MQTT Switch Domoticz Terraza

#

#
  • alias: DZ terraza
    trigger:
    • platform: mqtt
      topic: ‘domoticz/out/Casa/Terraza’
      condition:
      condition: template
      value_template: ‘{{ trigger.payload_json.dtype == «Light/Switch» }}’
      action:
    • service: mqtt.publish
      data_template:
      topic: ‘home/switch/{{ trigger.payload_json.idx }}/state’
      payload_template: ‘{% if trigger.payload_json.nvalue == 1 %} On {% else %} Off {% endif %}’
  • alias: DZ switch send value as dz expect
    trigger:
    • platform: mqtt
      topic: ‘home/switch/+/power’
      action:
    • service: mqtt.publish
      data_template:
      topic: ‘domoticz/in’
      payload_template: ‘{«command»: «switchlight», «idx»: {{ trigger.topic.split(«/»)[-2] }}, «switchcmd»: «{{ trigger.payload }}» }’

switch:

#

#

MQTT Domoticz Terraza

#

#
  • platform: mqtt
    name: «Luz Techo Terraza»
    command_topic: «home/switch/76/power»
    state_topic: «home/switch/76/state»
    payload_on: «On»
    payload_off: «Off»
    qos: 1
    retain: true
  • platform: mqtt
    name: «Luz Suelo Terraza»
    command_topic: «home/switch/27/power»
    state_topic: «home/switch/27/state»
    payload_on: «On»
    payload_off: «Off»
    qos: 1
    retain: true
  • platform: mqtt
    name: «Luz Exterior»
    command_topic: «home/switch/66/power»
    state_topic: «home/switch/66/state»
    payload_on: «On»
    payload_off: «Off»
    qos: 1
    retain: true
  • platform: mqtt
    name: «Luz Exterior Trasera»
    command_topic: «home/switch/164/power»
    state_topic: «home/switch/164/state»
    payload_on: «On»
    payload_off: «Off»
    qos: 1
    retain: true

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *