OpenGarage broken after last update

hey guys, updated to the latest Home Assistant and now my OpenGarage doesn’t work. The opening and shutting the door works, just the distance sensor and car in garage are broken.

In the upgrade docs, it mentions:
door_state is removed as an attribute, but you can use the state directly instead.
and
The attributes (wifi_signal and distance_sensor ) for OpenGarage covers are removed and replaced by individual sensors.

anyone able to help me fix this? here is my config.

#Open Garage Config
cover:
  platform: opengarage
  covers:
      garage:
        host: 192.168.70.119
        device_key: #######
        name: Garage Door
sensor:
  - platform: template
    sensors:
      garage_status:
        friendly_name: 'Garage Door Status'
        value_template: '{% if states.cover.garage_door %}
          {% if states.cover.garage_door.attributes["door_state"] == "open" %}
            Open
          {% elif states.cover.garage_door.attributes["door_state"] == "closed" %}
            Closed
          {% elif states.cover.garage_door.attributes["door_state"] == "opening" %}
            Opening
          {% elif states.cover.garage_door.attributes["door_state"] == "closing" %}
            Closing
          {% else %}
            Unknown
          {% endif %}
          {% else %}
          n/a
          {% endif %}'
        icon_template: >-
          {% if states.cover.garage_door.attributes["door_state"] == "closed" %}
            mdi:garage
          {% else %}
            mdi:garage-open
          {% endif %}
      garage_car_present:
        friendly_name: 'Subaru in Garage'
        value_template: '{% if states.cover.garage_door %}
            {% if states.cover.garage_door.state == "open" %}
              not available
            {% elif ((states.cover.garage_door.attributes["distance_sensor"] > 40) and (states.cover.garage_door.attributes["distance_sensor"] < 135)) %}
              Yes
            {% else %}
              No
            {% endif %}
            {% else %}
            n/a
            {% endif %}'
        icon_template: >-
          {% if is_state('binary_sensor.subaru_in_garage','on') %}
          mdi:car
          {% else %}
          mdi:car-arrow-right
          {% endif %}

The attributes are removed. Please read the breaking changes in the release notes.

the problem is I don’t know how to fix it, barely got it working last time with a bunch of help. any suggestions?

1 Like

anyone offer some advice? don’t want to break more than i fix.

switch to states.cover.garage_door.state

i downgraded mine as this new update doesn’t have opening or closing state.

hey, thanks will give this a try. what did you downgrade? was thinking about it, i don’t care if i can tell that I have a car in the garage but would like to be able to see garage closed or open.

Thanks heaps, I fixed mine by replacing my old code with the following

configuration.yaml

#OpenGarage
- platform: template
  sensors:
    garage_door_status:
      friendly_name: 'Garage Door Status'
      value_template: '{{ states.cover.subaru.state }}'

Change cover.subaru with whatever you have called you’re OpenDoor Cover

1 Like

It should have

Then it is no need to make a template?
You can use cover.subaru.state directly?

This is super helpful.

Is it possible to get a binary sensor of garage open/close state? If so, how?

I have been trying to piece together how to from the binary sensor pages, but I haven’t figured out how it should look in yaml and haven’t found many examples of this. I’m finding a binary sensor for door state will be helpful in some automations.

That is what that code does, my example when the garage door is open for 1 min, give me a notification.

My trigger automation:

Yeah your probably right, but I do like to have an entry with closed or open on my dashboard which I cannot seem to display with the normal cover entity.

1 Like

I have a issue that is when I open/close the garage, the status is backwards. Closed shows as open and open shows as closed. Is there a way to fix that?