Fix program key

This commit is contained in:
Paul Bottein
2025-08-11 23:41:35 +02:00
parent 9426573619
commit 31581bedef

View File

@@ -253,14 +253,12 @@ class HomeConnectCoordinator(
EventKey.BSH_COMMON_ROOT_ACTIVE_PROGRAM, EventKey.BSH_COMMON_ROOT_ACTIVE_PROGRAM,
EventKey.BSH_COMMON_ROOT_SELECTED_PROGRAM, EventKey.BSH_COMMON_ROOT_SELECTED_PROGRAM,
): ):
program_key = ProgramKey( program_key = ProgramKey(cast(str, event.value))
ProgramKey(cast(str, event.value)),
)
# If the active program is unknown, options must be updated using the selected program. # If the active program is unknown, options must be updated using the selected program.
if ( if (
event_key event_key
== EventKey.BSH_COMMON_ROOT_ACTIVE_PROGRAM is EventKey.BSH_COMMON_ROOT_ACTIVE_PROGRAM
and event.value == ProgramKey.UNKNOWN and event.value is ProgramKey.UNKNOWN
): ):
select_program_event = events.get( select_program_event = events.get(
EventKey.BSH_COMMON_ROOT_SELECTED_PROGRAM EventKey.BSH_COMMON_ROOT_SELECTED_PROGRAM