I’m trying to get my outside light on when I’m arriving to home and sun is below horizon.
This one code below works ok otherwise but for some reason mobile phone location isn’t so accurate that when I’m arriving home it shows few kilometres earlier that I’m at home and then away ( even my radius is 100m ). This makes my lights going on and off and normally those are off when I’m at my yard.
I read somewhere that I could set trigger e.g. for 15 minutes from first state change.
I tried second code but it’s not working, thought it’s not giving me any errors.
Could someone advise what I’m doing wrong ?
I think the issue may be that your device tracker is not in state “away” when you are not home, but rather showing the zone you are in as a state. Can you check the state of the device tracker under Developer Tools -> States when you are not home.
Just realised that this is not what I’m searching. This will trigger my lights on AFTER specified minutes when I’m at home. My plan was get trigger immediately for 15min when I enter home zone. Even I would be out of home zone some minutes and arrive again ( when I’m really at home ).
Maybe timer is solution for my problem, I need to dig more for correct solution.