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

CalendarEventDevice is deprecated in HA 2022.5 #392

Closed tomlut closed 2 years ago

tomlut commented 2 years ago

Before you submit a new bug report, please check that

Describe the bug

Receiving this error running Home Assistant Core 2022.5.0b2:

Logger: homeassistant.components.calendar
Source: components/calendar/__init__.py:197
Integration: Calendar (documentation, issues)
First occurred: 22:28:41 (1 occurrences)
Last logged: 22:28:41

CalendarEventDevice is deprecated, modify GarbageCollectionCalendar to extend CalendarEntity

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.5.0b2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Australia/Hobart",
    "os_name": "Linux",
    "os_version": "5.10.108",
    "supervisor": "2022.04.4",
    "host_os": "Home Assistant OS 7.6",
    "docker_version": "20.10.9",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "astroweather": {
      "version": "0.20.9",
      "requirements": [
        "pyastroweatherio==0.20.9"
      ]
    },
    "hacs": {
      "version": "1.24.5",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "weatherflow": {
      "version": "1.0.4",
      "requirements": [
        "pyweatherflowrest==1.0.8"
      ]
    },
    "dahua": {
      "version": "0.5.0",
      "requirements": []
    },
    "bureau_of_meteorology": {
      "version": "1.1.2",
      "requirements": []
    },
    "alarmo": {
      "version": "v1.8.7",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.6",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "average": {
      "version": "2.2.1",
      "requirements": []
    },
    "watchman": {
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.6",
    "documentation": "https://github.com/bruxy70/Garbage-Collection/",
    "issue_tracker": "https://github.com/bruxy70/Garbage-Collection/issues",
    "iot_class": "calculated",
    "dependencies": [],
    "config_flow": true,
    "codeowners": [
      "@bruxy70"
    ],
    "requirements": [
      "python-dateutil>=2.8.2"
    ],
    "is_built_in": false
  },
  "data": {
    "entity_id": "sensor.recycling",
    "state": 2,
    "attributes": {
      "next_date": "2022-05-02T00:00:00+10:00",
      "days": 3,
      "last_collection": null,
      "last_updated": "2022-04-29T22:29:42.791896+10:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "e5f02af2569ddc2dc5dfb4b08a766bdf",
      "version": 4.5,
      "domain": "garbage_collection",
      "title": "Recycling",
      "data": {
        "unique_id": "84c17db5-380c-44e3-b41e-3a4b3d8bc1d9",
        "frequency": "even-weeks",
        "icon_normal": "mdi:trash-can",
        "icon_today": "mdi:delete-restore",
        "icon_tomorrow": "mdi:delete-circle",
        "first_month": "jan",
        "last_month": "dec",
        "collection_days": [
          "mon"
        ]
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

Not done.
bruxy70 commented 2 years ago

Thanks, yes, I am aware of that, I have a fix ready, but waiting for the testing plugin release to run the tests :(

tomlut commented 2 years ago

Fixed in 4.7.3