Cover for Garage Door not Showing Up?

I feel like I’m probably doing something dumb, but perhaps you can all give me some guidance. I’m still very new to HA.

I have my own custom Raspberry Pi Garage Door Opener and have my own API. I want to setup a super simple cover template for this so that I can see status, and open/close the door from my dashboard.

In my configuration file I have the following:

sensor garage_door:
  - platform: rest
    scan_interval: 60
    resource: http://192.168.10.32:5000/api
    name: "Garage Door Sensor"
    value_template: "{{ value_json['Default Door']['status']['limitsensorclosed'] }}"

# Switch garage_door 

switch garage_door:
  - platform: rest
    name: "Garage Door"
    resource: http://192.168.10.32:5000/api
    scan_interval: 60
    body_on: '{"DoorButton" : "Default Door"}'
    body_off: '{"DoorButton" : "Default Door"}'
    is_on_template: "{{ value_json['Default Door']['status']['limitsensorclosed'] }}"
    headers:
      Content-Type: application/json
    verify_ssl: false


# Cover Template Example from:  https://www.home-assistant.io/integrations/cover.template/

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 %}

When I go to edit my dashboard I cannot find the “cover” anywhere. I can see the switch.garage_door and the sensor.garage_door which function perfectly as expected by themselves. What am I missing here?

Posting here for anyone who might run into my similar problem. The whole issue? I wasn’t resetting Home Assistant Server.

I discovered that when you start with HA, things like refreshing your REST or MQTT capabilities don’t actually show up in the configuration settings page until you reset your HA instance with these items in your configuration.yaml file. This is also true for Cover Templates apparently. So I did a refresh with the cover template defined in the yaml file and boom, now I can find the cover in Lovelace. Sheesh.

This is probably plainly obvious to some, but for me… I’ve been banging my head against the wall for several days now. Glad I finally found the answer.

1 Like

I had exactly the same issue.
Thanksfully I found your post :slight_smile: