1
mirror of https://github.com/home-assistant/core synced 2024-07-27 18:58:57 +02:00

Fix passing a string to device registry disabled_by (#65701)

This commit is contained in:
Paulus Schoutsen 2022-02-04 10:55:45 -08:00 committed by GitHub
parent 020953e943
commit 8574ee04ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,9 @@ async def websocket_update_device(hass, connection, msg):
msg.pop("type")
msg_id = msg.pop("id")
if "disabled_by" in msg:
msg["disabled_by"] = DeviceEntryDisabler(msg["disabled_by"])
entry = registry.async_update_device(**msg)
connection.send_message(websocket_api.result_message(msg_id, _entry_dict(entry)))