What I’m trying to do is I have a card that shows the status of all windows and doors in the house, but the entity for the garage door will shop up as a button to open and close the garage door. Is there a way to make it just display the status as “Open or Closed”? I’m still very new at HA and I’m trying to learn as much as I can. Im running everything on a raspberryPi4 and I have all the latest updates. Thank you in advance
If you’re using a button card, you can add show_state: true
for the words “Open” or “Closed” to display on the button.
type: button
entity: cover.garage
tap_action:
action: toggle
show_name: true
show_icon: true
show_state: true
if you want to show state without method of control you just need to add it to entity card from frontend.
type: entity
entity: cover.ratgdo
Although this does make a card that only display’s status when I change toggle to none, all my windows and doors are on an entity card. If I have to I’ll redo the dashboard and use this method, but I would like to keep it somewhat organized the way I have it. Thank you for the help!
If I add this to the entity card, it shows up with the icon and also the controls to open and close the door. I’m trying to get it to just show the icon with just status saying open or closed. I do really appreciate the advice and Thank you.
Something like template-entity-row, which you can install from HACS, can help you customize each row of the entities card.
That is entities card
I said entity, there is a difference.
I’m giving up on this, it’s not worth the effort anymore and it’s just easier to add a Zigbee tilt sensor to the door for it to display “Open” or “Closed” status. Thank’s for all the advice, but this 50 year old auto mechanic can only do so much.
Not sure the difficulty.
Edit dashboard >> +add card >> enter “entity” in search >> select “entity” card not “entities” card >> put your cover.entity in entity box
You can only add a single entity to this card. If you want to combine this card to a single card showing multiple entities you would need create vertical stack card then add the Entities card and
Entity card to the vertical stack card.
To create the single entity card takes under 1 minute. The vertical stack maybe 5 but I would expect the vertical stack to take longer for you if you have not done this before
Again, both are fine in ui. I would agree about zigbee but ratgdo state is simply more accurate and why.
As a side note, you can add a card in ui and select any card >> select “show code editor” >> copy/paste code input above and add your cover
The visual code editor for not require you to stay with card you start with
Don’t get frustrated. It gets easier. It is a process.
I just installed a ratgdo and struggled with this too. I found a solution, using template-entity-row suggested by @atlflyer above. Hopefully this helps others.
In an Entities Card, after installing template-entity-row, this is all you need to show the status of the ratgdo garage door entity:
type: entities
title: Doors
entities:
- type: custom:template-entity-row
icon: mdi:garage-variant
name: Main Garage Door
state: >-
{% if is_state('cover.ratgdo_xxxxx_door', 'closed')%} Closed {%
else %} Open {% endif %}
secondary: >-
{{ relative_time(states.cover.ratgdo_xxxxx_door.last_changed)}}
ago
I have a very concise card set I’m using for my ratgdo. It uses conditional cards to show a button with different icons depending on state. The door has “Open, Opening, Closing, and Closed” and the sensor has “OK” or “Problem”
- type: horizontal-stack
cards:
- type: conditional
conditions:
- condition: state
entity: cover.ratgdov25i_e6fcaf_door
state: closed
card:
show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: button.ratgdov25i_e6fcaf_toggle_door
icon: mdi:garage
- type: conditional
conditions:
- condition: state
entity: cover.ratgdov25i_e6fcaf_door
state: opening
card:
show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: button.ratgdov25i_e6fcaf_toggle_door
icon: mdi:garage-alert
- type: conditional
conditions:
- condition: state
entity: cover.ratgdov25i_e6fcaf_door
state: closing
card:
show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: button.ratgdov25i_e6fcaf_toggle_door
icon: mdi:garage-alert
- type: conditional
conditions:
- condition: state
entity: cover.ratgdov25i_e6fcaf_door
state: open
card:
show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: button.ratgdov25i_e6fcaf_toggle_door
icon: mdi:garage-open
- show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: light.ratgdov25i_e6fcaf_light
show_state: false
- type: conditional
conditions:
- condition: state
entity: binary_sensor.ratgdov25i_e6fcaf_obstruction
state: "off"
card:
show_name: true
show_icon: true
type: button
tap_action:
action: toggle
icon: mdi:motion-sensor
- type: conditional
conditions:
- condition: state
entity: binary_sensor.ratgdov25i_e6fcaf_obstruction
state: "on"
card:
show_name: true
show_icon: true
type: button
tap_action:
action: toggle
icon: mdi:motion-sensor-off
Before you save the dashboard you’ll see this:
Once you save, the conditions kick in and you’ll see this:
The light state will change the color of the icon, and is a button to turn it on/off. The door button icon will show the state and will always trigger the “toggle” event. The sensor is a button that does nothing but show a block if it’s obstructed.
This card is amazing! The only thing I had to do was replace your ratgdo model_serialnumber (“ratgdov25i_e6fcaf”) with mine and left justify the first 2 lines. I pasted it into the code editor of a conditional card and it worked. You should publish this so others can find it more easily.
Take a look at this thread…
Does this still work? Even after a little work on the getting the yaml formatted correctly, it never shows the icons or works for me.
Works great
Hey! I ran into the same problem as you. I was able to fix it by switching to the Visual Editor and removing the Entity and re-adding it and the correct state. Hope that helps.