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

Upgrade to 4.7.3 breaks a working configuration. #394

Closed Sudo-Rob closed 2 years ago

Sudo-Rob commented 2 years ago

Before you submit a new bug report, please check that

Describe the bug

Upgraded to Garbage Collector to 4.7.3 and Holidays to 1.7.3. After upgrading, I performed several restarts attempting to figure out why the holiday_in_week.yaml blueprint no longer works. The blueprint is configured to move two garbage pickup days one additional day per the blueprint description. There are no logged errors associated with the HA log or the blueprint Trace Timelines. There are five holidays that should move 10 pickup days in the calendar year, but none have shifted as before.

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.5.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "5.10.108",
    "supervisor": "2022.05.0",
    "host_os": "Home Assistant OS 7.6",
    "docker_version": "20.10.9",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "holidays": {
      "version": "1.7.3",
      "requirements": [
        "python-dateutil>=2.8.2",
        "holidays>=0.13"
      ]
    },
    "feedparser": {
      "version": "0.1.7",
      "requirements": [
        "feedparser==6.0.8"
      ]
    },
    "hacs": {
      "version": "1.24.5",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "sun2": {
      "version": "2.0.3",
      "requirements": []
    },
    "visonic": {
      "version": "0.7.0.2",
      "requirements": [
        "pyserial_asyncio==0.4"
      ]
    },
    "daily": {
      "version": "0.3.9",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.7.3",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.7.3",
    "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.general_waste",
    "state": 2,
    "attributes": {
      "next_date": "2022-05-10T00:00:00-04:00",
      "days": 4,
      "last_collection": "2022-02-07T07:36:03.981285-05:00",
      "last_updated": "2022-05-06T02:11:21.862731-04:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "632f0aab5dd8e4a99c42c83aca5d328c",
      "version": 4.5,
      "domain": "garbage_collection",
      "title": "General Waste",
      "data": {
        "unique_id": "9d80db80-5c7a-4840-8ba0-9c54473b5f9e",
        "frequency": "weekly",
        "icon_normal": "mdi:delete",
        "icon_today": "mdi:delete-circle",
        "icon_tomorrow": "mdi:delete-restore",
        "expire_after": "12:00",
        "verbose_format": "on {date}, in {days} days",
        "date_format": "%d-%b-%Y",
        "collection_days": [
          "tue"
        ],
        "first_month": "jan",
        "last_month": "dec"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "import",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_card_update, old_state=None, new_state=<state update.garbage_collection_card_update=unavailable; restored=True, friendly_name=Garbage Collection Card update, supported_features=17 @ 2022-05-06T02:11:14.143903-04:00>>
2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.lg_webos_remote_control_update, old_state=None, new_state=<state update.lg_webos_remote_control_update=unavailable; restored=True, friendly_name=LG WebOS Remote Control update, supported_features=17 @ 2022-05-06T02:11:14.144135-04:00>>
2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_update, old_state=None, new_state=<state update.garbage_collection_update=unavailable; restored=True, friendly_name=Garbage Collection update, supported_features=17 @ 2022-05-06T02:11:14.144344-04:00>>

2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140221197621952] Sending {"id":2,"type":"event","event":{"a":{"update.garbage_collection_card_update":{"s":"unavailable","a":{"restored":true,"friendly_name":"Garbage Collection Card update","supported_features":17},"c":"018097fe685f2d674554bd557b6143ce","lc":1651817474.143903}}}}
2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140221197621952] Sending {"id":2,"type":"event","event":{"a":{"update.lg_webos_remote_control_update":{"s":"unavailable","a":{"restored":true,"friendly_name":"LG WebOS Remote Control update","supported_features":17},"c":"018097fe6860e285f75123620ab446d8","lc":1651817474.144135}}}}
2022-05-06 02:11:14 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140221197621952] Sending {"id":2,"type":"event","event":{"a":{"update.garbage_collection_update":{"s":"unavailable","a":{"restored":true,"friendly_name":"Garbage Collection update","supported_features":17},"c":"018097fe6860ff79bc825ec6c42651e3","lc":1651817474.144344}}}}

2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_card_update, old_state=<state update.garbage_collection_card_update=unavailable; restored=True, friendly_name=Garbage Collection Card update, supported_features=17 @ 2022-05-06T02:11:14.143903-04:00>, new_state=<state update.garbage_collection_card_update=off; auto_update=False, installed_version=1.20.1, in_progress=False, latest_version=1.20.0, release_summary=None, release_url=https://github.com/amaximus/garbage-collection-card/releases/1.20.0, skipped_version=None, title=None, friendly_name=Garbage Collection Card update, supported_features=17 @ 2022-05-06T02:11:15.558721-04:00>>
2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.lg_webos_remote_control_update, old_state=<state update.lg_webos_remote_control_update=unavailable; restored=True, friendly_name=LG WebOS Remote Control update, supported_features=17 @ 2022-05-06T02:11:14.144135-04:00>, new_state=<state update.lg_webos_remote_control_update=off; auto_update=False, installed_version=91b298b, in_progress=False, latest_version=91b298b, release_summary=None, release_url=https://github.com/madmicio/LG-WebOS-Remote-Control, skipped_version=None, title=None, friendly_name=LG WebOS Remote Control update, supported_features=17 @ 2022-05-06T02:11:15.559098-04:00>>
2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_update, old_state=<state update.garbage_collection_update=unavailable; restored=True, friendly_name=Garbage Collection update, supported_features=17 @ 2022-05-06T02:11:14.144344-04:00>, new_state=<state update.garbage_collection_update=off; auto_update=False, installed_version=4.7.3, in_progress=False, latest_version=4.7.3, release_summary=None, release_url=https://github.com/bruxy70/Garbage-Collection/releases/4.7.3, skipped_version=None, title=None, entity_picture=https://brands.home-assistant.io/_/garbage_collection/icon.png, friendly_name=Garbage Collection update, supported_features=17 @ 2022-05-06T02:11:15.559467-04:00>>

2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_card_update, old_state=<state update.garbage_collection_card_update=unavailable; restored=True, friendly_name=Garbage Collection Card update, supported_features=17 @ 2022-05-06T02:11:14.143903-04:00>, new_state=<state update.garbage_collection_card_update=off; auto_update=False, installed_version=1.20.1, in_progress=False, latest_version=1.20.0, release_summary=None, release_url=https://github.com/amaximus/garbage-collection-card/releases/1.20.0, skipped_version=None, title=None, friendly_name=Garbage Collection Card update, supported_features=17 @ 2022-05-06T02:11:15.558721-04:00>>
2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.lg_webos_remote_control_update, old_state=<state update.lg_webos_remote_control_update=unavailable; restored=True, friendly_name=LG WebOS Remote Control update, supported_features=17 @ 2022-05-06T02:11:14.144135-04:00>, new_state=<state update.lg_webos_remote_control_update=off; auto_update=False, installed_version=91b298b, in_progress=False, latest_version=91b298b, release_summary=None, release_url=https://github.com/madmicio/LG-WebOS-Remote-Control, skipped_version=None, title=None, friendly_name=LG WebOS Remote Control update, supported_features=17 @ 2022-05-06T02:11:15.559098-04:00>>
2022-05-06 02:11:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=update.garbage_collection_update, old_state=<state update.garbage_collection_update=unavailable; restored=True, friendly_name=Garbage Collection update, supported_features=17 @ 2022-05-06T02:11:14.144344-04:00>, new_state=<state update.garbage_collection_update=off; auto_update=False, installed_version=4.7.3, in_progress=False, latest_version=4.7.3, release_summary=None, release_url=https://github.com/bruxy70/Garbage-Collection/releases/4.7.3, skipped_version=None, title=None, entity_picture=https://brands.home-assistant.io/_/garbage_collection/icon.png, friendly_name=Garbage Collection update, supported_features=17 @ 2022-05-06T02:11:15.559467-04:00>>

2022-05-06 02:11:32 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140221126487728] Sending {"id":22,"type":"result","success":true,"result":{"resources":{"component.zeroconf.title":"Zero-configuration networking (zeroconf)","component.analytics.title":"Analytics","component.garbage_collection.title":"Garbage Collection","component.default_config.title":"Default Config","component.binary_sensor.title":"Binary sensor","component.ios.title":"Home Assistant iOS","component.holidays.title":"Holidays","component.usb.title":"USB Discovery","component.zwave_js.title":"Z-Wave JS","component.network.title":"Network Configuration","component.version.title":"Version","component.timer.title":"Timer","component.counter.title":"Counter","component.calendar.title":"Calendar","component.zone.title":"Zone","component.brother.title":"Brother Printer","component.weather.title":"Weather","component.notify.title":"Notifications","component.webostv.title":"LG webOS Smart TV","component.nws.title":"National Weather Service (NWS)","component.alexa.title":"Amazon Alexa","component.stt.title":"Speech-to-Text (STT)","component.system_log.title":"System Log","component.cloud.title":"Home Assistant Cloud","component.visonic.title":"Visonic Intruder Alarm","component.tts.title":"Text-to-Speech (TTS)","component.person.title":"Person","component.update.title":"Update","component.ipp.title":"Internet Printing Protocol (IPP)","component.stream.title":"Stream","component.mobile_app.title":"Mobile App","component.history.title":"History","component.input_select.title":"Input select","component.config.title":"Configuration","component.daily.title":"Daily Sensor","component.logger.title":"Logger","component.coronavirus.title":"Coronavirus (COVID-19)","component.hassio.title":"Home Assistant Supervisor","component.template.title":"Template","component.input_datetime.title":"Input datetime","component.trace.title":"Trace","component.media_player.title":"Media player","component.onboarding.title":"Home Assistant Onboarding","component.frontend.title":"Home Assistant Frontend","component.webhook.title":"Webhook","component.alarm_control_panel.title":"Alarm control panel","component.websocket_api.title":"Home Assistant WebSocket API","component.input_number.title":"Input number","component.humidifier.title":"Humidifier","component.ecobee.title":"ecobee","component.script.title":"Script","component.image.title":"Image","component.scene.title":"Scene","component.light.title":"Light","component.select.title":"Select","component.automation.title":"Automation","component.map.title":"Map","component.tag.title":"Tag","component.discovery.title":"Discovery","component.search.title":"Search","component.ssdp.title":"Simple Service Discovery Protocol (SSDP)","component.hacs.title":"HACS","component.sun.title":"Sun","component.group.title":"Group","component.input_text.title":"Input text","component.dhcp.title":"DHCP Discovery","component.device_tracker.title":"Device tracker","component.input_boolean.title":"Input boolean","component.media_source.title":"Media Source","component.recorder.title":"Recorder","component.blueprint.title":"Blueprint","component.diagnostics.title":"Diagnostics","component.my.title":"My Home Assistant","component.energy.title":"Energy","component.auth.title":"Auth","component.climate.title":"Climate","component.persistent_notification.title":"Persistent Notification","component.lovelace.title":"Dashboards","component.device_automation.title":"Device Automation","component.sensor.title":"Sensor","component.homeassistant.title":"Home Assistant Core Integration","component.input_button.title":"Input Button","component.system_health.title":"System Health","component.api.title":"Home Assistant API","component.switch.title":"Switch","component.button.title":"Button","component.http.title":"HTTP","component.logbook.title":"Logbook"}}}

2022-05-06 02:12:11 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=calendar.garbage_collection, old_state=<state calendar.garbage_collection=off; friendly_name=Garbage Collection @ 2022-05-06T02:11:11.882475-04:00>, new_state=<state calendar.garbage_collection=on; message=Recyclables, all_day=True, start_time=2022-05-06 00:00:00, end_time=2022-05-07 00:00:00, location=, description=, friendly_name=Garbage Collection @ 2022-05-06T02:12:11.942285-04:00>>
Sudo-Rob commented 2 years ago

Thanks. It's working now.