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
387 stars 90 forks source link

TEST #352

Closed bruxy70 closed 2 years ago

bruxy70 commented 2 years ago

Before you submit a new bug report, please check that

Describe the bug

Test

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.2.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Prague",
    "os_name": "Linux",
    "os_version": "5.10.98",
    "supervisor": "2022.01.1",
    "host_os": "Home Assistant OS 7.4",
    "docker_version": "20.10.9",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "garmin_connect": {
      "version": "0.1.8",
      "requirements": [
        "garminconnect==0.1.24"
      ]
    },
    "mikrotik_router": {
      "version": "0.0.0",
      "requirements": [
        "librouteros==3.0.0",
        "mac-vendor-lookup==0.1.11"
      ]
    },
    "webrtc": {
      "version": "v2.2.0",
      "requirements": []
    },
    "smart_thermostat": {
      "version": "2021.11.1",
      "requirements": []
    },
    "pirateweather": {
      "version": "0.1.0",
      "requirements": [
        "python-forecastio==1.4.0"
      ]
    },
    "openweathermap_all": {
      "version": "0.0.1",
      "requirements": [
        "owm2json==0.1.89"
      ]
    },
    "reolink_dev": {
      "version": "0.49",
      "requirements": [
        "reolink==0.0.60"
      ]
    },
    "holidays": {
      "version": "1.6",
      "requirements": [
        "python-dateutil>=2.8.1",
        "holidays>=0.12"
      ]
    },
    "garbage_collection": {
      "version": "4.4.2",
      "requirements": [
        "python-dateutil>=2.8.1"
      ]
    },
    "google_home": {
      "version": "1.9.7",
      "requirements": [
        "glocaltokens==0.6.2"
      ]
    },
    "browser_mod": {
      "version": "1.3.1",
      "requirements": []
    },
    "thermal_comfort": {
      "version": "1.4.3",
      "requirements": []
    },
    "spotcast": {
      "version": "v3.6.24",
      "requirements": [
        "spotify_token==1.0.0"
      ]
    },
    "sonoff": {
      "version": "v2.4.6",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "hacs": {
      "version": "1.22.0",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "frigate": {
      "version": "2.2.2",
      "requirements": []
    },
    "presence_simulation": {
      "version": "1.12",
      "requirements": []
    },
    "skodaconnect": {
      "version": "v1.0.66",
      "requirements": [
        "skodaconnect>=1.1.18",
        "homeassistant>=2021.12.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.4.2",
    "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.1"
    ],
    "is_built_in": false
  },
  "data": {
    "entity_id": "sensor.test",
    "state": 2,
    "attributes": {
      "next_date": null,
      "days": null,
      "last_collection": "1970-01-01T00:00:00+01:00",
      "last_updated": "2022-02-10T15:47:54.920470+01:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "30451a240d1345dd214800571b62737f",
      "version": 4,
      "domain": "garbage_collection",
      "title": "test",
      "data": {
        "unique_id": "5e69b68f-2e3c-479d-a702-a95097bcaae4",
        "frequency": "blank",
        "icon_normal": "mdi:trash-can",
        "icon_today": "mdi:delete-restore",
        "icon_tomorrow": "mdi:delete-circle"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

2022-02-10 15:45:58 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration mikrotik_router which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration garmin_connect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration webrtc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration openweathermap_all which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration reolink_dev which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration smart_thermostat which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration garbage_collection which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration pirateweather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration google_home which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration holidays which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration thermal_comfort which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_7) [homeassistant.loader] We found a custom integration browser_mod which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration spotcast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_8) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration skodaconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_9) [homeassistant.loader] We found a custom integration frigate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:45:58 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration presence_simulation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-02-10 15:46:02 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139718003437136] Received invalid command: browser_mod/connect
2022-02-10 15:46:03 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139718003437136] Received invalid command: browser_mod/update
2022-02-10 15:46:06 ERROR (MainThread) [homeassistant.components.notify] Failed to initialize notification service webostv
2022-02-10 15:46:11 ERROR (MainThread) [custom_components.garmin_connect] Connection error occurred during Garmin Connect login request: Forbidden url
2022-02-10 15:46:17 DEBUG (MainThread) [custom_components.garbage_collection] Setting Směs (odd-weeks) from ConfigFlow
2022-02-10 15:46:17 DEBUG (MainThread) [custom_components.garbage_collection] Setting Bioodpad (odd-weeks) from ConfigFlow
2022-02-10 15:46:17 DEBUG (MainThread) [custom_components.garbage_collection] Setting Papír (even-weeks) from ConfigFlow
2022-02-10 15:46:17 DEBUG (MainThread) [custom_components.garbage_collection] Setting Plasty (odd-weeks) from ConfigFlow
2022-02-10 15:46:17 DEBUG (MainThread) [custom_components.holidays] Setting England Holidays from ConfigFlow
2022-02-10 15:46:18 DEBUG (MainThread) [custom_components.garbage_collection.sensor] Creating garbage_collection calendar
2022-02-10 15:46:31 ERROR (MainThread) [custom_components.garmin_connect] Connection error occurred during Garmin Connect login request: Forbidden url
2022-02-10 15:46:32 ERROR (MainThread) [custom_components.hacs] HacsTask<update_critical_repositories> failed: <Integration custom-components/sensor.custom_aftership> Repository has been requested to be removed.
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Směs) Calling update
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Směs) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Směs) Looking for next collection
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Směs) next_date (2022-02-16), today (2022-02-10)
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Směs) Found next collection date: 16-Feb-2022, that is in 6 days
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) Calling update
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) 2021-01-01 outside the range, searching from mar
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) 2021-11-11 outside the range, lookig from mar next year
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) 2022-11-10 outside the range, lookig from mar next year
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) 2023-11-09 outside the range, lookig from mar next year
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Papír) Calling update
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Papír) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Papír) Looking for next collection
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Papír) next_date (2022-02-11), today (2022-02-10)
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Papír) Found next collection date: 11-Feb-2022, that is in 1 days
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Plasty) Calling update
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Plasty) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Plasty) Looking for next collection
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Plasty) next_date (2022-02-18), today (2022-02-10)
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Plasty) Found next collection date: 18-Feb-2022, that is in 8 days
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called remove_date 2022-03-03 from sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called add_date 2022-01-20 from sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called add_date 2022-02-17 from sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called add_date 2022-11-24 from sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called add_date 2022-12-22 from sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.bioodpad
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) Looking for next collection
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) next_date (2022-02-17), today (2022-02-10)
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Bioodpad) Found next collection date: 17-Feb-2022, that is in 7 days
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.holidays.calendar] (England Holidays) Calling update
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.holidays.calendar] (England Holidays) Country Holidays with parameters: country: England, prov: , state: , observed: True
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.holidays.calendar] (England Holidays) Found these holidays:
2021-01-01: New Year's Day
2021-04-02: Good Friday
2021-04-05: Easter Monday
2021-05-03: May Day
2021-05-31: Spring Bank Holiday
2021-08-30: Late Summer Bank Holiday
2021-12-25: Christmas Day
2021-12-26: Boxing Day
2021-12-27: Christmas Day (Observed)
2021-12-28: Boxing Day (Observed)
2022-01-01: New Year's Day
2022-01-03: New Year's Day (Observed)
2022-04-15: Good Friday
2022-04-18: Easter Monday
2022-05-02: May Day
2022-06-02: Spring Bank Holiday
2022-06-03: Platinum Jubilee of Elizabeth II
2022-08-29: Late Summer Bank Holiday
2022-12-25: Christmas Day
2022-12-26: Boxing Day
2022-12-27: Christmas Day (Observed)
2023-01-01: New Year's Day
2023-01-02: New Year's Day (Observed)
2023-04-07: Good Friday
2023-04-10: Easter Monday
2023-05-01: May Day
2023-05-29: Spring Bank Holiday
2023-08-28: Late Summer Bank Holiday
2023-12-25: Christmas Day
2023-12-26: Boxing Day
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.holidays.calendar] (England Holidays) Looking for next collection
2022-02-10 15:46:38 DEBUG (MainThread) [custom_components.holidays.calendar] (England Holidays) next_date (2022-04-15), today (2022-02-10)
2022-02-10 15:46:42 ERROR (MainThread) [custom_components.garmin_connect] Connection error occurred during Garmin Connect login request: Forbidden url
2022-02-10 15:47:01 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'zigbee2mqtt/loznice_color': '{"brightness":253,"color":{"x":0.421,"y":0.409},"linkquality":null,"power_on_behavior":null,"state":"OFF","update":{"state":"idle"},"update_available":false}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 42, in wrapper
msg_callback(msg)
File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 326, in state_received
self._update_color(values)
File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 265, in _update_color
color_mode = values["color_mode"]
KeyError: 'color_mode'
2022-02-10 15:47:29 DEBUG (MainThread) [custom_components.garbage_collection] Setting test (blank) from ConfigFlow
2022-02-10 15:47:29 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Calling update
2022-02-10 15:47:29 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Calling update
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.test
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Looking for next collection
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.test
2022-02-10 15:47:39 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Looking for next collection
2022-02-10 15:47:44 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Calling update
2022-02-10 15:47:44 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Calling update
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Dates loaded, firing a garbage_collection_loaded event
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.test
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Looking for next collection
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection] called update_state for sensor.test
2022-02-10 15:47:54 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (test) Looking for next collection
2022-02-10 16:04:23 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 192.168.22.42 data: Unable to connect to the device: 192.168.22.42
2022-02-10 16:10:03 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 192.168.22.180 data: Unable to connect to the device: 192.168.22.180
2022-02-10 16:19:31 ERROR (MainThread) [homeassistant.components.octoprint] Error requesting octoprint-48d800662edcc1880da7990c06f5520c data: Cannot connect to host 192.168.1.130:80 ssl:default [Connect call failed ('192.168.1.130', 80)]
2022-02-10 16:31:52 ERROR (Thread-6) [pychromecast.socket_client] [Pracovna Assistant(192.168.1.71):8009] Failed to connect to service ServiceInfo(type='mdns', data='Google-Home-Mini-ce801c5082b4ba7906194f9736a44cd4._googlecast._tcp.local.'), retrying in 5.0s
2022-02-10 16:45:31 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 192.168.22.42 data: Unable to connect to the device: 192.168.22.42
2022-02-10 16:51:07 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 192.168.22.180 data: Unable to connect to the device: 192.168.22.180