128 lines
4.0 KiB
YAML
128 lines
4.0 KiB
YAML
# 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') }}"
|
|
# Kun farve-lamper (pendle1/syd/spisebord kan ikke farve)
|
|
entity_id:
|
|
- light.pendle2
|
|
- light.raket
|
|
- light.panton
|
|
transition: 2
|