diff --git a/homeassistant/components/logbook/const.py b/homeassistant/components/logbook/const.py index 282580bdc95ce9..abbd5c8f050dc9 100644 --- a/homeassistant/components/logbook/const.py +++ b/homeassistant/components/logbook/const.py @@ -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"} # Domains that are continuous if there is a UOM set on the entity CONDITIONALLY_CONTINUOUS_DOMAINS = {SENSOR_DOMAIN} diff --git a/tests/components/logbook/test_websocket_api.py b/tests/components/logbook/test_websocket_api.py index ab12f84b5108ea..708aec7720437a 100644 --- a/tests/components/logbook/test_websocket_api.py +++ b/tests/components/logbook/test_websocket_api.py @@ -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, @@ -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"], } ) @@ -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}) @@ -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], } ) @@ -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", {},