I have this, and this works
script:
- id: screen_light
mode: restart
then:
# Zet de backlight aan bij aanraking
- lvgl.resume:
- light.turn_on:
id: backlight
brightness: 75%
transition_length: 2s
# Controleer of het 'night mode' is
- if:
condition:
lambda: 'return id(night_mode);'
then:
# Schakel backlight na 30 seconden weer uit als het nacht is
- delay: 30s
- light.turn_off: backlight
- delay: 15s
- lvgl.page.show:
id: clock_page
When I extend it with an extra id for a new additional script it fails
script:
- id: screen_light
mode: restart
then:
# Zet de backlight aan bij aanraking
- lvgl.resume:
- light.turn_on:
id: backlight
brightness: 75%
transition_length: 2s
# Controleer of het 'night mode' is
- if:
condition:
lambda: 'return id(night_mode);'
then:
# Schakel backlight na 30 seconden weer uit als het nacht is
- delay: 30s
- light.turn_off: backlight
- delay: 15s
- lvgl.page.show:
id: clock_page
- id: debounce_increment
alias: "Debounce Increment"
sequence:
- delay: '00:00:02'
- service: input_number.increment
data:
entity_id: input_number.house_temperature_setpoint
I get this error
Failed config
script: [source ha-panel.yaml:1719]
'id' is a required option for [script].
-
Unable to find action with the name 'id'.
id: screen_light
mode: restart
then:
- lvgl.resume: {}
- light.turn_on:
id: backlight
brightness: 75%
transition_length: 2s
- if:
condition:
Any idea how to add extra scripts