#why does that suck? what are you trying

1 messages · Page 1 of 1 (latest)

dawn phoenix
#
            show_icon: false
            entity: light.craftroom_lamp
            name: >-
              [[[
                if (states['input_boolean.frigate_monitor6_override'].state === 'off') {
                  return `Lights`;
                } else {
                  return `Lights (Auto)`;
                }
              ]]]
            icon: mdi:lamp
            show_state: false
            hold_action:
              action: toggle
              entity: input_boolean.frigate_monitor6_override
            template:
              - base
              - light
              - icon_light
#

this is working

#

what I'd like to do, is on the first return statement (not 'Auto') put a lock icon in front of 'Lights'

sick geyser
#

make a custom field that does that instead of using name

dawn phoenix
#

if I use <ha-icon> it overlays the entire button

sick geyser
#

right because name is a string and it's not a container for icons

dawn phoenix
#

..hmm .. i'd have to edit the button-card template

#

which is fine,

#

I just didnt wannago down that road

#

lol

sick geyser
#

Do you really need that icon then?

dawn phoenix
#

well,

sick geyser
#

use an emoji

dawn phoenix
sick geyser
#

🔒

#

emojis are text characters

dawn phoenix
#

interesting

#

well hell, that makes it easier