Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused re new version #342

Closed
thorrrr opened this issue Feb 8, 2022 · 11 comments
Closed

Confused re new version #342

thorrrr opened this issue Feb 8, 2022 · 11 comments
Labels
question Further information is requested

Comments

@thorrrr
Copy link

thorrrr commented Feb 8, 2022

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

@thorrrr thorrrr added the question Further information is requested label Feb 8, 2022
@bruxy70
Copy link
Owner

bruxy70 commented Feb 8, 2022

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.

  • There is a partial configuration for moving schedule based on a country holidays, but you did not configure any country, so this is not used, right?
  • You have 1 date you want to include manually. But that does not make any sense as you already have a regular collection on this date. I am not sure why you configured it, but to me it looks like it was redundant.
  • I am a bit confused by your offset configuration. You have the collection set-up for every 21 days, starting on 2022-03-07. But then you ask to manually offset it by 21 days. That makes no sense. What the offst used to do was, it would calculate the schedule, and then apply a manual offset. So if you had it configured let's say for 1st wednesday each month, with offset -7 it would be last wednesday (the previous month). But in your case, having it with period 21 days and offseting it by 21 days makes no sense (except for the first date, which you then added manually).

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
Copy link
Author

thorrrr commented Feb 8, 2022

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
Copy link
Owner

bruxy70 commented Feb 8, 2022

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
Copy link
Author

thorrrr commented Feb 8, 2022

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
Copy link
Owner

bruxy70 commented Feb 8, 2022

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

bruxy70 pushed a commit that referenced this issue Feb 8, 2022
bruxy70 added a commit that referenced this issue Feb 8, 2022
#342 - Fix configuration for every-n-days
@bruxy70
Copy link
Owner

bruxy70 commented Feb 8, 2022

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
Copy link
Author

thorrrr commented Feb 8, 2022

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

@bruxy70 bruxy70 closed this as completed Feb 8, 2022
@thorrrr
Copy link
Author

thorrrr commented Feb 8, 2022

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
Copy link
Owner

bruxy70 commented Feb 8, 2022

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

@thorrrr
Copy link
Author

thorrrr commented Feb 8, 2022

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

@thorrrr
Copy link
Author

thorrrr commented Feb 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants