From 0b02870489053982a4e0934dc8a80f950cde993f Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Fri, 28 Jan 2022 15:54:19 +0100 Subject: [PATCH] Goodwe - fix value errors (#65121) --- homeassistant/components/goodwe/number.py | 2 +- homeassistant/components/goodwe/select.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/goodwe/number.py b/homeassistant/components/goodwe/number.py index 614cab3d90a..06a31a4e10a 100644 --- a/homeassistant/components/goodwe/number.py +++ b/homeassistant/components/goodwe/number.py @@ -76,7 +76,7 @@ async def async_setup_entry( for description in NUMBERS: try: current_value = await description.getter(inverter) - except InverterError: + except (InverterError, ValueError): # Inverter model does not support this setting _LOGGER.debug("Could not read inverter setting %s", description.key) continue diff --git a/homeassistant/components/goodwe/select.py b/homeassistant/components/goodwe/select.py index b8ff5c91a3c..985c799110d 100644 --- a/homeassistant/components/goodwe/select.py +++ b/homeassistant/components/goodwe/select.py @@ -42,7 +42,7 @@ async def async_setup_entry( # read current operating mode from the inverter try: active_mode = await inverter.get_operation_mode() - except InverterError: + except (InverterError, ValueError): # Inverter model does not support this setting _LOGGER.debug("Could not read inverter operation mode") else: