This here is my configuration.yaml and here is the error I get when checking config via settings menu:
I am sure it´s just a completely simple newbie-mistake -.-
Integration error: cal_title - Integration ‘cal_title’ not found.
Integration error: cal_start_time - Integration ‘cal_start_time’ not found.
Integration error: cal_location - Integration ‘cal_location’ not found.
edit: and if I put 2 spaces in front of all the lines the error is:
Invalid config for [google]: [cal_location] is an invalid option for [google]. Check: google->google->cal_location. (See /config/configuration.yaml, line 19).
edit2: the g-cal.yaml seems to be fine since in dev options I can view my next calendar event:
was missing at the top… told you I am a total noob ^^
Now I am met with another and hopefully last issue:
The location gets read from my calendar same as it is input “Street X, ZipCode City” = sensor.cal_location
When I try to feed this to travel time I get no result, the only way to receive a travel time is if I manually input coordinates for the destination.
I also tried different ways to spell out the location “City, Country” / “street city country” etc. but the only thing that works is coordinates.
What exactly am I doing wrong here? Doest travel_time not work with “clear text” addresses?
@eifinger thanks, if it wasnt for you I would have kept looking for mistakes
@febo7011 thanks again for all the time you put into this awesome walkthrough, I am pretty sure I can get this to work as soon as travel time is fixed.
Since your writeup is so detailed it would be great to have it linked somewhere so other people can find this easier.
daKazze
Yes now for the release 2022.2.x not work well.
This is the reason for this Post.
I’m waiting for the solution but to have this procedure ok now in my HA I leave the release 2021.12.9.
I will install the new releases 2022.2.x only when the problem will be solved.
I am happy that you like my solution.
I use it every day and it wakes me up in my bedroom in the morning.
Hey, I am sorry to bother you again but since travel time is fixed now I finally implemented the full solution but there seems to be an issue somewhere with the math…
My travel time sensor is “sensor.arbeitsweg” and when checked it reports the correct travel time in minutes. I copied your config and just changed a few names here and there.
The problem is that the “calc” sensors dont seem to substract the travel time that is provided by the travel time sensor.
For example: Prep time is set to 15min, my appointement is at 18:00, It is a 50min drive to get there and the sensor.calc_prep_time reports 17:45.
It´s the same for the other 3 calc sensors. So it does not substract the travel time as it should.
Since I am facing a few issues right now I would like to clear my error log:
Every time I dont have an appointment coming up that has a location specified I am getting several errors for the travel time sensor and the calcs because the location parameter is empty.
Is there anything I can do to avoid this?
And I am even getting an error when I have a “working” calendar event:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1286
First occurred: 12:35:44 (18 occurrences)
Last logged: 14:15:41
Template warning: 'int' got invalid input 'unknown' when rendering template '{{ ((as_timestamp(states.calendar.xxx_gmail_com.attributes.start_time) - (states.sensor.arbeitsweg.state | int * 60) - (states.abfahrtszeit.state | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M") ) }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'int' got invalid input 'None' when rendering template '{{ ((as_timestamp(states.calendar.xxx_gmail_com.attributes.start_time) - (states.sensor.arbeitsweg.state | int * 60) - (states.abfahrtszeit.state | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M") ) }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'int' got invalid input 'unknown' when rendering template '{{ ((as_timestamp(states.calendar.xxx_gmail_com.attributes.start_time) - (states.sensor.arbeitsweg.state | int * 60) ) | timestamp_custom("%Y-%m-%d %H:%M") ) }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'int' got invalid input 'unknown' when rendering template '{{ ((as_timestamp(states.calendar.xxx_gmail_com.attributes.start_time) - (states.sensor.arbeitsweg.state | int * 60) - (states.input_number.vorbereitungszeit.state | int * 60) ) | timestamp_custom("%Y-%m-%d %H:%M") ) }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'int' got invalid input 'unknown' when rendering template '{{ ((as_timestamp(states.calendar.xxx_com.attributes.start_time) - (states.sensor.arbeitsweg.state | int * 60) - (states.input_number.vorwarnzeit.state | int * 60) ) | timestamp_custom("%Y-%m-%d %H:%M") ) }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1
BUT everything works… I get the correct values from these sensors…
Hi, to avoid these errors I use the event filtered with a specific keyword.
In my case is Rem.
And when I insert a Meeting to manage with the automation I insert the keyword and the position.
But I have the possibility to insert in my calendar some other meeting without the keyword and position not managed from the automation.
If I want to manage a remainder without a position (Ex. do pizza) I insert my house address in the meeting position. In this case the travel time is zero, but all the automation work well.
How to set the keyword you can check in the previous message there is the setting for the calendar.
search: “Rem.” is used to extract only the meeting that has in the title the keyword.
Ex. Work Rem.
Ex. Dinner with friends Rem.
Rem. for me stay for Reminder, but you can choose your keyword.
If the calendar meeting hasn’t the keyword, home assistant skip the meeting.
Thank you again mate, I set up the search and that works but I usually schedule my work a few days in advance so I often dont have any upcoming events at all and so I get errors because all is blank.
I just realized that I could set up a weekly reoccurring event in my calender that has an address but this would not really be a clean solution and produce a wrong alert every week.
When you insert a planning event without an address you can avoid inserting the keyword. When you have the detailed address and you update the event you can insert also the keyword.
Or you can insert your home/office address like a default address. In this way, you have travel time 0 without error.
When you have the address you can update the event with the real address.
Or you can insert only the city name at the beginning.
Does Google Travel Time integ work for everyone? I cannot add it all, I follow the instructions, I enable the Distance Matrix API, I get the API key, yet I always get “Failed to connect” while adding the integ. HA 2022.6.5.