Frontend status feedback for cover component?

I just migrated my MQTT Garage Door from the deprecated garage_door component to cover. It seems to be working OK, but I don’t get any feedback from the UI as to wether the door is open or closed as I did with the old garage component. It always looks like this:

Is this intended behavior, missing config or perhaps a bug?

1 Like

I can confirm this, I am also not seeing the status unless I click on the sensor and then it shows with graph. Also I am not sure what is that black box (Solid black filled square/rectangle) means in the middle of up and down arrow?
I am thinking to put old garage_door component but don’t know how to do that as I just installed GD00Z-4 today and trying to bring that into HA.
Thanks

Anyone has automation example for cover? I wan to send notification when garage door either open or close. I know how to write this but I don’t see status attribute of cover component to set the trigger on. Basically question is on what I do set the trigger? Will this work?

- alias: Door opened or closed
  trigger:
    - platform: state
      entity_id: cover.garage_door

Thanks

Are you trying to do something like this? I am sure there is a shorter way but this should work…

   - alias: Door opened notification
      trigger:
        - platform: state
          entity_id: cover.garage_door
          to: 'open' "This could be 'on', check dev tools for correct state"
          for:
            minutes: 5 "optional"
      action:
        service: persistent_notification.create "This is for a notification in the front end"
        data:
          message: "Your message goes here"
          title: "Custom subject"

    - alias: Door closed notification
      trigger:
        - platform: state
          entity_id: cover.garage_door
          to: 'closed' "This could be 'off', check dev tools for correct state"
          for:
            minutes: 5 "optional"
      action:
        service: persistent_notification.create "This is for a notification in the front end"
        data:
          message: "Your message goes here"
          title: "Custom subject"

The square in the middle is the “stop” button - remember this component is also used for blinds.

In my setup using cover with MQTT then “window” icon changes into an open state when the garage is open. It’s a subtle change and the icon doesn’t change to yellow like some other’s do on state change.

OK, thanks for the confirmation :slight_smile: I am changing to a home brew setup anyway - I’ll take a look to see if I can get it to work with the cover component but if not I’ll end up with a switch like the old garage which will give me status anyway.

Over in the myq custom component adding

    @property
def current_cover_position(self):
    """Return current position of cover."""
    return 0 if self.is_closed else 100

allows the up and down buttons to grey out depending on the current status.

Excellent - thanks :slight_smile:

@PtP Nice, thanks a lot. I will try to implement this. My question was the cover component has only two attributes (battery, friendly name and no status/state) when I check dev tools, so I am confused (not clear) that I can use state trigger. Thanks

I wish it becomes default rather then everyone customizing it. And that way it will become more visual to see the status opened/closed.
Thanks

@aimc, I am also thinking to use old component garage_door, could you please show how to do that? Appreciate it. Thanks a lot

To be clear, I said I was moving to a custom setup that would basically be a switch not a cover component - that means it will show up the same as a light switch and will therefore give me a similar indication to the old garage door. I wouldn’t suggest reverting to the garage door component as it will be removed sometime soon.

Make sense, not a good idea to use old (deprecated) component.
Thanks

aimc,

Can you try this specifically and if it works Ill try a pull-request?

in /usr/local/lib/python3.4/dist-packages/homeassistant/components/cover/mqtt.py

replace line 138-144 with

    @property
def current_cover_position(self):
    """Return current position of cover. If current_cover_postion is unknown use is_closed""" 
    if state == 0:
        return 0
    elif state == 100:
        return 100
    else:
        return 0 if self.is_closed else 100

Sorry - I can;t try that at the moment, I decommissioned my Linear yesterday and now just have a ZWave switch now.

I tested this fix, made some adjustments, and PR’ed. https://github.com/home-assistant/home-assistant/pull/3662

Hopefully the pr gets approved. I tried a similar pull for wink to fix the same issue and it was denied.

I was told the correct fix would be for the front end to enable / disable the buttons if current position was unknown but status was known.

Does anyone know how can I use the old garage door icon with the cover component?

OK I have been sitting at 0.26.1 for quite some time now. Everything was stable. I bit the bullet and migrated everything to 0.31.1 and I’m have all sorts of weird issues. Covers and more importantly the UI is nuts.

I have EXACTLY the same config files loaded on 2 servers, Debian Jessie & Synology NAS. This is my new covers config which I adapted from rollershutter, again the same on both servers.

  • platform: mqtt
    state_topic: “garage/door/stat”
    command_topic: “garage/door/cmd”
    name: “Garage Door”
    qos: 0
    retain: true
    payload_open: “OPEN”
    payload_close: “CLOSE”
    state_open: “0”
    state_closed: “100”
    optimistic: false

Now here’s the funny part. This screen is from Deb Jessie. Note the UI. It doesn’t think it’s a rollershutter or cover or whatever it’s meant to be called. It knows it’s closed, but there are no buttons in the UI to open or close it. Also notice the icon that’s it’s using.

This screen is from Synology. Note this UI. It displays it correctly. This is how it displayed on 0.26.2 and that was on my Debian server as well.

Both servers are running 0.31.1. Can anyone explain the hell is going on? How can 2 different systems display it differently. Having similar issue with sliders (which is displayed correctly on the Synology NAS) but I won’t bring that up on this thread.

Any help would be appreciated.

Kman