disabled_by can be None when updating devices (#65934)

This commit is contained in:
Joakim Sørensen
2022-02-06 20:23:31 +01:00
committed by GitHub
parent ccdf182d31
commit 63d3a47599

View File

@@ -62,7 +62,7 @@ async def websocket_update_device(hass, connection, msg):
msg.pop("type")
msg_id = msg.pop("id")
if "disabled_by" in msg:
if msg.get("disabled_by") is not None:
msg["disabled_by"] = DeviceEntryDisabler(msg["disabled_by"])
entry = registry.async_update_device(**msg)