Add missing CozyTouch servers to ConfigFlow expection handler in Overkiz (#131696)

pull/133443/head
Mick Vleeshouwer 2024-12-17 20:22:07 +01:00 committed by GitHub
parent d785c4b0b1
commit a7ba63bf86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -151,9 +151,11 @@ class OverkizConfigFlow(ConfigFlow, domain=DOMAIN):
except BadCredentialsException as exception:
# If authentication with CozyTouch auth server is valid, but token is invalid
# for Overkiz API server, the hardware is not supported.
if user_input[CONF_HUB] == Server.ATLANTIC_COZYTOUCH and not isinstance(
exception, CozyTouchBadCredentialsException
):
if user_input[CONF_HUB] in {
Server.ATLANTIC_COZYTOUCH,
Server.SAUTER_COZYTOUCH,
Server.THERMOR_COZYTOUCH,
} and not isinstance(exception, CozyTouchBadCredentialsException):
description_placeholders["unsupported_device"] = "CozyTouch"
errors["base"] = "unsupported_hardware"
else: