diff --git a/dashboards/views/06c_indkorsel_snapshots.yaml b/dashboards/views/06c_indkorsel_snapshots.yaml index d11117e..b8cb22c 100644 --- a/dashboards/views/06c_indkorsel_snapshots.yaml +++ b/dashboards/views/06c_indkorsel_snapshots.yaml @@ -5,5 +5,5 @@ panel: true cards: - type: iframe - url: /local/snapshots/indkorsel_loader.html?v=20260910185021 + url: /local/snapshots/indkorsel_loader.html?v=20260910190142 aspect_ratio: 100% diff --git a/include/automations/lightshow.yaml b/include/automations/lightshow.yaml index 8f6f4fe..5822238 100644 --- a/include/automations/lightshow.yaml +++ b/include/automations/lightshow.yaml @@ -1,12 +1,13 @@ -# SpotifyPlus + Hue lysshow pr. værelse. +# Sonos + Hue lysshow pr. værelse. # Baseret på thlucas1's "SpotifyPlus Hue Lightshow"-blueprint: # https://github.com/thlucas1/homeassistant_blueprints/blob/master/spotifyplus/spotifyplus_hue_lightshow.md # -# SpotifyPlus konfigureret 10/9 2026 — entity: media_player.spotifyplus_claus_dethlefsen +# Coveret hentes fra Sonos-afspilleren (virker for alle konti/kilder); +# SpotifyPlus bruges kun til farvepalette-analysen (get_image_palette_colors). - id: lightshow_andreas alias: "Lysshow: Andreas" - description: Synkroniserer Hue-lys med Spotify-albumcover (SpotifyPlus) + description: Lys skifter mellem albumcoverets farver (Sonos Andreas) mode: restart max_exceeded: silent triggers: @@ -14,29 +15,31 @@ entity_id: input_boolean.lightshow_andreas to: "on" - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen - attribute: media_content_id + entity_id: media_player.andreas + attribute: entity_picture - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.andreas to: playing conditions: - condition: state entity_id: input_boolean.lightshow_andreas state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.andreas state: playing + - condition: template + value_template: "{{ state_attr('media_player.andreas', 'entity_picture') is not none }}" actions: - variables: - media_player_entity: media_player.spotifyplus_claus_dethlefsen + media_player_entity: media_player.andreas lights: - light.andreas_lysstrip - light.andreas_stol - spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + cover_url: "{{ state_attr(media_player_entity, 'entity_picture') }}" - action: spotifyplus.get_image_palette_colors data: entity_id: media_player.spotifyplus_claus_dethlefsen - image_source: "{{ spotify_image_url }}" + image_source: "{{ 'http://localhost:8123' ~ cover_url }}" color_count: 10 color_quality: 1 brightness_filter_low: 100 @@ -51,10 +54,10 @@ entity_id: input_boolean.lightshow_andreas state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.andreas state: playing - condition: template - value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + value_template: "{{ colors_rgb | count > 0 and cover_url == state_attr(media_player_entity, 'entity_picture') }}" sequence: - repeat: count: "{{ colors_rgb | count }}" @@ -70,7 +73,7 @@ - id: lightshow_daniel alias: "Lysshow: Daniel" - description: Synkroniserer Hue-lys med Spotify-albumcover (SpotifyPlus) + description: Lys skifter mellem albumcoverets farver (Sonos Daniel) mode: restart max_exceeded: silent triggers: @@ -78,29 +81,31 @@ entity_id: input_boolean.lightshow_daniel to: "on" - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen - attribute: media_content_id + entity_id: media_player.daniel + attribute: entity_picture - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.daniel to: playing conditions: - condition: state entity_id: input_boolean.lightshow_daniel state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.daniel state: playing + - condition: template + value_template: "{{ state_attr('media_player.daniel', 'entity_picture') is not none }}" actions: - variables: - media_player_entity: media_player.spotifyplus_claus_dethlefsen + media_player_entity: media_player.daniel lights: - light.daniel_lysstrip - light.bamse - spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + cover_url: "{{ state_attr(media_player_entity, 'entity_picture') }}" - action: spotifyplus.get_image_palette_colors data: entity_id: media_player.spotifyplus_claus_dethlefsen - image_source: "{{ spotify_image_url }}" + image_source: "{{ 'http://localhost:8123' ~ cover_url }}" color_count: 10 color_quality: 1 brightness_filter_low: 100 @@ -115,10 +120,10 @@ entity_id: input_boolean.lightshow_daniel state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.daniel state: playing - condition: template - value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + value_template: "{{ colors_rgb | count > 0 and cover_url == state_attr(media_player_entity, 'entity_picture') }}" sequence: - repeat: count: "{{ colors_rgb | count }}" @@ -134,7 +139,7 @@ - id: lightshow_sovevaerelse alias: "Lysshow: Soveværelse" - description: Synkroniserer Hue-lys med Spotify-albumcover (SpotifyPlus) + description: Lys skifter mellem albumcoverets farver (Sonos Soveværelse) mode: restart max_exceeded: silent triggers: @@ -142,32 +147,34 @@ entity_id: input_boolean.lightshow_sovevaerelse to: "on" - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen - attribute: media_content_id + entity_id: media_player.sovevaerelse + attribute: entity_picture - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.sovevaerelse to: playing conditions: - condition: state entity_id: input_boolean.lightshow_sovevaerelse state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.sovevaerelse state: playing + - condition: template + value_template: "{{ state_attr('media_player.sovevaerelse', 'entity_picture') is not none }}" actions: - variables: - media_player_entity: media_player.spotifyplus_claus_dethlefsen + media_player_entity: media_player.sovevaerelse lights: - light.sov_midt - light.sov_vindue - light.sov_dor - light.anne - light.claus - spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + cover_url: "{{ state_attr(media_player_entity, 'entity_picture') }}" - action: spotifyplus.get_image_palette_colors data: entity_id: media_player.spotifyplus_claus_dethlefsen - image_source: "{{ spotify_image_url }}" + image_source: "{{ 'http://localhost:8123' ~ cover_url }}" color_count: 10 color_quality: 1 brightness_filter_low: 100 @@ -182,10 +189,10 @@ entity_id: input_boolean.lightshow_sovevaerelse state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.sovevaerelse state: playing - condition: template - value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + value_template: "{{ colors_rgb | count > 0 and cover_url == state_attr(media_player_entity, 'entity_picture') }}" sequence: - repeat: count: "{{ colors_rgb | count }}" @@ -201,7 +208,7 @@ - id: lightshow_stue alias: "Lysshow: Stue" - description: Synkroniserer Hue-lys med Spotify-albumcover (SpotifyPlus) + description: Lys skifter mellem albumcoverets farver (Sonos Stue) mode: restart max_exceeded: silent triggers: @@ -209,31 +216,33 @@ entity_id: input_boolean.lightshow_stue to: "on" - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen - attribute: media_content_id + entity_id: media_player.stue + attribute: entity_picture - trigger: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.stue to: playing conditions: - condition: state entity_id: input_boolean.lightshow_stue state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.stue state: playing + - condition: template + value_template: "{{ state_attr('media_player.stue', 'entity_picture') is not none }}" actions: - variables: - media_player_entity: media_player.spotifyplus_claus_dethlefsen + media_player_entity: media_player.stue # Kun farve-lamper (pendle1/syd/spisebord kan ikke farve) lights: - light.pendle2 - light.raket - light.panton - spotify_image_url: "{{ state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + cover_url: "{{ state_attr(media_player_entity, 'entity_picture') }}" - action: spotifyplus.get_image_palette_colors data: entity_id: media_player.spotifyplus_claus_dethlefsen - image_source: "{{ spotify_image_url }}" + image_source: "{{ 'http://localhost:8123' ~ cover_url }}" color_count: 10 color_quality: 1 brightness_filter_low: 100 @@ -248,10 +257,10 @@ entity_id: input_boolean.lightshow_stue state: "on" - condition: state - entity_id: media_player.spotifyplus_claus_dethlefsen + entity_id: media_player.stue state: playing - condition: template - value_template: "{{ spotify_image_url == state_attr(media_player_entity, 'sp_nowplaying_image_url') }}" + value_template: "{{ colors_rgb | count > 0 and cover_url == state_attr(media_player_entity, 'entity_picture') }}" sequence: - repeat: count: "{{ colors_rgb | count }}"