I installed the FordPass integration and can see all of the entities. The one I’m interested is fordpass_doorlock. My idea for my automation is that if the state of the door lock is unlocked after 9PM and the vehicle is in my home zone and the ignition is off, then the door will lock. I was trying an if/then automation, but I can’t figure out what action to choose to be able to toggle the door lock. I have the button available on my home screen, I just don’t know what the action is called to trigger it.
if:
- condition: state
entity_id: lock.fordpass_doorlock
state: unlocked
- condition: zone
entity_id: sensor.fordpass_gps
zone: zone.home
then:
- condition: state
entity_id: lock.fordpass_doorlock
state: locked
Thanks. I’m seeing this error so maybe there is a numeric value to locked and unlocked?
2022-10-09 22:01:00.012 ERROR (MainThread) [homeassistant.components.automation.carlock9pm] CarLock9PM: Error executing script. Unexpected error for if at pos 1: must be real number, not str
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.