Remove group_type from group preview events (#98952)

This commit is contained in:
Erik Montnemery 2023-08-24 19:54:04 +02:00 committed by GitHub
parent 998a390da5
commit 2066cf6b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -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},
) )
) )

View File

@ -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