Skip to content

Commit

Permalink
Disable Unifi Protect Oldest Recording sensor by default (#68804)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Mar 29, 2022
1 parent 963d161 commit 349060b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/unifiprotect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def _get_alarm_sound(obj: Sensor) -> str:
name="Oldest Recording",
device_class=SensorDeviceClass.TIMESTAMP,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
ufp_value="stats.video.recording_start",
),
ProtectSensorEntityDescription(
Expand Down
8 changes: 4 additions & 4 deletions tests/components/unifiprotect/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ async def test_sensor_setup_camera(
hass: HomeAssistant, mock_entry: MockEntityFixture, camera: Camera, now: datetime
):
"""Test sensor entity setup for camera devices."""
# 3 from all, 8 from camera, 12 NVR
assert_entity_counts(hass, Platform.SENSOR, 24, 14)
# 3 from all, 7 from camera, 12 NVR
assert_entity_counts(hass, Platform.SENSOR, 24, 13)

entity_registry = er.async_get(hass)

Expand Down Expand Up @@ -528,8 +528,8 @@ async def test_sensor_update_motion(
hass: HomeAssistant, mock_entry: MockEntityFixture, camera: Camera, now: datetime
):
"""Test sensor motion entity."""
# 3 from all, 8 from camera, 12 NVR
assert_entity_counts(hass, Platform.SENSOR, 24, 14)
# 3 from all, 7 from camera, 12 NVR
assert_entity_counts(hass, Platform.SENSOR, 24, 13)

_, entity_id = ids_from_device_description(
Platform.SENSOR, camera, MOTION_SENSORS[0]
Expand Down

0 comments on commit 349060b

Please sign in to comment.