Lysshow: SpotifyPlus-entity indsat + coverfarve-variant (color_extractor) med knapper på alle 4 views

This commit is contained in:
2026-09-10 18:14:52 +02:00
parent fa5bd76f7e
commit 1cdcf384dd
9 changed files with 274 additions and 27 deletions
+129
View File
@@ -0,0 +1,129 @@
# Coverfarve: sætter værelsets Hue-lys til albumcoverets dominerende farve (color_extractor).
# Virker med Sonos-afspilning (favoritter, radio, Spotify) — modsat SpotifyPlus-lysshowet.
- id: coverfarve_andreas
alias: "Coverfarve: Andreas"
description: Lys følger albumcover på Sonos Andreas
mode: restart
max_exceeded: silent
triggers:
- trigger: state
entity_id: input_boolean.coverfarve_andreas
to: "on"
- trigger: state
entity_id: media_player.andreas
attribute: entity_picture
conditions:
- condition: state
entity_id: input_boolean.coverfarve_andreas
state: "on"
- condition: state
entity_id: media_player.andreas
state: playing
- condition: template
value_template: "{{ state_attr('media_player.andreas', 'entity_picture') is not none }}"
actions:
- action: color_extractor.turn_on
data:
color_extract_url: "{{ 'http://localhost:8123' ~ state_attr('media_player.andreas', 'entity_picture') }}"
entity_id:
- light.andreas_lysstrip
- light.andreas_stol
transition: 2
- id: coverfarve_daniel
alias: "Coverfarve: Daniel"
description: Lys følger albumcover på Sonos Daniel
mode: restart
max_exceeded: silent
triggers:
- trigger: state
entity_id: input_boolean.coverfarve_daniel
to: "on"
- trigger: state
entity_id: media_player.daniel
attribute: entity_picture
conditions:
- condition: state
entity_id: input_boolean.coverfarve_daniel
state: "on"
- condition: state
entity_id: media_player.daniel
state: playing
- condition: template
value_template: "{{ state_attr('media_player.daniel', 'entity_picture') is not none }}"
actions:
- action: color_extractor.turn_on
data:
color_extract_url: "{{ 'http://localhost:8123' ~ state_attr('media_player.daniel', 'entity_picture') }}"
entity_id:
- light.daniel_lysstrip
- light.bamse
transition: 2
- id: coverfarve_sovevaerelse
alias: "Coverfarve: Soveværelse"
description: Lys følger albumcover på Sonos Soveværelse
mode: restart
max_exceeded: silent
triggers:
- trigger: state
entity_id: input_boolean.coverfarve_sovevaerelse
to: "on"
- trigger: state
entity_id: media_player.sovevaerelse
attribute: entity_picture
conditions:
- condition: state
entity_id: input_boolean.coverfarve_sovevaerelse
state: "on"
- condition: state
entity_id: media_player.sovevaerelse
state: playing
- condition: template
value_template: "{{ state_attr('media_player.sovevaerelse', 'entity_picture') is not none }}"
actions:
- action: color_extractor.turn_on
data:
color_extract_url: "{{ 'http://localhost:8123' ~ state_attr('media_player.sovevaerelse', 'entity_picture') }}"
entity_id:
- light.sov_midt
- light.sov_vindue
- light.sov_dor
- light.anne
- light.claus
transition: 2
- id: coverfarve_stue
alias: "Coverfarve: Stue"
description: Lys følger albumcover på Sonos Stue
mode: restart
max_exceeded: silent
triggers:
- trigger: state
entity_id: input_boolean.coverfarve_stue
to: "on"
- trigger: state
entity_id: media_player.stue
attribute: entity_picture
conditions:
- condition: state
entity_id: input_boolean.coverfarve_stue
state: "on"
- condition: state
entity_id: media_player.stue
state: playing
- condition: template
value_template: "{{ state_attr('media_player.stue', 'entity_picture') is not none }}"
actions:
- action: color_extractor.turn_on
data:
color_extract_url: "{{ 'http://localhost:8123' ~ state_attr('media_player.stue', 'entity_picture') }}"
entity_id:
- light.pendle1
- light.pendle2
- light.syd
- light.raket
- light.spisebord
- light.panton
transition: 2