So I have the trash pickup schedule based on a google calendar. It was working fine for the last 2 years but I’ve recently updated my hardware and I’ve found that the sensors I had created do not work anymore. The calendar tab on the side does show the calendar so this post has been a dead end. I’ve also looked into the solution for this post and it hasn’t helped.
Here’s an example of one of these sensors:
general_trash:
friendly_name: 'General Trash'
icon_template: mdi:trash-can
value_template: >
{% set start_time = states.calendar.rest_waste.attributes.start_time %}
{% set pickupday = strptime(states.calendar.rest_waste.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A") %}
{% if as_timestamp(start_time) > (as_timestamp(now()) + 86400) %}
{{ ((as_timestamp(start_time) - as_timestamp(now())) / 86400) | float | round(0, 'ceil') }} days
{% elif as_timestamp(start_time) > as_timestamp(now()) %}
Tomorrow
{% elif (as_timestamp(start_time) - as_timestamp(now())) > -86400 %}
Today
{% else %}
Unknown
{% endif %}
I cannot remember if the state attributes for rest_waste
had a start_time
, but when I check the dev tools, I only see offset_reached
and friendly_name
. There should be more available according to the Documentation, though.
Has anyone had a similar issue or can help me troubleshoot this?