Mark counter domain as continuous to exclude it from logbook (#73101)
This commit is contained in:
parent
457c7a4ddc
commit
0b62944148
6 changed files with 66 additions and 20 deletions
|
@ -2209,7 +2209,9 @@ async def test_recorder_is_far_behind(hass, recorder_mock, hass_ws_client, caplo
|
|||
|
||||
|
||||
@patch("homeassistant.components.logbook.websocket_api.EVENT_COALESCE_TIME", 0)
|
||||
async def test_subscribe_all_entities_have_uom(hass, recorder_mock, hass_ws_client):
|
||||
async def test_subscribe_all_entities_are_continuous(
|
||||
hass, recorder_mock, hass_ws_client
|
||||
):
|
||||
"""Test subscribe/unsubscribe logbook stream with entities that are always filtered."""
|
||||
now = dt_util.utcnow()
|
||||
await asyncio.gather(
|
||||
|
@ -2227,6 +2229,8 @@ async def test_subscribe_all_entities_have_uom(hass, recorder_mock, hass_ws_clie
|
|||
hass.states.async_set(
|
||||
entity_id, state, {ATTR_UNIT_OF_MEASUREMENT: "any"}
|
||||
)
|
||||
hass.states.async_set("counter.any", state)
|
||||
hass.states.async_set("proximity.any", state)
|
||||
|
||||
init_count = sum(hass.bus.async_listeners().values())
|
||||
_cycle_entities()
|
||||
|
@ -2238,7 +2242,7 @@ async def test_subscribe_all_entities_have_uom(hass, recorder_mock, hass_ws_clie
|
|||
"id": 7,
|
||||
"type": "logbook/event_stream",
|
||||
"start_time": now.isoformat(),
|
||||
"entity_ids": ["sensor.uom"],
|
||||
"entity_ids": ["sensor.uom", "counter.any", "proximity.any"],
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue