Skip to content

Conversation

@Moustachauve
Copy link
Contributor

The _save_history method in HiloRewardSensor was performing a synchronous yaml.dump on the main event loop, causing blocking. This change offloads the serialization to the default executor using asyncio.get_running_loop().run_in_executor, ensuring the main loop remains responsive.

Fixes the TODO item at custom_components/hilo/sensor.py:781.

Created from Moustachauve/WLED-Android#55 in Jules

The `_save_history` method in `HiloRewardSensor` was performing a synchronous `yaml.dump` on the main event loop, causing blocking. This change offloads the serialization to the default executor using `asyncio.get_running_loop().run_in_executor`, ensuring the main loop remains responsive.

Fixes the TODO item at custom_components/hilo/sensor.py:781.
@Moustachauve Moustachauve marked this pull request as draft December 6, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant