dcmeglio / homeassistant-waste_management

Determines your next Waste Management (https://www.wm.com) pickup times for use in Home Assistant.
7 stars 0 forks source link

RuntimeWarning: coroutine 'WasteManagementSensorEntity.async_update' was never awaited #9

Open johntdyer opened 10 months ago

johntdyer commented 10 months ago

Sensor stopped updating, I have tried removing and re-adding but it has not made any change. The sensor is unavailable.

I turned on debug logging but it didnt show to much more...

2024-01-05 17:50:37.564 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-01-05 17:50:37.576 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-01-05 17:50:37.603 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-01-05 17:50:37.624 INFO (MainThread) [homeassistant.components.calendar] Setting up waste_collection_schedule.calendar
2024-01-05 17:50:51.686 INFO (MainThread) [homeassistant.setup] Setting up waste_management
2024-01-05 17:50:51.686 INFO (MainThread) [homeassistant.setup] Setup of domain waste_management took 0.0 seconds
2024-01-05 17:51:10.009 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 17:51:10.012 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 17:51:20.215 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform waste_management is taking over 10 seconds.
2024-01-05 17:51:20.215 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform waste_management is taking over 10 seconds.
2024-01-05 17:51:30.410 ERROR (MainThread) [homeassistant.components.sensor] Platform waste_management does not generate unique IDs. ID 000264663993008_2 already exists - ignoring sensor.waste_management_recycle_pickup_day
2024-01-05 17:51:31.863 ERROR (MainThread) [homeassistant.components.sensor] Platform waste_management does not generate unique IDs. ID 000264663993008_1 already exists - ignoring sensor.waste_management_trash_pickup_day
2024-01-05 17:51:51.382 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({% set t = now() %} {% set midnight = today_at() %} {% set event = states('sensor.waste_management_recycle_pickup_day') | as_datetime | as_local %} {% set delta = event - midnight %} {% if delta.days == 0 %}
2024-01-05 17:51:51.386 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('AttributeError: 'NoneType' object has no attribute 'tzinfo'') while processing template 'Template<template=({% set t = now() %} {% set midnight = today_at() %} {% set event = states('sensor.waste_management_recycle_pickup_day') | as_datetime | as_local %} {% set delta = event - midnight %} {% if delta.days == 0 %}
2024-01-05 18:50:07.366 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:50:55.371 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:51:05.371 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform waste_management is taking over 10 seconds.
2024-01-05 18:53:13.605 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:54:35.839 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:54:53.419 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:58:03.944 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-05 18:58:13.061 ERROR (MainThread) [homeassistant.components.sensor] Platform waste_management does not generate unique IDs. ID 000264663993008_2 already exists - ignoring sensor.96_gallon_cart_service_recycle_materials
2024-01-05 18:58:13.339 ERROR (MainThread) [homeassistant.components.sensor] Platform waste_management does not generate unique IDs. ID 000264663993008_1 already exists - ignoring sensor.96_gallon_toter
2024-01-05 19:01:00.160 WARNING (MainThread) [py.warnings] /config/custom_components/waste_management/sensor.py:72: RuntimeWarning: coroutine 'WasteManagementSensorEntity.async_update' was never awaited
2024-01-05 19:01:17.053 WARNING (MainThread) [py.warnings] /config/custom_components/waste_management/sensor.py:72: RuntimeWarning: coroutine 'WasteManagementSensorEntity.async_update' was never awaited
2024-01-05 19:01:47.052 WARNING (MainThread) [py.warnings] /config/custom_components/waste_management/sensor.py:72: RuntimeWarning: coroutine 'WasteManagementSensorEntity.async_update' was never awaited

Home assistant 2024.01

johntdyer commented 10 months ago

noticed some new errors this morning

2024-01-07 10:11:18.109 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-07 10:11:18.597 ERROR (MainThread) [custom_components.waste_management.sensor] Error setting up sensor platform: 'sessionToken'
2024-01-07 10:11:22.093 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-07 10:11:22.371 ERROR (MainThread) [custom_components.waste_management.sensor] Error setting up sensor platform: 'sessionToken'
2024-01-07 10:14:18.613 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-07 10:14:18.957 ERROR (MainThread) [custom_components.waste_management.sensor] Error setting up sensor platform: 'sessionToken'
2024-01-07 10:14:22.374 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_management.sensor
2024-01-07 10:14:25.060 ERROR (MainThread) [custom_components.waste_management.sensor] Error setting up sensor platform: 'sessionToken'
dcmeglio commented 10 months ago

Unfortunately I no longer have waste management service, so I'm not able to test as I can't access the system without a username and password. If someone else raises a PR to fix the issue I'm happy to review and merge.