From 2d06a115ccae537839d72b74380c3f83c51bba85 Mon Sep 17 00:00:00 2001 From: Pierre Ingmansson Date: Sun, 12 May 2024 14:17:06 +0200 Subject: [PATCH] Catching TypeError in native_value --- custom_components/volkswagen_we_connect_id/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/volkswagen_we_connect_id/sensor.py b/custom_components/volkswagen_we_connect_id/sensor.py index cec72d5..14fc520 100644 --- a/custom_components/volkswagen_we_connect_id/sensor.py +++ b/custom_components/volkswagen_we_connect_id/sensor.py @@ -498,7 +498,7 @@ def native_value(self) -> StateType: try: state = get_object_value(self.entity_description.value(self.data.domains)) - except (KeyError, ValueError): + except (TypeError, KeyError, ValueError): return None return cast(StateType, state)