joleys / niko-home-control-II

Home Assistant Custom Integration for Niko Home Control II
MIT License
74 stars 21 forks source link

Wrap `dev_reg.async_get_or_create` with `hass.add_job` #140

Closed ubipo closed 5 months ago

ubipo commented 5 months ago

Makes it so the eventual call to device_registry.async_update_device() is executed on the event loop. See HomeAssistant.add_job(). Related to #136 / #137.

Fixes #139 .

ubipo commented 5 months ago

The patch works (all devices are added after running through the wizard), but I think it may be throwing a silent error now. Needs investigating, please hold off on merging.

ubipo commented 5 months ago

Okay, good to go now