Fix pipeline select (#91570)

Fix pipline select
This commit is contained in:
Bram Kragten
2023-04-18 00:55:38 +02:00
committed by GitHub
parent c663f7677c
commit c6b4c88355

View File

@@ -31,7 +31,7 @@ def get_chosen_pipeline(
if state is None or state.state == OPTION_PREFERRED: if state is None or state.state == OPTION_PREFERRED:
return None return None
pipeline_store: PipelineStorageCollection = hass.data[DOMAIN] pipeline_store: PipelineStorageCollection = hass.data[DOMAIN].pipeline_store
return next( return next(
(item.id for item in pipeline_store.async_items() if item.name == state.state), (item.id for item in pipeline_store.async_items() if item.name == state.state),
None, None,