Malformed required key not provided @ ['zone']

Hello everyone,

I am new here and am trying to make a !(upload://oErUwlSZ8lQA9LrhpL2noyJMcFD.png) automation but keep getting this error: malformed required key not provided @ [‘zone’]! Is there anyone who can tell me what I’m doing wrong?


It’s much easier to work with code not images :wink:

That said, it looks like you forgot to include the zone you want to trigger the automation. All you’ve said is that you want the automation to trigger when the device tracker enters …

Have you set up some zones yet?
Otherwise there’s nothing to tell the device tracker whether your entering anywhere

Ok, Thank you, I already found the problem !!
But not everything works. I am now trying not only to receive a message on my iPhone, but also to send a message to my sonosbox in the kitchen. This does not work and yet I think I have entered the correct code. Can someone help me with this? The code I wrote is the following:

alias: Bart Verlaat App
description: ‘’

  • platform: device
    device_id: bccf45729e366782248a32aa35c37494
    domain: device_tracker
    entity_id: device_tracker.bart_s_iphone_10_s
    type: leaves
    zone: zone.prive_huis
    condition: []
  • device_id: bccf45729e366782248a32aa35c37494
    domain: mobile_app
    type: notify
    message: Bart Vertrek van huis
    title: ‘’
  • service: script.sonos_say
    sonos_entity: media_player.dining
    volume: 1
    message: Hallo
    delay: ‘00:00:05’
    mode: single

Thanks for your help and response! :innocent: :innocent: :innocent:

And this is the script:

alias: “Sonos TTS script”

  • service: sonos.snapshot
    entity_id: “{{ sonos_entity }}”
  • service: sonos.unjoin
    entity_id: “{{ sonos_entity }}”
  • service: media_player.volume_set
    entity_id: “{{ sonos_entity }}”
    volume_level: “{{ volume }}”
  • service: tts.google_translate_say
    entity_id: “{{ sonos_entity }}”
    message: “{{ message }}”
  • delay: “{{ delay }}”
  • service: sonos.restore
    entity_id: “{{ sonos_entity }}”

Unfortunately you forgot to use the code markup :wink:

Please see the sticky post for more details. In short you can edit your post, select the code, and push </> to mark a block of code.