Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/logbook/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# Domains that are always continuous
#
# These are hard coded here to avoid importing
# the entire counter and proximity integrations
# the entire counter, image, and proximity integrations
# to get the name of the domain.
ALWAYS_CONTINUOUS_DOMAINS = {"counter", "proximity"}
ALWAYS_CONTINUOUS_DOMAINS = {"counter", "image", "proximity"}
Comment thread
MartinHjelmare marked this conversation as resolved.

# Domains that are continuous if there is a UOM set on the entity
CONDITIONALLY_CONTINUOUS_DOMAINS = {SENSOR_DOMAIN}
Expand Down
11 changes: 9 additions & 2 deletions tests/components/logbook/test_websocket_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,7 @@ def _cycle_entities():
entity_id, state, {ATTR_UNIT_OF_MEASUREMENT: "any"}
)
hass.states.async_set("counter.any", state)
hass.states.async_set("image.any", state)
hass.states.async_set("proximity.any", state)

# We will compare event subscriptions after closing the websocket connection,
Expand All @@ -2573,7 +2574,7 @@ def _cycle_entities():
"id": 7,
"type": "logbook/event_stream",
"start_time": now.isoformat(),
"entity_ids": ["sensor.uom", "counter.any", "proximity.any"],
"entity_ids": ["sensor.uom", "counter.any", "image.any", "proximity.any"],
}
)

Expand Down Expand Up @@ -2908,6 +2909,7 @@ def _create_events():
entity_id, state, {ATTR_UNIT_OF_MEASUREMENT: "any"}
)
hass.states.async_set("counter.any", state)
hass.states.async_set("image.any", state)
hass.states.async_set("proximity.any", state)
hass.bus.async_fire("mock_event", {"device_id": device.id})
hass.bus.async_fire("mock_event", {"device_id": device2.id})
Expand All @@ -2924,7 +2926,7 @@ def _create_events():
"id": 7,
"type": "logbook/event_stream",
"start_time": now.isoformat(),
"entity_ids": ["sensor.uom", "counter.any", "proximity.any"],
"entity_ids": ["sensor.uom", "counter.any", "image.any", "proximity.any"],
"device_ids": [device.id, device2.id],
}
)
Expand Down Expand Up @@ -3113,6 +3115,11 @@ def auto_off_listener(event):
{},
0, # Counter is an always continuous domain
),
(
"image.map0",
{},
0, # Image is an always continuous domain
),
(
"zone.home",
{},
Expand Down
Loading