Philips Hue Scene Name

Is it possible to find out the name of the scene which is used for the lights and show it on the UI?

1 Like

Hello froggi1930, welcome to the forums!

I played around with something like this once (here for a Mushroom Template Card, but a Markdown Card works too). Simply copy the code qnd paste it into Developer Tools —> Template:


type: custom:mushroom-template-card
entity: ''
primary: |-
  {% set x = ( states.scene
  |selectattr('entity_id', 'search', 'anrichte|lounge|wohnzimmer')
  |sort(attribute='last_changed', reverse=true) )[0:1]
  |map(attribute='entity_id')
  |join
  %}
  {{ 'Szene ' ~ state_attr(x, 'name') if
  states('light.'~area_name(x)|slugify)
  == 'on' else 'keine Szene aktiv' }}
secondary: |-
  {% set x = ( states.scene
  |selectattr('entity_id', 'search', 'anrichte|lounge|wohnzimmer')
  |sort(attribute='last_changed', reverse=true) )[0:1]
  |map(attribute='entity_id')
  |join
  %}
  {% set l = 'light.'~area_name(x)|slugify %}
  {% set b = '%0.f'|format(state_attr(l, 'brightness')/255*100|int(0)) if
  states(l) == 'on' else '0' %}
  {{ area_name(x) ~ ' | Helligkeit: ' ~ b ~ ' %' if states(l) == 'on' else ' '}}
icon: mdi:palette
icon_color: |-
  {% set x = ( states.scene
  |selectattr('entity_id', 'search', 'anrichte|lounge|wohnzimmer')
  |sort(attribute='last_changed', reverse=true) )[0:1]
  |map(attribute='entity_id')
  |join
  %}
  {% set l = 'light.'~area_name(x)|slugify %}
  {% set rgb = state_attr(l, 'rgb_color') %}
  {{ '#%02x%02x%02x' % rgb if states(l) == 'on' else 'disabled' }}

2 Likes

I believe there is also a Hue-Like card you can use but it will require installing via HACS.
See

1 Like

Werde ich am Wochenende ausprobieren. Im Moment bin ich noch blutiger Anfänger… habe vorher veiel Jahre mit ioBroker gearbeitet und muss jetzt erst einmal das neue Konzept verstehen :slight_smile:

Looks very good… at least it is the fast approach to my p :upside_down_face:roblem

1 Like

yay, first time i’ve been able to help someone on here! (i’m also new to the community)
people have helped me a ton so i’m glad to pay it forward in a small way!
i’m considering installing those cards myself btw but i’m getting a more basic version of that functionality in a way that i find more aesthetically pleasing… we shall see!