From 2c43672a8ad676e6c9f3da4d5f2451c366ac52ab Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Thu, 1 Jun 2023 13:53:41 -0400 Subject: [PATCH] Include port info in the ZHA websocket settings response (#93934) --- homeassistant/components/zha/websocket_api.py | 2 ++ tests/components/zha/test_websocket_api.py | 1 + 2 files changed, 3 insertions(+) diff --git a/homeassistant/components/zha/websocket_api.py b/homeassistant/components/zha/websocket_api.py index 019a5c50238..28e115c0ec4 100644 --- a/homeassistant/components/zha/websocket_api.py +++ b/homeassistant/components/zha/websocket_api.py @@ -7,6 +7,7 @@ from typing import TYPE_CHECKING, Any, Literal, NamedTuple, TypeVar, cast import voluptuous as vol import zigpy.backups +from zigpy.config import CONF_DEVICE from zigpy.config.validators import cv_boolean from zigpy.types.named import EUI64 from zigpy.zcl.clusters.security import IasAce @@ -1136,6 +1137,7 @@ async def websocket_get_network_settings( msg[ID], { "radio_type": async_get_radio_type(hass, zha_gateway.config_entry).name, + "device": zha_gateway.application_controller.config[CONF_DEVICE], "settings": backup.as_dict(), }, ) diff --git a/tests/components/zha/test_websocket_api.py b/tests/components/zha/test_websocket_api.py index 720cfaaac9b..5250b62a9b0 100644 --- a/tests/components/zha/test_websocket_api.py +++ b/tests/components/zha/test_websocket_api.py @@ -744,6 +744,7 @@ async def test_get_network_settings( assert msg["success"] assert "radio_type" in msg["result"] assert "network_info" in msg["result"]["settings"] + assert "path" in msg["result"]["device"] async def test_list_network_backups(