Goodwe - fix value errors (#65121)

This commit is contained in:
starkillerOG 2022-01-28 15:54:19 +01:00 committed by GitHub
parent 75f39f9ca2
commit 0b02870489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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: