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: for description in NUMBERS:
try: try:
current_value = await description.getter(inverter) current_value = await description.getter(inverter)
except InverterError: except (InverterError, ValueError):
# Inverter model does not support this setting # Inverter model does not support this setting
_LOGGER.debug("Could not read inverter setting %s", description.key) _LOGGER.debug("Could not read inverter setting %s", description.key)
continue continue

View File

@ -42,7 +42,7 @@ async def async_setup_entry(
# read current operating mode from the inverter # read current operating mode from the inverter
try: try:
active_mode = await inverter.get_operation_mode() active_mode = await inverter.get_operation_mode()
except InverterError: except (InverterError, ValueError):
# Inverter model does not support this setting # Inverter model does not support this setting
_LOGGER.debug("Could not read inverter operation mode") _LOGGER.debug("Could not read inverter operation mode")
else: else: