If you paste the entire template into the Template Editor, it will tell you which entities it will listen to for state-changes. For example, here is your corrected template and it indicates that it will listen to calendar.graue_tonne and sensor.date_time.
Hi ,
Thanks for this fantastic tutorial , I’ve implement this this day.
I have a question about this , for now I have state of sensors in entity card and I want to know If it’s possible to display remaining time instead ?
I followed this guide to set up binary sensors that occurred at specific times during a meeting and after a meeting as opposed to before. This worked well for firing off events/automations during the window of the meeting, but I couldn’t get it to work for when the meeting was over (e.g., Airbnb calendar shows end of meeting as midnight day of checkin vs. checkout which is at 10:00 AM so the meeting is already over).
Not sure if the most elegant solution, but I ended up doing the following:
Google calendar that turns on when reservations starts. For Airbnb this starts at midnight day of checking.
When this turns I have an automation that creates a new calendar event on a separate Airbnb Checkin/Checkout calendar to create point in time calendar events for when I want to trigger things (e.g,: set Ecobee to home to 2 hours prior to check-in so Airbnb is comfortable and set Ecobee to away after checkout to save on heating/cooling costs).
I used the attributes of the original Airbnb calendar to set the new start/end times of the newly created checkin/checkout events like so by adding the appropriate number of hours to the start/end times that align with my actual check-in/checkout times
Instead of creating a google calender and importing the .ics file manually on an annual basis do this instead:
For this to work your city or location must provide a recollect.net URL for creating and updating your google calendar. Once you “add” the url your waste calendar will stay current always. So for example cities like Vancouver, Edmonton, Calgary, Saskatoon, Ottawa (and many USA cities) use the recollect.net system.
Locate your waste collection calendar provided by your city. Should look something like this:
Type your address in and should find the calendar for your address.
3. Click on “get a calendar”. At this point should be prompted for calendar type; select “Add to google calendar”. You should see:
.
4. Copy the URL .
5. Open google calendar and on the right hand side click the “+” by “other calendar”. Select the option “from URL”.
6. Copy/paste URL and done.
7. Make sure the new waste calendar is selected.
8. Follow steps for Google calendar intergration as outlined in the above HOW-To by Matthias,
9. Your waste calendar and sensors should now show up in home assistant. Something like this:
Just wanted to say Thanks for this tutorial… it gave me some ideas to get my own sensor up and running.
My garbage collection agency doesn’t offer an online calendar and only holidays that fall Mon-Thur affect collection. Luckily, they take the same 5 holidays off every year… and all of those holidays are available through Google’s “US Holidays” calendar. I used the Google Calendar Events integration to create a calendar for each of those holidays and then put them in a group.
The following trigger-based binary sensor runs on Sunday evenings to determine if the next active holiday from the group is this week and if it will affect collection:
template:
- trigger:
- platform: template
value_template: >-
{{ (is_state('sensor.time', '19:00')) and (is_state('sensor.today_is', 'Sunday')) }}
binary_sensor:
- name: "Weekly Trash Holiday Check"
state: >-
{%- for s in expand('group.trash_holiday_calendars') | sort(attribute="attributes.start_time") | selectattr('state', 'eq', 'off') | list %}
{%- if loop.first %}
{%- set start = state_attr(s.entity_id,'start_time')|as_datetime|as_local %}
{%- set full_days_til = (start - now()).days %}
{{ ( 3 >= (full_days_til | int) >= 0) and (start.strftime("%A") is in ["Monday","Tuesday","Wednesday","Thursday"]) }}
{%- endif %}
{%- endfor %}
I then use this as a condition in any of my notification automations or other sensors.
Is it possible to have the search be more explicit? I am splitting a calendar based on two searches - “Trash” and “Recycling and yard waste”. However, every once in a while these happen to line up on the same day, which causes an entry for “Trash, recycling and yard waste” to be listed on both calendars. Ideally, I’d like to split this off into a separate 3rd calendar.
I was looking for one and i am glad i found this, i don’t use google calendar, my township have the .ics calendar and i subscribed to it so i have the calendar.recycle on my HA. the recycle items show 6:00am every other week on Mon.
I did the binary_sensor as you mentioned, and no errors so far, i do see the sensor under developer tools. now i want to do the automation in node-red (as i use for others). how do i go about it, what do i expect to happen, also mine is a calendar subscribed from internet i have no way of adding test event entries so i can test it. I wish to do a sensor that shows me how many days is left for this binary_sensor to turn on.
So google_calendars.yaml doesnt get created anymore or at least not in config folder. anyone have an idea where it is now located? my automations work well but I would like a sensor to display whats coming up, green, red or yellow bins