Simple automation query

I still new to these automatons but im getting there…

What im looking to do is when the wife arrives home, if i have a “reminder” switch turned on to turn on a lamp… The rule does not seem to trigger so i am getting something wrong… the device tracking is done via icloud and that does know when we are home or not.

  • alias: Reminder Automation Test
    trigger:
    platform: zone
    entity_id: device_tracker.laurasiphone
    zone: zone.home

    Event is either enter or leave

    event: enter
    condition:
    platform: state
    entity_id: input_boolean.home_reminder
    state: on
    action:
    service: switch.turn_on
    entity_id: switch.lamp_switch

Many thanks in advance
Lee

It is indented properly btw…

Suppose you are using the friendly name (device_tracker.laurasiphone).
I had in the past issues with the friendly name.
Try it using the “unfriendly” name from known_devices.

that is the “unfriendly name”

Thank you for suggestion though…

OK
This is a working example. Perhaps you can use it as basis and modify it to your need.

  • alias: “Away, turning Cam on”
    trigger:
    platform: state
    entity_id: device_tracker.fa79210d45ca4eeeeece550614fd4d2d
    state: ‘not_home’
    condition: use_trigger_values
    action:
    service: homeassistant.turn_on
    entity_id: switch.D_Link_DCS_5020L_Switch

Try quoting the state: on from your condition, and your alias name, just to try.

Ty, will try this tomorrow

- alias: Reminder Automation Test
trigger:
   - platform: zone
     entity_id: device_tracker.laurasiphone
     zone: zone.home
     event: enter
condition:
     platform: state
     entity_id: input_boolean.home_reminder
     state: on
action:
   - service: switch.turn_on
     entity_id: switch.lamp_switch

Does your entry look like the above in your automation.yaml ?