Automation + zoning + alexa tts

I created a stop where my wife picks me up from using zoning, i would like to put that into an automation, this is what i have so far, works without the second condition

- alias: Notification Test Weekly TTS
  initial_state: 'on'
  trigger:
    platform: time
    at: '10:42:00'
  condition:
    condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
    conditions: 
      - condition: template
        value_template: "{{ is_state('device_tracker.iphone') <> 'zone.pickup_time' }}"

Configuration invalidCHECK CONFIG

Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’]. Got None extra keys not allowed @ data[‘condition’][0][‘weekday’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None required key not provided @ data[‘condition’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 12). Please check the docs at https://home-assistant.io/components/automation/ Configuration invalidCHECK CONFIG

Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’]. Got None extra keys not allowed @ data[‘condition’][0][‘weekday’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None required key not provided @ data[‘condition’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 12). Please check the docs at https://home-assistant.io/components/automation/

Error im getting, instead of the time i would like to be based off the zone if possible, since the time can change

remove the conditions: line and then remove 2 spaces from the template condition. Also add a - to condition: time. Make sure -condtion: time and condition: template are at the same spacing level.

  initial_state: 'on'
  trigger:
    platform: time
    at: '10:42:00'
  condition:
    - condition: time
      weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
    - condition: template
      value_template: "{{ is_state('device_tracker.iphone') <> 'zone.pickup_time' }}"

Invalid config for [automation]: invalid template (TemplateSyntaxError: unexpected ‘>’) for dictionary value @ data[‘condition’][1][‘value_template’]. Got None
not a valid value for dictionary value @ data[‘condition’][1][‘condition’]. Got None
required key not provided @ data[‘condition’][1][‘entity_id’]. Got None. (See /config/configuration.yaml, line 12). Please check the docs at https://home-assistant.io/components/automation/

Didnt work, can i change the trigger for the zone?

also, that value template is suspect. device trackers states don’t ever contain a zones entity_id. Normally it displays a zones friendly name.

friendly_name: Pickup Time

what are you expecting <> to do?

Ideally when i arrive to the location (zone), during mon-friday i would like it to play my tts from alexa


  action:
    - service: notify.alexa_media
      data:
        target: 
          - media_player.everywhere
        #title: "My title for Echo show"
        data:
          type: announce
          #method: all
        message: "David is at College greens. Please pick him up"
- alias: xxx
  trigger:
    platform: state
    entity_id: device_tracker.iphone
    to: 'Pickup Time'
  action:
    service: notify.alexa_media
    data:
      target: 
      - media_player.everywhere
      data:
        type: announce
      message: "David is at College greens. Please pick him up"

to easy… i will report back Monday lol, thanks!

are you good with MQTT? I need help with that too lol

I’m not great with it. I’ve never used it but I have helped people set it up before.

how would i show the automation in a tab in home-assistant to show that its enabled?

go to the states page and you can view it there. If you want it in your interface, take a look at the Lovelace documentation and add the automation to the UI.

For future reference…

To the OP, I think what Petro meant was “what are you expecting the “<>” symbol to accomplish in the template”?

I’m going to anticipate the answer is to be something like “not equal to”. If that’s what you expected then the correct operator is “!=” (without the quotes).

example:
1 is not equal to 2 → {% if 1 != 2 %} …