Error in the package, can anyone help?

Can someone please help me find the error in the automation package? I’ve been looking at it all day and can’t see anything.
thank you a thousand times

automation:
  - id: telegram_menu
    alias: "Telegram Menu"
    description: ""
    initial_state: "on"
    trigger:
      - platform: event
        event_type: telegram_command
        event_data:
        command: /menu
        id: menu
      - platform: event
        event_type: telegram_command
        event_data:
        command: /menu1
        id: menu1
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /voda
        id: voda
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /elek
        id: elek
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_pokoj
        id: sv_pokoj
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_kuli
        id: sv_kuli
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_kuchyn
        id: sv_kuchyn
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_loznice
        id: sv_loznice
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_obyvak
        id: sv_obyvak
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_balkon
        id: sv_balkon
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_ch_strop
        id: sv_ch_strop
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_ch_zrcadlo
        id: sv_ch_zrcadlo
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_komora
        id: sv_komora
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_koupelna
        id: sv_koupelna
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_k_balkonu
        id: sv_k_balkonu
      - platform: event
        event_type: telegram_callback
        event_data:
        command: /sv_wc
        id: sv_wc
    condition: []
    action:
      - choose:
          - conditions:
              - condition: trigger
                id: menu
            sequence:
              - service: notify.ha_dubak_bot
                data:
                  message: HOME ASSISTANT
                  inline_keyboard:
                    - Dnešní spotřeba vody:/voda
                    - Dnešní spotřeba elektřiny:/elek
                    - Rozsvítit v pokoji:/sv_pokoj_on
                    - Zhasnout světlo v pokoji:/sv_pokoj_off
          - conditions:
              - condition: trigger
                id: menu1
            sequence:
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: voda
            sequence:
              - service: notify.ha_dubak_bot
                data:
                  message: " Dnes se spotřebovalo {{ states('sensor.denni_spotreba_vody') }} litrů vody"
          - conditions:
              - condition: trigger
                id: elek
            sequence:
              - service: notify.ha_dubak_bot
                data:
                  message: >-
                    Dnes se spotřebovalo {{
                    states('sensor.l123_spotreba_denni_kwh_nt') }} kWh v nízkém
                    tarifu
              - service: notify.ha_dubak_bot
                data:
                  message: >-
                    a ve vysokém tarifu {{
                    states('sensor.l123_spotreba_denni_kwh_vt') }} kWh
          - conditions:
              - condition: trigger
                id: sv_pokoj
            sequence:
              - service: light.toggle
                target:
                entity_id: light.sv_stmivac_pokoj
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_kuli
            sequence:
              - service: light.toggle
                target:
                entity_id: light.sv_kuchyn_linka_spodni
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_kuchyn
            sequence:
              - service: light.toggle
                target:
                entity_id: light.sv_kuchyn_strop
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_loznice
            sequence:
              - service: light.toggle
                target:
                entity_id: light.sv_stmivac_loznice
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_obyvak
            sequence:
              - service: light.toggle
                target:
                entity_id: light.sv_stmivac_obyvak
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_balkon
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_balkon_t_h
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_ch_strop
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_chodba_strop
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_ch_zrcadlo
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_chodba_zrcadlo
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_komora
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_komora
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_koupelna
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_koupelna
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_k_balkonu
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_na_balkon_a_dvere
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}
          - conditions:
              - condition: trigger
                id: sv_wc
            sequence:
              - service: light.toggle
                target:
                entity_id: light.svetlo_wc
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 1
                  milliseconds: 0
              - service: script.telegram_ha_bot
                data: {}

děkuji

You really need to give more info.

why do you think there is an error? is there an error message somewhere? if so then what is the error?

If not then what isn’t working?

is that the only automation in the file?

did you create it with the automation editor UI?

there is probably an error in the line padding
Automation is largely made up of in a package.
If you copy it to the user interface, you can’t save it.
The error message is when I integrate it using a package, but it seems to work properly even if it reports an error.

Here is the error and my config:

Detaily logování (CHYBA)
Logger: homeassistant.config
Source: config.py:929
First occurred: 13:44:59 (1 occurrences)
Last logged: 13:44:59

Invalid config for [script]: expected a dictionary. Got OrderedDict([('default_config', {}), ('automation', [OrderedDict([('id', '1641408259807'), ('alias', 'Přepínání tarifů - NT-VT-old'), ('description', ''), ('trigger', [OrderedDict([('type', 'turned_on'), ('platform', 'device'), ('device_id', '305e79c4ff1d1a1d7fb4f8550a1a04bb'), ('entity_id', 'binary_sensor.switch1'), ('domain', 'binary_sensor'), ('id', 'bshdoon')]), OrderedDict([('type', 'turned_off'), ('platform', 'device'), ('device_id', '305e79c4ff1d1a1d7fb4f8550a1a04bb'), ('entity_id', 'b.... (See /config/configuration.yaml, line 2).
default_config:
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
group: !include groups.yaml
http:
homeassistant:
  packages: !include_dir_named all_package
  customize: !include customize.yaml
tts:
  - platform: google_translate
    language: "cs"
frontend:
  themes: !include_dir_merge_named themes
spotcast:
  sp_dc: !secret sp_dc
  sp_key: !secret sp_key
  country: cz #optional, added in 3.6.24
home_connect_alt:
  client_id: !secret hc_id
  client_secret: !secret hc_secret
#bluetooth:
device_tracker:
  - platform: 

Seems that that automation causes an error.

it looks as if you have tried to enter everything above under a ‘script’ header somewhere.

Invalid config for [script]: expected a dictionary. Got OrderedDict([('default_config', {}),.....

If they remove the automation, they will report a different error.
Somehow, automations from automations.yaml and from the package collide.
If I don’t let the package load into HA everything is fine.

When I try to create an automation in the UI by pasting yaml, the automation cannot be saved and an error is reported:

Message malformed: expected a dictionary for dictionary value @ data['action'][0]['choose'][4]['sequence'][0]['target']

Do you really have no platform defined or is this just a copy thing?

You were right, several indentations are wrong. Check all light actions

Check the docs: Configuration Samples:

Yes. Thank you. I am finally flawless.