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

Features in local calendar #463

Closed Protoncek closed 1 year ago

Protoncek commented 1 year ago

Before you submit a new bug report, please check that

Write your question here

Hi! I'm very sad for end of support for this card... i'm exploring HA's "local calendar", but first impressions are that not all features of your card are there... one of them is this: i can only see event, which will trigger first, not others (in 'calendar.my_calendar' sensor). An example: i have three containers: yellow, brown and black. With your addon i can see days until "trash removal" for all three, with local calendar i can only see days for container which comes next... As usuall in HA documentation, original "local calendar" is explained very scarse in HA... is there any way to see similar with local calendar?

bruxy70 commented 1 year ago

I think you can see all of them in the calendar. If this is something that is needed, I am quite sure that sooner or later someone will make a script for that. But I do not think they are available in any entity state at this moment.

Protoncek commented 1 year ago

Yes, i can see them, correct, but i can’t expose them into cards. I guess i’ll dig some more on gogole to see if any solution has come up. I did find an addon, but it’s only for google calendar, not local one. thanks!

AngloYorkshire commented 1 year ago

I am very upset to see this removed - wish it could have just stayed there. This was a great way showing when your garbage was due especially with the pictures. I hopethe same sort of thing can be done with a calendar and showing the picture change colour as well as showing how many days to go. So disappointed :-(

bschatzow commented 1 year ago

I agree that it is more difficult now but understand the reason it was removed. Now we need to figure out how to get the same results a different way. So far, I am not close.

Electronlibre2012 commented 1 year ago

yes agree, so sad that you decide to remove this integration @bruxy70 , its a nice integration, almost the most usefull i have in HA in the bunch of integrations....AND the calendar doesnt provide sensors...

stboch commented 1 year ago

My issue is local calendar does not have a service for updating and existing calendar event, IE for slide and offset events. This integration allowed me to move away from a google calendar, I hope that HA can close the gaps on the features or at least this integration doesn't break with another update.

goofy7264 commented 1 year ago

don't forget you can always fork this project and adding your fork'd repo to hacs as a manual repo (or install manually) . Yes, there is a risk that a breaking change will cause it to stop working down the road, but either you can fix it yourself, or at least you've kicked the can down the road for now,.

karldonteljames commented 1 year ago

Yes agree, so sad that you decide to remove this integration @bruxy70 , it's a nice integration, almost the most usefull i have in HA in the bunch of integrations...AND the calendar doesn't provide sensors...

This is an issue I'm having too. Having sensors like Mum_Dishwasher, Dad_Bins, and Child_FeedPets Is really useful, and I have a number of automation based on those sensors outputting "Today" Is there any way to achieve something similar with the Local Calendar?

bruxy70 commented 1 year ago

Definitely. The calendar state becomes 'on', so simple. I also made a video about simple templates to calculate days till the next event, so there you can automate a day before for example.

karldonteljames commented 1 year ago

I only need to have sensors that outputs "today" really, I don't mind if they are sensor templates that I need to create manually, or as was the case with garbage collection, if they are are created automatically. I just don't know how to create them. The chores calendar is "on" but all I can see is the message for the first entry. I don't want to go down the route of multiple calendars, one for each person, as it would turn into a calendar per chore.

e.g in my chore calendar today there is: Mum Dishwasher Dad Bins Child1 Pets Child2 Day Off

Then I use inputs to count which chores they have done and then remove them from a list. - This is also used in an automation to send a notification to our phones that day, and is formatted in a list.

      Child1s_chores:
          friendly_name: "Child1's Chores"
          value_template: >-
            {% set do_Child1bins = is_state('sensor.Child1_bins', 'today') and is_state('input_boolean.chore_bins', 'on') %}
            {% set do_Child1dishwasher = is_state('sensor.Child1_dishwasher', 'today') and is_state('input_boolean.chore_dishwasher', 'on')  %}
            {% set do_Child1fridge = is_state('sensor.Child1_fridge', 'today')  and is_state('input_boolean.chore_refill_fridge', 'on') %}
            {% set do_Child1laundry = is_state('input_boolean.chore_Child1_laundry', 'on') %}
            {% set do_Child1bed = is_state('input_boolean.chore_Child1_bed', 'on') %}
            {% set Child1bins = 'Empty The Bins, ' if do_Child1bins else '' %}
            {% set Child1dishwasher = 'Empty The Dishwasher, ' if do_Child1dishwasher else '' %}
            {% set Child1fridge = 'Refill The Fridge, Feed The Dog, Tidy the Toys ' if do_Child1fridge else '' %}
            {% set Child1laundry = 'Bring Down Dirty Laundry, ' if do_Child1laundry else '' %}
            {% set Child1bed = 'Make Your Bed, ' if do_Child1bed else '' %}
            {{Child1bed}}{{Child1laundry}}{{Child1dishwasher}}{{Child1bins}}{{Child1fridge}}

That is also pulled into a sensor:

     bins:
          friendly_name: 'Bins'
          value_template: >-
            {% if is_state('sensor.Dad_bins', 'today') -%}
              Dad
            {% elif is_state('sensor.Mum_bins', 'today') -%}
              Mum
            {% elif is_state('sensor.Child1_bins', 'today') -%}
              Child1
            {% else %}
              ERROR!
            {% endif %}
karldonteljames commented 1 year ago

I've managed to get both Grocy and Todoist integrated into HA, however, neither of these give the simple setup, yet complex functionality that was provided by this plugin.

I've set up a weekly schedule for two chores and three people, which in this plugin gave me three sensors and an output of today, tomorrow, or a date. I now have one sensor with lots of data in, and doesn't actually show if it is active today or not.

sensor.grocy_chores: state_class: measurement chores:

count: 6 unit_of_measurement: Chore(s) icon: mdi:broom friendly_name: Grocy chores

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity in last 30 days. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

karldonteljames commented 1 year ago

I assume these 'true' 'false' states, and individual sensors that were in garbage collection are unlikely to be merged into the calendar in the same way as they used to work?

bruxy70 commented 1 year ago

Definitely not. The calendar state is standard and consistent with other integrations. The garbage collection was an inconsistent exception. But it can be easily done through templates.

karldonteljames commented 1 year ago

could you possibly give me an example of how i can create a template sensor for this particular setup, please?

bruxy70 commented 1 year ago

https://youtu.be/RpwAhy7f52I

karldonteljames commented 1 year ago

Thank you for the video. it's really helpful, and I'll start to migrate my automation over. However looking at this, doesn't this require a calendar for each collection or chore though? - using multiple calendars I got this sorted. Thank you so much for your video, and your integration which i've been using to try and get my children to do their chores for a year or so now.

bruxy70 commented 1 year ago

I have a script doing automatic offset for holidays and holidays in week using local calendars. Will make a video about that hopefully over the weekend. It is not ideal, but I'd call it a good start.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity in last 30 days. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.