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

Could not retrieve events for calendars: Garbage Collection #459

Closed Sudo-Rob closed 1 year ago

Sudo-Rob commented 1 year ago

Before you submit a new bug report, please check that

Describe the bug

With the release of the April updates, I am now seeing the following:

image

I understand a change to Calendar was expected. The following is notification of the breaking change:

The calendar.create_event service now enforces that start and end dates are exclusive. This has always been part of the specification but was not clearly documented and enforced.

(@allenporter - #89533) (documentation)

https://developers.home-assistant.io/blog/2023/03/28/calendar_best_practices

Currently, I see no garbage entries on the calendar.

The current configuration is:

Home Assistant 2023.4.0 Supervisor 2023.04.0 Operating System 9.5 Frontend 20230405.0 - latest

Debug logs and operation appear normal.

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.4.0",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.10",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "5.15.90",
    "supervisor": "2023.04.0",
    "host_os": "Home Assistant OS 9.5",
    "docker_version": "20.10.22",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "holidays": {
      "version": "1.9.4",
      "requirements": [
        "python-dateutil>=2.8.2",
        "holidays>=0.14.2"
      ]
    },
    "feedparser": {
      "version": "0.1.7",
      "requirements": [
        "feedparser==6.0.8"
      ]
    },
    "hacs": {
      "version": "1.31.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "sun2": {
      "version": "2.0.3",
      "requirements": []
    },
    "nws": {
      "version": "1.1.10",
      "requirements": [
        "pynws==1.4.1"
      ]
    },
    "visonic": {
      "version": "0.8.2.4",
      "requirements": [
        "pyserial_asyncio==0.4"
      ]
    },
    "daily": {
      "version": "0.3.9",
      "requirements": []
    },
    "nws_alerts": {
      "version": "2.8",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.10.2",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.10.2",
    "documentation": "https://github.com/bruxy70/Garbage-Collection/",
    "issue_tracker": "https://github.com/bruxy70/Garbage-Collection/issues",
    "iot_class": "calculated",
    "integration_type": "helper",
    "dependencies": [],
    "config_flow": true,
    "codeowners": [
      "@bruxy70"
    ],
    "requirements": [
      "python-dateutil>=2.8.2"
    ],
    "is_built_in": false
  },
  "data": {
    "entity_id": "sensor.general_waste",
    "state": 2,
    "attributes": {
      "days": 5,
      "last_collection": "2022-02-07T07:36:03.981285-05:00",
      "last_updated": "2023-04-06T01:37:58.526964-04:00",
      "next_date": "2023-04-11T00:00:00-04:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "632f0aab5dd8e4a99c42c83aca5d328c",
      "version": 6,
      "domain": "garbage_collection",
      "title": "General Waste",
      "data": {
        "unique_id": "9d80db80-5c7a-4840-8ba0-9c54473b5f9e"
      },
      "options": {
        "frequency": "weekly",
        "icon_normal": "mdi:delete",
        "icon_today": "mdi:delete-circle",
        "icon_tomorrow": "mdi:delete-restore",
        "expire_after": "12:00:00",
        "first_month": "jan",
        "last_month": "dec",
        "collection_days": [
          "tue"
        ],
        "verbose_format": "on {date}, in {days} days",
        "date_format": "%d-%b-%Y"
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "import",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

2023-04-06 01:37:46.414 DEBUG (MainThread) [custom_components.holidays] Setting US Federal Holidays from ConfigFlow
2023-04-06 01:37:47.392 DEBUG (MainThread) [custom_components.garbage_collection] Setting General Waste (weekly) from ConfigFlow
2023-04-06 01:37:47.392 DEBUG (MainThread) [custom_components.garbage_collection] Setting Recyclables (weekly) from ConfigFlow
2023-04-06 01:37:48.037 DEBUG (MainThread) [custom_components.garbage_collection.sensor] Creating garbage_collection calendar
2023-04-06 01:37:58.036 DEBUG (MainThread) [custom_components.holidays.calendar] (US Federal Holidays) Calling update
2023-04-06 01:37:58.037 DEBUG (MainThread) [custom_components.holidays.calendar] (US Federal Holidays) Country Holidays with parameters: country: US, subdivision: , observed: True
2023-04-06 01:37:58.050 DEBUG (MainThread) [custom_components.holidays.calendar] (US Federal Holidays) Found these holidays: 
  2022-01-01: New Year's Day
  2022-05-30: Memorial Day
  2022-07-04: Independence Day
  2022-09-05: Labor Day
  2022-11-24: Thanksgiving
  2022-12-25: Christmas Day
  2022-12-26: Christmas Day (Observed)
  2023-01-01: New Year's Day
  2023-01-02: New Year's Day (Observed)
  2023-05-29: Memorial Day
  2023-07-04: Independence Day
  2023-09-04: Labor Day
  2023-11-23: Thanksgiving
  2023-12-25: Christmas Day
  2024-01-01: New Year's Day
  2024-05-27: Memorial Day
  2024-07-04: Independence Day
  2024-09-02: Labor Day
  2024-11-28: Thanksgiving
  2024-12-25: Christmas Day
2023-04-06 01:37:58.051 DEBUG (MainThread) [custom_components.holidays.calendar] (US Federal Holidays) Looking for the next holiday
2023-04-06 01:37:58.051 DEBUG (MainThread) [custom_components.holidays.calendar] (US Federal Holidays) next_date (2023-05-29), today (2023-04-06)
2023-04-06 01:37:58.060 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Calling update
2023-04-06 01:37:58.095 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Dates loaded, firing a garbage_collection_loaded event
2023-04-06 01:37:58.097 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Looking for next collection
2023-04-06 01:37:58.097 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) next_date (2023-04-07), today (2023-04-06)
2023-04-06 01:37:58.097 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Found next collection date: 07-Apr-2023, that is in 1 days
2023-04-06 01:37:58.113 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Calling update
2023-04-06 01:37:58.143 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Dates loaded, firing a garbage_collection_loaded event
2023-04-06 01:37:58.144 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Looking for next collection
2023-04-06 01:37:58.145 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) next_date (2023-04-11), today (2023-04-06)
2023-04-06 01:37:58.145 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Found next collection date: 11-Apr-2023, that is in 5 days
2023-04-06 01:37:58.214 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-06-03 by 1 days for sensor.recyclables
2023-04-06 01:37:58.217 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-05-31 by 1 days for sensor.general_waste
2023-04-06 01:37:58.226 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-07-08 by 1 days for sensor.recyclables
2023-04-06 01:37:58.228 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-07-05 by 1 days for sensor.general_waste
2023-04-06 01:37:58.245 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-09-09 by 1 days for sensor.recyclables
2023-04-06 01:37:58.247 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-09-06 by 1 days for sensor.general_waste
2023-04-06 01:37:58.269 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-11-25 by 1 days for sensor.recyclables
2023-04-06 01:37:58.282 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-12-30 by 1 days for sensor.recyclables
2023-04-06 01:37:58.282 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2022-12-27 by 1 days for sensor.general_waste
2023-04-06 01:37:58.286 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-01-06 by 1 days for sensor.recyclables
2023-04-06 01:37:58.286 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-01-03 by 1 days for sensor.general_waste
2023-04-06 01:37:58.329 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-06-02 by 1 days for sensor.recyclables
2023-04-06 01:37:58.330 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-05-30 by 1 days for sensor.general_waste
2023-04-06 01:37:58.342 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-07-07 by 1 days for sensor.recyclables
2023-04-06 01:37:58.342 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-07-04 by 1 days for sensor.general_waste
2023-04-06 01:37:58.364 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-09-08 by 1 days for sensor.recyclables
2023-04-06 01:37:58.364 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-09-05 by 1 days for sensor.general_waste
2023-04-06 01:37:58.388 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-11-24 by 1 days for sensor.recyclables
2023-04-06 01:37:58.407 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-12-26 by 1 days for sensor.general_waste
2023-04-06 01:37:58.410 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2023-12-29 by 1 days for sensor.recyclables
2023-04-06 01:37:58.412 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-01-02 by 1 days for sensor.general_waste
2023-04-06 01:37:58.414 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-01-05 by 1 days for sensor.recyclables
2023-04-06 01:37:58.464 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-05-28 by 1 days for sensor.general_waste
2023-04-06 01:37:58.466 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-05-31 by 1 days for sensor.recyclables
2023-04-06 01:37:58.477 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-07-05 by 1 days for sensor.recyclables
2023-04-06 01:37:58.492 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-09-03 by 1 days for sensor.general_waste
2023-04-06 01:37:58.497 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-09-06 by 1 days for sensor.recyclables
2023-04-06 01:37:58.521 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-11-29 by 1 days for sensor.recyclables
2023-04-06 01:37:58.526 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.general_waste
2023-04-06 01:37:58.526 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Looking for next collection
2023-04-06 01:37:58.526 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) next_date (2023-04-11), today (2023-04-06)
2023-04-06 01:37:58.527 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (General Waste) Found next collection date: 11-Apr-2023, that is in 5 days
2023-04-06 01:37:58.534 DEBUG (MainThread) [custom_components.garbage_collection] called offset_date 2024-12-27 by 1 days for sensor.recyclables
2023-04-06 01:37:58.535 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.recyclables
2023-04-06 01:37:58.535 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Looking for next collection
2023-04-06 01:37:58.535 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) next_date (2023-04-07), today (2023-04-06)
2023-04-06 01:37:58.536 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recyclables) Found next collection date: 07-Apr-2023, that is in 1 days
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.