I’m a newb working on my first system and I’m missing something simple. I’m trying to use the cover example ( [Cover - Home Assistant (home-assistant.io) (Template cover - Home Assistant)) for my garage door. I have the following code in my configuration.yaml:
Example configuration.yaml entry
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: “Garage Door”
value_template: “{{ states(‘sensor.garage_door’)|float > 0 }}”
open_cover:
service: script.open_garage_door
close_cover:
service: script.close_garage_door
stop_cover:
service: script.stop_garage_door
and the below code in my ui-lovelace.yaml and nothing shows up on dashboard
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: “Garage Door”
position_template: “{{ states(‘sensor.garage_door’) }}”
open_cover:
- condition: state
entity_id: sensor.garage_door
state: “off”
- service: switch.turn_on
target:
entity_id: switch.garage_door
close_cover:
- condition: state
entity_id: sensor.garage_door
state: “on”
- service: switch.turn_off
target:
entity_id: switch.garage_door
stop_cover:
service: switch.turn_on
target:
entity_id: switch.garage_door
icon_template: >-
{% if states(‘sensor.garage_door’)|float > 0 %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
Do I need to call it some how? Create a cover.yaml or cover card? And if so what do I put in it?
TYIA,
gschmelt