Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
448 B
4
Indexable
Never
  - platform: mqtt
    binary_sensor:
    - name: Movimento Garage
      payload_on: "on"
      payload_off: "off"
      device_class: motion
      state_topic: "stat/motionEye/motion"
      value_template: >
        {% if value_json.ipcam == 'garage_on' %}
          on
        {% elif value_json.ipcam == 'garage_off' %}
          off
        {% else %}
          {{ states('binary_sensor.movimento_garage') }}
        {% endif %}