From a960c8e9ad43dc30f1725de356eea66e7a688c41 Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Mon, 23 Dec 2024 23:14:40 +0100 Subject: [PATCH] fix: initial device state after setup flow Set the device state to connected after adding a new device in the setup flow. Otherwise, the web-configurator might show the integration as disconnected. --- intg-denonavr/driver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/intg-denonavr/driver.py b/intg-denonavr/driver.py index 2b8f4ec..9478957 100644 --- a/intg-denonavr/driver.py +++ b/intg-denonavr/driver.py @@ -315,6 +315,7 @@ def _register_available_entities(device: config.AvrDevice, receiver: avr.DenonDe def on_device_added(device: config.AvrDevice) -> None: """Handle a newly added device in the configuration.""" _LOG.debug("New device added: %s", device) + _LOOP.create_task(api.set_device_state(ucapi.DeviceStates.CONNECTED)) # just to make sure the device state is set _configure_new_avr(device, connect=False)