Script multiple id fails?

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

It looks like you mixed esphome scripts with home assistant ones

OK the second part than? But how is such like this than in esphome format?

What I try to accomplish is that change the temp in a widget if the widget is not changed for 2 seconds, that than it will execute to Home assistant

              widgets:
                - button:
                    align: CENTER
                    width: 110
                    height: 35
                    #x: 0
                    y: -60
                    checkable: false
                    widgets:
                      - label:
                          text_font: roboto24
                          text: "+"
                          align: CENTER
                    on_release:
                      - homeassistant.service:
                          service: input_number.increment
                          data:
                            entity_id: input_number.house_temperature_setpoint

Something like that

script:
### First script

  - id: debounce_increment
    then:
      - delay: 2s
	  - homeassistant.action:
		  action: input_number.decrement
		  data:
			entity_id: input_number.house_temperature_setpoint
1 Like