Fix reload for Shelly devices with no script support (#147344)

This commit is contained in:
Simone Chemelli 2025-06-23 15:38:16 +03:00 committed by GitHub
parent 756b858840
commit 2e155831e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -835,6 +835,15 @@ class ShellyRpcCoordinator(ShellyCoordinatorBase[RpcDevice]):
except InvalidAuthError:
self.config_entry.async_start_reauth(self.hass)
return
except RpcCallError as err:
# Ignore 404 (No handler for) error
if err.code != 404:
LOGGER.debug(
"Error during shutdown for device %s: %s",
self.name,
err.message,
)
return
except DeviceConnectionError as err:
# If the device is restarting or has gone offline before
# the ping/pong timeout happens, the shutdown command