From b1898a5cfde7a8aee1a29fbca7d507cf9b1349b3 Mon Sep 17 00:00:00 2001 From: "firstof9@gmail.com" Date: Thu, 19 Dec 2024 07:06:25 -0700 Subject: [PATCH] fix: handle `UnsupportedFeature` exception in UpdateCoordinator --- custom_components/openevse/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/openevse/__init__.py b/custom_components/openevse/__init__.py index d08a002..1754a80 100644 --- a/custom_components/openevse/__init__.py +++ b/custom_components/openevse/__init__.py @@ -26,7 +26,7 @@ from homeassistant.helpers.event import async_track_state_change_event from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from openevsehttp.__main__ import OpenEVSE -from openevsehttp.exceptions import MissingSerial +from openevsehttp.exceptions import MissingSerial, UnsupportedFeature from .const import ( BINARY_SENSORS, @@ -365,7 +365,7 @@ def parse_sensors(self) -> None: sensor_property, _sensor[binary_sensor], ) - except (ValueError, KeyError): + except (ValueError, KeyError, UnsupportedFeature): _LOGGER.info( "Could not update status for %s", binary_sensor, @@ -383,7 +383,7 @@ def parse_sensors(self) -> None: sensor_property, _sensor[select], ) - except (ValueError, KeyError): + except (ValueError, KeyError, UnsupportedFeature): _LOGGER.info( "Could not update status for %s", select, @@ -401,7 +401,7 @@ def parse_sensors(self) -> None: sensor_property, _sensor[light], ) - except (ValueError, KeyError): + except (ValueError, KeyError, UnsupportedFeature): _LOGGER.info( "Could not update status for %s", light,