Hi all,
I’m new to this with home automation and specially Home assistant. But now i have a slight problem with my zone script or automation that use the zone.
When i arrive home and get connected with my Wifi network my status change from Away to home. But that will not trigger the door lock. When i trigger my automation manually it works. The door locks or unlocks as it should.
EDIT: I was only allowed to upload only one picture this time.
It would be good to insert your code as text and format it as code - see that blue box at the very top of the page.
Even if it might not be strictly necessary, I always use lower case letters and single quotes '.
The states of the device trackers are called home and not_home.
The ‘service’ line might need to be intended another two spaces.
The ‘-’ before the entity_id is not required, neither is the one before ‘data’…
Here is an automation that works fine for me:
- alias: Actions when people come home
trigger:
platform: state
entity_id: group.people
to: 'home'
action:
# Action 1 - Turn CPump on immediately
- service: homeassistant.turn_on
entity_id: switch.mplug2
P.S.:
I prefer to enter my automations in the yaml files directly rather then through the frontend - I can ensure that it’s all in the logical sequence I’m use to seeing it (alis - trigger - condition - action) rather than having it all displayed in a random order. But that might just be the German in me
Thank you all for your answers. I still have problem with the trigger when i’m home or away. It’s strange.
Picture 1 shows when I’m home or away, and it works. The info get HA from my router when the mobile connects to wifi network or disconnects.
I use Hass.io on a Raspberry Pi 3.
I have tried with zone and now i try with “state”. Nothing trigger my lock. But as i wrote above, when i trigger the automation manuel it works.
So far i only use the frontend and do som small changes in yaml-file.
@anon43302295
I have tried with and without quotes but still no luck. I have changed everything to lowercase.
@chairstacker
I don’t have “entity_id: group.people” so that i can’t try.
You forgot to format that as code, so we can see what you’ve done. Please read the big blue box at the top of every page on the forum - select your text and select </>.