Help automatio with alexa

and why if I as a trigger put the door sensor instead of the state of the area, everything works?

No clue. It’s your system, you’ll have to look at the logs and see why this is happening. It could be anything. I just read the docs and the correct inputs for ‘method’ are ‘all’ or ‘speak’, not ‘spoken’.

now it worked, thanks to all of you guys

- alias: ritorno a casa
  trigger:
    - platform: zone
      entity_id: 
      - person.federico
      - person.serena
      event: enter
      zone: zone.home
  condition: []
  action:
    - wait_template: "{{ is_state('binary_sensor.porta_ingresso', 'on') }}"
      timeout: '00:30:00'
      continue_on_timeout: 'false'
    - delay:
        seconds: 5
    - service: scene.turn_on
      entity_id: scene.rientro_a_casa
    - service: script.turn_on
      data:
        entity_id: script.rientro_a_casa

e lo script

rientro_a_casa:
  alias: "Rientro a casa"
  sequence:
  - service: notify.alexa_media
    data_template:
      target:
        - media_player.alexa_echo_dot
      data:
        type: announce
        method: speak
      message: "Bentornato a casa. La temperatura esterna è di {{states('sensor.dark_sky_temperature')}} gradi. 
        Le previsioni meteo sono {{states ('sensor.dark_sky_hourly_summary') }}."

another question. I would like to make sure that the welcome messages are personalized, that is, if I refer to me, if my wife enters, she refers to her, while if we enter together she refers to both of us … I did 3 automations but she two always leave when we get back together. Can you help me figure out where I’m wrong?

# ritorno a casa della famiglia con benvenuto personalizzato
- alias: ritorno a casa famiglia
  trigger:
    - platform: state
      entity_id: 
      - group.device_status
      from: 'not_home'
      to: 'home'
      # event: enter
      # zone: zone.home
  condition:
    - condition: state
      entity_id: group.device_status
      state: 'home'
  action:
    - wait_template: "{{ is_state('binary_sensor.porta_ingresso', 'on') }}"
      timeout: '00:30:00'
      continue_on_timeout: 'false'
    - delay:
        seconds: 5
    - service: scene.turn_on
      entity_id: scene.rientro_a_casa
    - service: script.turn_on
      data:
        entity_id: script.ritorno_a_casa_famiglia

# ritorno a casa serena con benvenuto personalizzato
- alias: ritorno a casa serena
  trigger:
    - platform: zone
      entity_id: 
      - person.serena
      event: enter
      zone: zone.home
  condition:
    - condition: state
      entity_id: person.serena
      state: 'home'
  action:
    - wait_template: "{{ is_state('binary_sensor.porta_ingresso', 'on') }}"
      timeout: '00:30:00'
      continue_on_timeout: 'false'
    - delay:
        seconds: 5
    - service: scene.turn_on
      entity_id: scene.ritorno_a_casa
    - service: script.turn_on
      data:
        entity_id: script.ritorno_a_casa_serena

# ritorno a casa federico con benvenuto personalizzato
- alias: ritorno a casa federico
  trigger:
    - platform: zone
      entity_id: 
      - person.federico
      event: enter
      zone: zone.home
  condition:
    - condition: state
      entity_id: person.federico
      state: 'home'
  action:
    - wait_template: "{{ is_state('binary_sensor.porta_ingresso', 'on') }}"
      timeout: '00:30:00'
      continue_on_timeout: 'false'
    - delay:
        seconds: 5
    - service: scene.turn_on
      entity_id: scene.ritorno_a_casa
    - service: script.turn_on
      data:
        entity_id: script.ritorno_a_casa_federico