bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
383 stars 90 forks source link

Calendar replacement #454

Closed tomlut closed 1 year ago

tomlut commented 1 year ago

Before you submit a new bug report, please check that

Write your question here

Sad to see that this integration is being depreciated as it made it very simple to create template binary sensors like this to control display of picture card reminders in my dashboards:

- name: "Garbage Today"
  icon: "mdi:trash-can"
  state: "{{ is_state('sensor.waste', '0') }}"

- name: "Garbage Tomorrow"
  icon: "mdi:trash-can"
  state: "{{ is_state('sensor.waste', '1') }}"

- name: "Recycling Today"
  icon: "mdi:recycle"
  state: "{{ is_state('sensor.recycling', '0') }}"

- name: "Recycling Tomorrow"
  icon: "mdi:recycle"
  state: "{{ is_state('sensor.recycling', '1') }}"

Assuming I created a local calendar with repeating dates for recycling and garbage collection, how would I update theses template binary sensors so that they continue to function?

bruxy70 commented 1 year ago

There is no need for the today templates in the local calendar, this is directly in the entity state. For tomorrow, you can trigger automations through events with offset.

tomlut commented 1 year ago

Events are of zero use when using conditional cards. I need an entity with a state.

bruxy70 commented 1 year ago

you can set an entity value with a trigger

tomlut commented 1 year ago

So triggered binary sensors.

Seems a lot less of an elegant solution, especially when events overlap, as I understand it, requiring seperate calendars.