#Mushroom-card-template to tile card

1 messages · Page 1 of 1 (latest)

atomic ferry
#

I have a mushroom-template-card that uses an input boolean (virtual switch). If it's off, door alerts are on (the default state). If the switch is on, door alerts are off.

Currently the working mushroom-template-card looks like this:

type: custom:mushroom-template-card
entity: input_boolean.disable_door_notifications
secondary: |
{% if is_state('input_boolean.disable_door_notifications', 'on') %}
Door Alerts Off
{% elif is_state('input_boolean.disable_door_notifications', 'off') %}
Door Alerts On
{% else %}
Door Alerts Unknown
{% endif %}
icon: |-
{% if is_state('input_boolean.disable_door_notifications', 'on') %}
mdi:bell-remove
{% elif is_state('input_boolean.disable_door_notifications', 'off') %}
mdi:bell
{% else %}
mdi:bell-alert
{% endif %}
icon_color: |-
{% if is_state('input_boolean.disable_door_notifications', 'on') %}
red
{% elif is_state('input_boolean.disable_door_notifications', 'off') %}
grey
{% else %}
orange
{% endif %}
grid_options:
columns: 6
rows: auto

With the deprecation of mushroom cards, I was hoping I could do this with a standard tile card? If so, how?

twin stirrup
#

You woulda thought God would know how to format code in the chat here...

thick sorrelBOT
#

@atomic ferry To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.