mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Disable generic unifiprotect object sensors by default (#120059)
This commit is contained in:
parent
68462b014c
commit
4de8cca911
@ -446,6 +446,7 @@ SMART_EVENT_SENSORS: tuple[ProtectBinaryEventEntityDescription, ...] = (
|
|||||||
icon="mdi:eye",
|
icon="mdi:eye",
|
||||||
ufp_required_field="feature_flags.has_smart_detect",
|
ufp_required_field="feature_flags.has_smart_detect",
|
||||||
ufp_event_obj="last_smart_detect_event",
|
ufp_event_obj="last_smart_detect_event",
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
ProtectBinaryEventEntityDescription(
|
ProtectBinaryEventEntityDescription(
|
||||||
key="smart_obj_person",
|
key="smart_obj_person",
|
||||||
@ -490,6 +491,7 @@ SMART_EVENT_SENSORS: tuple[ProtectBinaryEventEntityDescription, ...] = (
|
|||||||
icon="mdi:eye",
|
icon="mdi:eye",
|
||||||
ufp_required_field="feature_flags.has_smart_detect",
|
ufp_required_field="feature_flags.has_smart_detect",
|
||||||
ufp_event_obj="last_smart_audio_detect_event",
|
ufp_event_obj="last_smart_audio_detect_event",
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
ProtectBinaryEventEntityDescription(
|
ProtectBinaryEventEntityDescription(
|
||||||
key="smart_audio_smoke",
|
key="smart_audio_smoke",
|
||||||
|
@ -65,11 +65,11 @@ async def test_binary_sensor_camera_remove(
|
|||||||
|
|
||||||
ufp.api.bootstrap.nvr.system_info.ustorage = None
|
ufp.api.bootstrap.nvr.system_info.ustorage = None
|
||||||
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 8)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 6)
|
||||||
await remove_entities(hass, ufp, [doorbell, unadopted_camera])
|
await remove_entities(hass, ufp, [doorbell, unadopted_camera])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 0, 0)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 0, 0)
|
||||||
await adopt_devices(hass, ufp, [doorbell, unadopted_camera])
|
await adopt_devices(hass, ufp, [doorbell, unadopted_camera])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 8)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 6)
|
||||||
|
|
||||||
|
|
||||||
async def test_binary_sensor_light_remove(
|
async def test_binary_sensor_light_remove(
|
||||||
@ -137,7 +137,7 @@ async def test_binary_sensor_setup_camera_all(
|
|||||||
|
|
||||||
ufp.api.bootstrap.nvr.system_info.ustorage = None
|
ufp.api.bootstrap.nvr.system_info.ustorage = None
|
||||||
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 8)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 9, 6)
|
||||||
|
|
||||||
description = EVENT_SENSORS[0]
|
description = EVENT_SENSORS[0]
|
||||||
unique_id, entity_id = ids_from_device_description(
|
unique_id, entity_id = ids_from_device_description(
|
||||||
@ -287,7 +287,7 @@ async def test_binary_sensor_update_motion(
|
|||||||
"""Test binary_sensor motion entity."""
|
"""Test binary_sensor motion entity."""
|
||||||
|
|
||||||
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
await init_entry(hass, ufp, [doorbell, unadopted_camera])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 15, 14)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 15, 12)
|
||||||
|
|
||||||
_, entity_id = ids_from_device_description(
|
_, entity_id = ids_from_device_description(
|
||||||
Platform.BINARY_SENSOR, doorbell, EVENT_SENSORS[1]
|
Platform.BINARY_SENSOR, doorbell, EVENT_SENSORS[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user