Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107829

Cover for Garage Door with 2 Binary sensors A little lost

$
0
0

Hi
I have a (template) Cover for the garage door and wanted to change the icon based of 2 binary sensors (2 reed switch’s) one for open one for closed ?.
Here is the cover

  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door"
        position_template: "{{ states('sensor.garage_door') }}"
        open_cover:
          service: switch.turn_on
          data:
            entity_id: switch.garage_door_control
        close_cover:
          service: switch.turn_on
          data:
            entity_id: switch.garage_door_control
        icon_template: >-
          {% if states('sensor.garage_door')|float > 0 %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

The binay switchs are
binary_sensor.garage_door_is_closed and binary_sensor.garage_door_is_open they are either on/off to state if the door is closed or open
Thanks Andrew

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 107829


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>