Skip to content

Commit

Permalink
Fix climate updates from SyncWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Nov 5, 2024
1 parent 5629d9d commit 61235df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/yandex_station/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ def track_template(hass: HomeAssistant, template: str, update: Callable) -> Call
template = Template(template, hass)
update(template.async_render())

def action(event, updates: list[TrackTemplateResult]):
# important to use async because from sync action will be problems with update state
async def action(event, updates: list[TrackTemplateResult]):
update(next(i.result for i in updates))

track = async_track_template_result(
Expand Down

0 comments on commit 61235df

Please sign in to comment.