I was trying to get a easy tracker for my home taking advantage of homekit integration, i managed to do it through input booleans exposed to apple home app, everything works flawlessly, but when i do a restart o reload automations, the tracker turn not_home and i have to trigger manually to recover the previous states, even though the inputs booleans do saves their states. Any suggestions? This is my automation so far
alias: 'Homekit tracker '
description: ''
trigger:
- platform: state
entity_id: input_boolean.alexis
- platform: state
entity_id: input_boolean.stefany
condition: []
action:
- service: device_tracker.see
data:
dev_id: '{{ trigger.to_state.object_id }}'
location_name: '{{ ''home'' if trigger.to_state.state == ''on'' else ''not_home'' }}'
mode: single
Im sorry about my mistake I just tag him because he was really helpful when i started asking for an automation. I should read again the rules, I delete the tag btw thanks for point that
There are hundreds or even thousands of nice and competent people here in the forum Point your questions/support requests to all of them rather than to a single person and you’ll multiply the chances to find the answers you are seeking for.
Sorry, I really should have read your question a bit more carefully. My solution will work if you use two separate animations, one for each entity, and hard-code the dev_id into the action rather than using that template.
Alternatively, you could run a separate startup animation that toggles each of the input_booleans twice.
…and then a similar one for Stefany. The id is just a unique string: I use a UUID4 from here. By including it, you can access the automation traces in the UI.
Your location_name template structure was fine, but I’ve included an alternative here, as I’d write it.