I have this automation to turn on light depending the sun elevation, but only the first sequence is triggered and none of the following is activated. Where i am wrong?
- id: Luci Salotto
alias: Accensione Luci Salotto
trigger:
- platform: state
entity_id: sun.sun
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: 0.5
sequence:
- service: notify.mobile_app_sm_g955f
data:
message: Il Sole sta per tramontare, ho acceso le luci
title: HomeAssistant
data:
ttl: 0
priority: high
- service: light.turn_on
entity_id:
- light.hue_color_candle_1
- light.hue_color_candle_2
data:
profile: 'sunset'
transition: 15
brightness_pct: '50'
- service: light.turn_on
entity_id:
- light.hue_play_1
- light.hue_play_2
data:
profile: 'sunset_in_forest'
transition: 15
- service: light.turn_on
entity_id: light.led_salotto
- service: light.turn_on
entity_id: light.led_salotto_verde
- service: automation.turn_on
entity_id: automation.qualcuno_a_casa_accendi_luci
- conditions:
- condition: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: -8
sequence:
- service: notify.mobile_app_sm_g955f
data:
message: Tramonto, accendo le luci
title: HomeAssistant
data:
ttl: 0
priority: high
- service: light.turn_on
entity_id:
- light.hue_color_lamp_2
- light.hue_color_lamp_1
- light.hue_color_lamp_3
- light.yeelight_5
data:
profile: reading
transition: 20
- service: light.turn_on
entity_id:
- light.hue_play_1
- light.hue_play_2
data:
profile: movie
transition: 20
brightness: 150
- service: light.turn_off
entity_id:
- light.hue_color_candle_1
- light.hue_color_candle_2
data:
transition: 20
- service: light.turn_on
entity_id:
- light.yeelight_6
data_template:
transition: 15
brightness: 255
rgb_color:
- '{{ (range(0, 255)|random) }}'
- '{{ (range(0, 255)|random) }}'
- '{{ (range(0, 255)|random) }}'
- service: switch.turn_on
entity_id: switch.plug_158d0002115042
- conditions:
- condition: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: -47.53
sequence:
- service: light.turn_on
entity_id:
- light.hue_color_lamp_1
- light.hue_color_lamp_2
- light.hue_color_lamp_3
- light.yeelight_5
data:
profile: home
transition: 20
- service: light.turn_off
entity_id:
- light.hue_color_candle_1
- light.hue_color_candle_2
data:
transition: 20
- service: light.turn_on
entity_id:
- light.hue_play_1
- light.hue_play_2
data:
profile: movie
transition: 20
brightness: 120
- conditions:
- condition: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: -54.64
sequence:
service: script.scena_luci_tv
default: []
mode: single