From 8d352abbf813299c7a58469a6c6b5db3d5a97caa Mon Sep 17 00:00:00 2001 From: GSzabados <35445496+GSzabados@users.noreply.github.com> Date: Tue, 18 Feb 2025 00:05:33 +0100 Subject: [PATCH] Fixing TypeError: 'WhereBucketValue' object is not subscriptable #401 This should handle the error, as it is already handled a few lines above the same way. --- custom_components/nest_protect/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/nest_protect/__init__.py b/custom_components/nest_protect/__init__.py index 280cd0b..031c824 100644 --- a/custom_components/nest_protect/__init__.py +++ b/custom_components/nest_protect/__init__.py @@ -190,8 +190,8 @@ async def _async_subscribe_for_data( if key.startswith("where."): bucket_value = Bucket(**bucket).value - for area in bucket_value["wheres"]: - entry_data.areas[area["where_id"]] = area["name"] + for area in bucket_value.wheres: + entry_data.areas[area.where_id] = area.name # Temperature Sensors if key.startswith("kryptonite."):