Dynamic Text entry card

I would like a card(s) that would dynamically show status of a device when it changes. For instance a smoke detector that goes into smoke detection mode, or a door opens during the night. I would like the text to show info of the device reporting the change. Possibly a default text that states that “All is well”. Ideally it would be a card that has a few lines that would show one device / entity at a time. Is this possible?

Thanks for any direction you guys can point me in.

1 Like

If I get your question correctly: Just use a markdown card. If door = open show text “A”, if door = closed show text “B”. See example:

{% if is_state("light.alllights", "off") -%} All lights are turned off. {%- else -%} At least one light is turned on.{%- endif %}

“light.alllights” is a group that includes all my light entities. So if that group turns on, it means that at least one light at home is turned on. Thus, if the light.alllights-group is “on” this card displays the text that at least one light is on, otherwise it will show a text indicating that all lights are turned off.

Hope that helps.

That’s pretty close, I also found a conditional card. I want to show each device as it changes. For instance : I have a couple of 10" tablets showing Date and weather. I would like an area of the screen that would show the text “Basement Smoke detected” all the while the siren is going off. I know the issue is in the basement immediately. Same for a door being opened during the night.

Then this works perfectly for you, no?
If the alarm goes “on” you change the text to “basement smoke detected” if it’s off “all quiet on the western front” :wink:

you can tie this text to the siren’s status. Or - if the siren is only indirectly integrated into HA you could implement this via a helper.

Or am I missunderstanding something?

Hi,

I use the auto-entities card for this scenario on my tablet.
An example below;

  - type: custom:auto-entities
    card:
      type: entities
      show_header_toggle: false
      state_color: true
      theme: material_dark_red
    filter:
      include:
        - entity_id: binary_sensor.pir_voordeur
          state: 'on'
        - entity_id: binary_sensor.pir_woonkamer
          state: 'on'
        - entity_id: binary_sensor.pir_gang
          state: 'on'
        - entity_id: binary_sensor.pir_overloop
          state: 'on'
        - entity_id: binary_sensor.lumi_lumi_motion_ac02_d8144900_ias_zone
          state: 'on'
        - entity_id: binary_sensor.pir_tussengang_achterdeur
          state: 'on'
        - entity_id: binary_sensor.pir_tussengang_garage
          state: 'on'
        - entity_id: binary_sensor.pir_garage
          state: 'on'
        - entity_id: binary_sensor.pir_tuin_achter
          state: 'on'
      exclude: []
    show_empty: false

Yes I think so. I need to sit down and work it out.

Thanks

1 Like

Dont understand this yet but will give it a shot

Thanks!

Oké, if you need help just ask.
Start with download and install the frontend integration via HACS.

Like this:
No motion detected

afbeelding

Motion detected

afbeelding

I think you might want to end up using a mix of these. I also use auto entity cards. They are great. However, they cannot be set to display a specific text when the sensor sets to “active”.

Conditional cards can do this. However, for just a couple of lines of text, I’d consider them to be overkill. In that situation, I think, the markdown option is cleaner and easier to work with.

I ended up using a conditional card for my entities. They appear on the dashboard like magic.

Thanks guys