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
+3
View File
@@ -159,6 +159,9 @@ cover:
- cover.venstre
- cover.terrasse_dor
# Dominerende farve fra albumcover (bruges af coverfarve-automatiseringer)
color_extractor:
##################################################
# Modular Includes
##################################################
+25
View File
@@ -38,6 +38,31 @@ sections:
name:
- font-size: 11px
- type: custom:button-card
entity: input_boolean.coverfarve_andreas
name: Coverfarve
icon: mdi:palette
tap_action:
action: toggle
state:
- value: "on"
styles:
card:
- background-color: "#2c4a5e"
- color: "#a8d8f0"
icon:
- color: "#a8d8f0"
name:
- color: "#a8d8f0"
styles:
card:
- height: 52px
- padding: 6px 8px
icon:
- width: 18px
name:
- font-size: 11px
- type: grid
columns: 2
square: false
+25
View File
@@ -38,6 +38,31 @@ sections:
name:
- font-size: 11px
- type: custom:button-card
entity: input_boolean.coverfarve_daniel
name: Coverfarve
icon: mdi:palette
tap_action:
action: toggle
state:
- value: "on"
styles:
card:
- background-color: "#2c4a5e"
- color: "#a8d8f0"
icon:
- color: "#a8d8f0"
name:
- color: "#a8d8f0"
styles:
card:
- height: 52px
- padding: 6px 8px
icon:
- width: 18px
name:
- font-size: 11px
- type: grid
columns: 2
square: false
+25
View File
@@ -63,6 +63,31 @@ sections:
name:
- font-size: 11px
- type: custom:button-card
entity: input_boolean.coverfarve_sovevaerelse
name: Coverfarve
icon: mdi:palette
tap_action:
action: toggle
state:
- value: "on"
styles:
card:
- background-color: "#2c4a5e"
- color: "#a8d8f0"
icon:
- color: "#a8d8f0"
name:
- color: "#a8d8f0"
styles:
card:
- height: 52px
- padding: 6px 8px
icon:
- width: 18px
name:
- font-size: 11px
- type: grid
columns: 2
square: false
+25
View File
@@ -48,6 +48,31 @@ sections:
name:
- font-size: 11px
- type: custom:button-card
entity: input_boolean.coverfarve_stue
name: Coverfarve
icon: mdi:palette
tap_action:
action: toggle
state:
- value: "on"
styles:
card:
- background-color: "#2c4a5e"
- color: "#a8d8f0"
icon:
- color: "#a8d8f0"
name:
- color: "#a8d8f0"
styles:
card:
- height: 52px
- padding: 6px 8px
icon:
- width: 18px
name:
- font-size: 11px
# 💡 Lys (kompakt + alle lys)
- type: grid
@@ -5,5 +5,5 @@ panel: true
cards:
- type: iframe
url: /local/snapshots/indkorsel_loader.html?v=20260910174711
url: /local/snapshots/indkorsel_loader.html?v=20260910175555
aspect_ratio: 100%
+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
+25 -26
View File
@@ -2,8 +2,7 @@
# Baseret på thlucas1's "SpotifyPlus Hue Lightshow"-blueprint:
# https://github.com/thlucas1/homeassistant_blueprints/blob/master/spotifyplus/spotifyplus_hue_lightshow.md
#
# OBS: Kræver at SpotifyPlus-integrationen er sat op (Spotify Premium + OAuth).
# Ret media_player.spotifyplus til den faktiske entity efter opsætning.
# SpotifyPlus konfigureret 10/9 2026 — entity: media_player.spotifyplus_claus_dethlefsen
- id: lightshow_andreas
alias: "Lysshow: Andreas"
@@ -15,28 +14,28 @@
entity_id: input_boolean.lightshow_andreas
to: "on"
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
attribute: media_content_id
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
to: playing
conditions:
- condition: state
entity_id: input_boolean.lightshow_andreas
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
actions:
- variables:
media_player_entity: media_player.spotifyplus
media_player_entity: media_player.spotifyplus_claus_dethlefsen
lights:
- light.andreas_lysstrip
- light.andreas_stol
spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
- action: spotifyplus.get_image_palette_colors
data:
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
image_source: "{{ spotify_image_url }}"
color_count: 10
color_quality: 1
@@ -52,7 +51,7 @@
entity_id: input_boolean.lightshow_andreas
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
- condition: template
value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
@@ -79,28 +78,28 @@
entity_id: input_boolean.lightshow_daniel
to: "on"
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
attribute: media_content_id
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
to: playing
conditions:
- condition: state
entity_id: input_boolean.lightshow_daniel
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
actions:
- variables:
media_player_entity: media_player.spotifyplus
media_player_entity: media_player.spotifyplus_claus_dethlefsen
lights:
- light.daniel_lysstrip
- light.bamse
spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
- action: spotifyplus.get_image_palette_colors
data:
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
image_source: "{{ spotify_image_url }}"
color_count: 10
color_quality: 1
@@ -116,7 +115,7 @@
entity_id: input_boolean.lightshow_daniel
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
- condition: template
value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
@@ -143,21 +142,21 @@
entity_id: input_boolean.lightshow_sovevaerelse
to: "on"
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
attribute: media_content_id
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
to: playing
conditions:
- condition: state
entity_id: input_boolean.lightshow_sovevaerelse
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
actions:
- variables:
media_player_entity: media_player.spotifyplus
media_player_entity: media_player.spotifyplus_claus_dethlefsen
lights:
- light.sov_midt
- light.sov_vindue
@@ -167,7 +166,7 @@
spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
- action: spotifyplus.get_image_palette_colors
data:
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
image_source: "{{ spotify_image_url }}"
color_count: 10
color_quality: 1
@@ -183,7 +182,7 @@
entity_id: input_boolean.lightshow_sovevaerelse
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
- condition: template
value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
@@ -210,21 +209,21 @@
entity_id: input_boolean.lightshow_stue
to: "on"
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
attribute: media_content_id
- trigger: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
to: playing
conditions:
- condition: state
entity_id: input_boolean.lightshow_stue
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
actions:
- variables:
media_player_entity: media_player.spotifyplus
media_player_entity: media_player.spotifyplus_claus_dethlefsen
lights:
- light.pendle1
- light.pendle2
@@ -235,7 +234,7 @@
spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
- action: spotifyplus.get_image_palette_colors
data:
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
image_source: "{{ spotify_image_url }}"
color_count: 10
color_quality: 1
@@ -251,7 +250,7 @@
entity_id: input_boolean.lightshow_stue
state: "on"
- condition: state
entity_id: media_player.spotifyplus
entity_id: media_player.spotifyplus_claus_dethlefsen
state: playing
- condition: template
value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}"
+16
View File
@@ -13,3 +13,19 @@ lightshow_sovevaerelse:
lightshow_stue:
name: Lysshow Stue
icon: mdi:party-popper
coverfarve_andreas:
name: Coverfarve Andreas
icon: mdi:palette
coverfarve_daniel:
name: Coverfarve Daniel
icon: mdi:palette
coverfarve_sovevaerelse:
name: Coverfarve Soveværelse
icon: mdi:palette
coverfarve_stue:
name: Coverfarve Stue
icon: mdi:palette