Always set _attr_current_option in Nobø Hub select entities (#105289)

Always set _attr_current_option in select entities.
This commit is contained in:
Øyvind Matheson Wergeland 2023-12-08 14:42:42 +01:00 committed by GitHub
parent 6b7dace8d4
commit a10f580815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ class NoboGlobalSelector(SelectEntity):
nobo.API.OVERRIDE_MODE_ECO: "eco",
}
_attr_options = list(_modes.values())
_attr_current_option: str
_attr_current_option: str | None = None
def __init__(self, hub: nobo, override_type) -> None:
"""Initialize the global override selector."""
@ -117,7 +117,7 @@ class NoboProfileSelector(SelectEntity):
_attr_should_poll = False
_profiles: dict[int, str] = {}
_attr_options: list[str] = []
_attr_current_option: str
_attr_current_option: str | None = None
def __init__(self, zone_id: str, hub: nobo) -> None:
"""Initialize the week profile selector."""