Tyfoon
(@Tyfoon)
February 1, 2017, 12:46pm
1
I have an automation that send my wife a notification if I leave my work and head for home. As such (after a lot of testing) I finally have this working.
Basically it triggers hen I’m not at zone work and distance from home is <20 km and I’m heading towards. It then sends the notification that includes the Google travel time.
My issue: Although the proximity seems correct the Google travel time is still behind significantly.
Is there any way I can het the travel time to update more frquently or even better, to update at the moment it triggers?
Tyfoon, did you get anywhere with this?
I have experienced the same issue, the proximity seems to be more accurate that the Google Travel Time.
I use a combination of both with Google Travel Time used when I depart as a guesstimate of the arrival time and then the proximity as a warning just before I arrive home.
EchoWisky
(Erik Wachters)
July 24, 2017, 12:40pm
5
Hello,
Can you post your automation?
I have a problem while using proximity in a condition:
condition: or
conditions:
condition: template
value_template: ‘{{ states.proximity.phone_home < 5 }}’
condition: template
value_template: ‘{{ states.proximity.phone_home == “not set” }}’
I want to send a message only when phone is less then 5km from home or “not set” but it’s not working for some reason.
E.
Tyfoon
(@Tyfoon)
July 24, 2017, 7:09pm
6
I could not get this to work with templates in the automation so I first created sensors and then the automation:
Added below to my binary_sensors.yaml:
- platform: template
sensors:
enroute:
friendly_name: enroute
value_template: '{{(states.proximity.home.state | float) <= 20 }}'
- platform: template
sensors:
towards:
friendly_name: towards
value_template: '{{ states.proximity.home.attributes.dir_of_travel == "towards" }}'
Then created an automation:
- alias: "Going home from work"
trigger:
- platform: state
entity_id: binary_sensor.enroute
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.towards
state: "on"
action:
- service: notify.mypushover
data:
title: "Attention"
message: "XX has left work. Traveltime incl. traffic estimated at {{states('sensor.XX_to_home')}} min"
target: ""
This is working fine beside the issue mentioned in the first post.
huuub
(Jeroen Houben)
January 30, 2019, 6:16pm
7
This is a big part of what I want to do to to put the heating on and off at home. Did it work?
huuub
(Jeroen Houben)
January 30, 2019, 6:23pm
9
Is it still the same setup? I am quite new to it.
How do you link the google travel time?
Tyfoon
(@Tyfoon)
January 30, 2019, 9:47pm
10
It’ some time ago so I do my best:
First you need to setup zones (in configuration.yaml) and need a device tracker with GPS support (I use owntracks).
Then setup the sensor:
- platform: waze_travel_time
name: xxxx To Home
origin: device_tracker.owntracks_owntracks
destination: zone.home
region: 'EU'
and:
- platform: template
sensors:
towards:
friendly_name: towards
value_template: '{{ states.proximity.home.attributes.dir_of_travel == "towards" }}'
- platform: template
sensors:
enroute:
friendly_name: enroute
value_template: '{{(states.proximity.home.state | float) <= 20 }}'
And automation:
- alias: "xxxx going home from work"
trigger:
- platform: state
entity_id: binary_sensor.enroute
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.towards
state: "on"
action:
- service: notify.mypushover
data:
title: "Attention"
message: "xxxx has left work. Traveltime incl. traffic estimated at {{states('sensor.xxxx_to_home')}} min"
target: ""
1 Like