mirror of
https://github.com/home-assistant/core.git
synced 2025-09-06 21:31:34 +02:00
Add HA version to device analytics (#150877)
This commit is contained in:
@@ -449,5 +449,6 @@ async def async_devices_payload(hass: HomeAssistant) -> dict:
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"version": "home-assistant:1",
|
"version": "home-assistant:1",
|
||||||
|
"home_assistant": HA_VERSION,
|
||||||
"devices": devices,
|
"devices": devices,
|
||||||
}
|
}
|
||||||
|
@@ -985,6 +985,7 @@ async def test_devices_payload(
|
|||||||
assert await async_setup_component(hass, "analytics", {})
|
assert await async_setup_component(hass, "analytics", {})
|
||||||
assert await async_devices_payload(hass) == {
|
assert await async_devices_payload(hass) == {
|
||||||
"version": "home-assistant:1",
|
"version": "home-assistant:1",
|
||||||
|
"home_assistant": MOCK_VERSION,
|
||||||
"devices": [],
|
"devices": [],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,6 +1053,7 @@ async def test_devices_payload(
|
|||||||
|
|
||||||
assert await async_devices_payload(hass) == {
|
assert await async_devices_payload(hass) == {
|
||||||
"version": "home-assistant:1",
|
"version": "home-assistant:1",
|
||||||
|
"home_assistant": MOCK_VERSION,
|
||||||
"devices": [
|
"devices": [
|
||||||
{
|
{
|
||||||
"manufacturer": "test-manufacturer",
|
"manufacturer": "test-manufacturer",
|
||||||
|
Reference in New Issue
Block a user