From 88f86bedaf5d44cb9f83456c90262fdb720b2946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Pantale=C3=A3o=20Gon=C3=A7alves?= <5808343+bgoncal@users.noreply.github.com> Date: Sat, 19 Sep 2026 14:56:20 +0200 Subject: [PATCH] Add instance ID to mobile_app get_config response (#182644) --- homeassistant/components/mobile_app/webhook.py | 2 ++ tests/components/mobile_app/test_webhook.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/mobile_app/webhook.py b/homeassistant/components/mobile_app/webhook.py index 16b37e5f1bb5..48e3dc1af199 100644 --- a/homeassistant/components/mobile_app/webhook.py +++ b/homeassistant/components/mobile_app/webhook.py @@ -55,6 +55,7 @@ from homeassistant.helpers import ( config_validation as cv, device_registry as dr, entity_registry as er, + instance_id, template, ) from homeassistant.helpers.dispatcher import async_dispatcher_send @@ -738,6 +739,7 @@ async def webhook_get_config( "longitude": hass_config["longitude"], "elevation": hass_config["elevation"], "hass_device_id": device.id, + "instance_id": await instance_id.async_get(hass), "unit_system": hass_config["unit_system"], "location_name": hass_config["location_name"], "time_zone": hass_config["time_zone"], diff --git a/tests/components/mobile_app/test_webhook.py b/tests/components/mobile_app/test_webhook.py index 3c1ec10c93e1..1d6a26d95d3b 100644 --- a/tests/components/mobile_app/test_webhook.py +++ b/tests/components/mobile_app/test_webhook.py @@ -24,7 +24,11 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import device_registry as dr, entity_registry as er +from homeassistant.helpers import ( + device_registry as dr, + entity_registry as er, + instance_id, +) from homeassistant.setup import async_setup_component from .const import CALL_SERVICE, FIRE_EVENT, REGISTER_CLEARTEXT, RENDER_TEMPLATE, UPDATE @@ -297,6 +301,7 @@ async def test_webhook_handle_get_config( "longitude": hass_config["longitude"], "elevation": hass_config["elevation"], "hass_device_id": device.id, + "instance_id": await instance_id.async_get(hass), "unit_system": hass_config["unit_system"], "location_name": hass_config["location_name"], "time_zone": hass_config["time_zone"],