question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scheduling not being following from 01/01/2021

See original GitHub issue

Describe the bug

The collection pattern is every two weeks, beginning 14/12/2020 and running until 29/11/2021, with three exceptions during the year for bank holidays.

It should be 14/12/20, 28/12/20, 11/01/21, 25/01/21 and so on, every two weeks (apart from the bank holidays). No matter what changes I’ve tried it just keeps switching from 04/01/21 and I can’t work out what I’m doing wrong. I’ve rebooted multiple times, just in case that might help but no difference. Another user has the same issue, following the roll over to the new calendar year.

image

Configuration

Do you configure the integration in YAML or Config Flow (GUI)? : Config Flow

                "entry_id": "eb511fc36fc9fa7b4e0fb65ac96d3fb6",
                "version": 1,
                "domain": "garbage_collection",
                "title": "Green bin",
                "data": {
                    "unique_id": "ca63892e-8f07-49d4-87e8-b108b1cff79c",
                    "frequency": "odd-weeks",
                    "icon_normal": "mdi:trash-can",
                    "icon_today": "mdi:delete-restore",
                    "icon_tomorrow": "mdi:delete-circle",
                    "verbose_format": "on {date}, in {days} days",
                    "date_format": "%d-%b-%Y",
                    "expire_after": "13:30",
                    "collection_days": [
                        "mon"
                    ],
                    "first_month": "dec",
                    "last_month": "nov",
                    "holiday_move_offset": 0,
                    "observed": false,
                    "include_dates": [
                        "2021-04-03",
                        "2021-05-01",
                        "2021-05-29",
                        ""
                    ],
                    "exclude_dates": [
                        "2021-04-05",
                        "2021-05-03",
                        "2021-05-31",
                        ""
                    ],
                    "holiday_in_week_move": false
                },
                "options": {},
                "system_options": {
                    "disable_new_entities": false
                },
                "source": "user",
                "connection_class": "local_poll",
                "unique_id": null
            }

Error log/debug information

2020-12-14 10:22:49 INFO (MainThread) [homeassistant.setup] Setting up garbage_collection
2020-12-14 10:22:49 INFO (MainThread) [homeassistant.setup] Setup of domain garbage_collection took 0.0 seconds
2020-12-14 10:22:49 DEBUG (MainThread) [custom_components.garbage_collection] Setting Green bin (odd-weeks) from ConfigFlow
2020-12-14 10:22:49 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.garbage_collection
2020-12-14 10:22:49 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Calling update
2020-12-14 10:22:49 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-12-14)
2020-12-14 10:22:49 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Found next date: 14-Dec-2020, that is in 0 days
2020-12-14 10:22:49 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.garbage_collection entity: sensor.green_bin
2020-12-14 10:22:49 DEBUG (MainThread) [custom_components.garbage_collection.sensor] Creating garbage_collection calendar
2020-12-14 10:22:49 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.garbage_collection
2020-12-14 10:22:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-11-30)
2020-12-14 10:22:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-12-14)
2020-12-14 10:22:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-12-28)
2020-12-14 10:22:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2021-01-04)
2020-12-14 10:22:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2021-01-18)
2020-12-14 10:22:59 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-11-30)
2020-12-14 10:22:59 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-12-14)
2020-12-14 10:22:59 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2020-12-28)
2020-12-14 10:22:59 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2021-01-04)
2020-12-14 10:22:59 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Green bin) Next date candidate (2021-01-18)

Screenshots

image image image

Version

Integration version: 3.10

Home Assistant version: 2020.12.0

Hopefully I’ve done this properly and not missed anything, if you need any more information or for me to test things please let me know.

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bruxy70commented, Dec 14, 2020

Ok, you are right. Every n weels works the same way as odd weeks, I forgot. Please use EVERY-N-DAYS. There you can set-up a starting date. And for 2 weeks select period 14 (14 days).

0reactions
sym0nd0commented, Dec 15, 2020

Thanks for the help, all sorted now. I’ll stick with every-n-days from now on, as that seemed to fit all scenarios.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outlook Schedule Assistant does not appear after an update
We have several cases where the schedule assistant is not appearing in Outlook after an update of Windows/Office the versions with which we ......
Read more >
Why is my schedule not being followed? - Mysa Support
Mysa gives users the ability to create unique schedules, along with a number of additional smart features! Because there are multiple items ...
Read more >
PCS Fee Schedule effective 01.01.2021 Excel
Get the added protection of a COVID-19 vaccine to keep from getting very sick or hospitalized this holiday season. Learn more about the...
Read more >
Employee Fair Scheduling Act - Michigan Legislature
HOUSE BILL NO. 5136. June 24, 2021, Introduced by Reps. Hope, Clemente, Breen, Aiyash. A bill to require certain employers to provide written...
Read more >
public service electric and gas company
A market based charge including all applicable taxes to be posted by Public Service on a monthly basis. The foregoing Commodity Charge will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found