Fix unhandled KeyError in Recollect Waste (#44224)

This commit is contained in:
Aaron Bach 2020-12-14 13:03:25 -07:00 committed by GitHub
parent a7fca3cf23
commit 38d16d3e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/recollect_waste",
"requirements": [
"aiorecollect==0.2.2"
"aiorecollect==1.0.1"
],
"codeowners": [
"@bachya"

View File

@ -120,9 +120,11 @@ class RecollectWasteSensor(CoordinatorEntity):
self._state = pickup_event.date
self._attributes.update(
{
ATTR_PICKUP_TYPES: pickup_event.pickup_types,
ATTR_PICKUP_TYPES: [t.name for t in pickup_event.pickup_types],
ATTR_AREA_NAME: pickup_event.area_name,
ATTR_NEXT_PICKUP_TYPES: next_pickup_event.pickup_types,
ATTR_NEXT_PICKUP_TYPES: [
t.name for t in next_pickup_event.pickup_types
],
ATTR_NEXT_PICKUP_DATE: next_date,
}
)

View File

@ -215,7 +215,7 @@ aiopvpc==2.0.2
aiopylgtv==0.3.3
# homeassistant.components.recollect_waste
aiorecollect==0.2.2
aiorecollect==1.0.1
# homeassistant.components.shelly
aioshelly==0.5.1

View File

@ -131,7 +131,7 @@ aiopvpc==2.0.2
aiopylgtv==0.3.3
# homeassistant.components.recollect_waste
aiorecollect==0.2.2
aiorecollect==1.0.1
# homeassistant.components.shelly
aioshelly==0.5.1