mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove group_type
from group preview events (#98952)
This commit is contained in:
parent
998a390da5
commit
2066cf6b31
@ -343,8 +343,7 @@ def ws_start_preview(
|
|||||||
"""Forward config entry state events to websocket."""
|
"""Forward config entry state events to websocket."""
|
||||||
connection.send_message(
|
connection.send_message(
|
||||||
websocket_api.event_message(
|
websocket_api.event_message(
|
||||||
msg["id"],
|
msg["id"], {"attributes": attributes, "state": state}
|
||||||
{"attributes": attributes, "group_type": group_type, "state": state},
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -524,7 +524,6 @@ async def test_config_flow_preview(
|
|||||||
msg = await client.receive_json()
|
msg = await client.receive_json()
|
||||||
assert msg["event"] == {
|
assert msg["event"] == {
|
||||||
"attributes": {"friendly_name": "My group"} | extra_attributes[0],
|
"attributes": {"friendly_name": "My group"} | extra_attributes[0],
|
||||||
"group_type": domain,
|
|
||||||
"state": "unavailable",
|
"state": "unavailable",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,7 +538,6 @@ async def test_config_flow_preview(
|
|||||||
}
|
}
|
||||||
| extra_attributes[0]
|
| extra_attributes[0]
|
||||||
| extra_attributes[1],
|
| extra_attributes[1],
|
||||||
"group_type": domain,
|
|
||||||
"state": group_state,
|
"state": group_state,
|
||||||
}
|
}
|
||||||
assert len(hass.states.async_all()) == 2
|
assert len(hass.states.async_all()) == 2
|
||||||
@ -622,7 +620,6 @@ async def test_option_flow_preview(
|
|||||||
assert msg["event"] == {
|
assert msg["event"] == {
|
||||||
"attributes": {"entity_id": input_entities, "friendly_name": "My group"}
|
"attributes": {"entity_id": input_entities, "friendly_name": "My group"}
|
||||||
| extra_attributes,
|
| extra_attributes,
|
||||||
"group_type": domain,
|
|
||||||
"state": group_state,
|
"state": group_state,
|
||||||
}
|
}
|
||||||
assert len(hass.states.async_all()) == 3
|
assert len(hass.states.async_all()) == 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user