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
382 stars 90 forks source link

Confused re new version #342

Closed thorrrr closed 2 years ago

thorrrr commented 2 years ago

Write your question here

HI I have just updated and read your well explained latest version, but i didn’t fully understand it sorry. My is an extremely basic setup Brown & Black Bin every two weeks but my Green waste is every 3 weeks but stops for several months over Xmas. I had it running correctly but now i am getting a log error, but on the frontend, it still looks correct. I don’t understand what i am supposed to do you mention 2 stages and 10 different blueprints seems more complicated than before :) This error originated from a custom integration.

Logger: custom_components.garbage_collection Source: custom_components/garbage_collection/init.py:324 Integration: Garbage Collection (documentation, issues) First occurred: 16:48:34 (3 occurrences) Last logged: 16:48:34

Removed data config {'offset': 21, 'holiday_in_week_move': False, 'holiday_move_offset': 1, 'observed': True, 'include_dates': ['2022-03-07']}. Please check the documentation how to configure the functionality. Removed data config {'offset': 14, 'holiday_in_week_move': False, 'holiday_move_offset': -2, 'observed': True}. Please check the documentation how to configure the functionality. Removed data config {'offset': 14, 'holiday_in_week_move': False, 'holiday_move_offset': 1, 'observed': True}. Please check the documentation how to configure the functionality.

Diagnotics see here

bruxy70 commented 2 years ago

The error is just a reminder that it removed the parameters, that were previously obsolete and now are removed. Looking at them, I see 3 things.

So my conclusion is, that your configuration is fine and simple as you say. Previously, you had it over-complicated, proabably becase it was so complicated and confusing (which was the reasn for the change). Ok?

thorrrr commented 2 years ago

HI

  1. OK point 1 in my area in the UK the bins are collected on holidays and public holidays.

  2. Our bins on every Wed switching colours so Brown tomorrow then again after 14 days, but next week Black bin every 14 days.

  3. Green Bin is collected 10 months a year so it stops in Dec over winter and starts again on 7 March 2022 then every 3 weeks after that until Dec 2022 then it will stop again to the following March 2023 if that makes sense

So in March when the green bin starts its 3 week cycle how should i implement it correctly ?

bruxy70 commented 2 years ago

Ok, so you need to have 2 entities, both with 14 days period, but one with a starting date a week later than the other. Alternatively, you can configure one for odd and one for even week number - but that is based on week numbers, so thsi might be an issue on the new year, if the year has an odd number of weeks, and then it starts with week number 1, it would basically reset in January. So it might not be what you want.

For the 3rd one, just configure the first month and last month - that's a standard config on the second screen. I think you have that configured. And you need to configure it either every 21 days (3 weeks) starting from a chosen date. The challenge here is, that it will repeat evey 21 days starting from the initial date, and it will just cut out the two months. So when you configure it to start on March 7 2022, for next year it will start in a multiply of 21 days from March 7, 2022 - that will be March 20 I am afraid. This is how it always worked, I did not change a thing in this. So you'd have to adjust the config next year to start on March 6 next year.

Or, you can now configure it for a weekly schedule, configure it for a manual update and then make an automation to drop the collections in the two weeks in between. So technically, it is now possible (was not before). But if this is not your thing, I'd leave it there.

thorrrr commented 2 years ago

HI I cannot work out where i get to step 2 ? I set everyndays but it get an error if i hit submit! Where is the area i set days or dates? Per the docs The configuration hapend in 2 steps. In the first step, you select the frequency and common parameters. In the second step you configure additional parameters depending on the selected frequency.

The configuration via configuration.yaml has been deprecated. If you have previously configured the integration there, it will be imported to ConfigFlow, and you should remove it.

How do i get to step 2? image

bruxy70 commented 2 years ago

After you submit. But it looks like you found a bug. Let me check....

bruxy70 commented 2 years ago

That's interesting, I had this out for quite some time, but nobody found this. Anyhow, i just made a release fixing the first issue. I cannot replicate the other one, that one works fine for me.

thorrrr commented 2 years ago

Well at least it was found early :) The one just did it 1 time but now looks ok

thorrrr commented 2 years ago

I have the new version but i think the day calcs are out. My next collection is tomorrow so i expect to see 1 day My Brown Bin is next Wed i expect to see 8 days Under the old settings that was correct. But now i have set it via the UI is shows Black Bin 0 Days which means today & Brown Bin & Days which is next Tue

image

image config_entry-garbage_collection-e1d5ffc343cdd5433df95795be83f4e8.json (1).txt

bruxy70 commented 2 years ago

Feb 9 2021 was Tuesday. Today is Tuesday. So the collection should today, not tomorrow.

thorrrr commented 2 years ago

Sorry I didn't see the year default back to 2021

thorrrr commented 2 years ago

Now it is working pure genius very easy to use well done