Skip to content

Commit

Permalink
Update unifiprotect binarysensor tests for animal detection
Browse files Browse the repository at this point in the history
  • Loading branch information
wfltaylor committed Jun 4, 2024
1 parent 18a2d05 commit 34713a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/components/unifiprotect/test_binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ async def test_binary_sensor_camera_remove(

ufp.api.bootstrap.nvr.system_info.ustorage = None
await init_entry(hass, ufp, [doorbell, unadopted_camera])
assert_entity_counts(hass, Platform.BINARY_SENSOR, 7, 7)
assert_entity_counts(hass, Platform.BINARY_SENSOR, 8, 8)
await remove_entities(hass, ufp, [doorbell, unadopted_camera])
assert_entity_counts(hass, Platform.BINARY_SENSOR, 0, 0)
await adopt_devices(hass, ufp, [doorbell, unadopted_camera])
assert_entity_counts(hass, Platform.BINARY_SENSOR, 7, 7)
assert_entity_counts(hass, Platform.BINARY_SENSOR, 8, 8)


async def test_binary_sensor_light_remove(
Expand Down Expand Up @@ -122,7 +122,7 @@ async def test_binary_sensor_setup_camera_all(

ufp.api.bootstrap.nvr.system_info.ustorage = None
await init_entry(hass, ufp, [doorbell, unadopted_camera])
assert_entity_counts(hass, Platform.BINARY_SENSOR, 7, 7)
assert_entity_counts(hass, Platform.BINARY_SENSOR, 8, 8)

description = EVENT_SENSORS[0]
unique_id, entity_id = ids_from_device_description(
Expand Down Expand Up @@ -274,7 +274,7 @@ async def test_binary_sensor_update_motion(
"""Test binary_sensor motion entity."""

await init_entry(hass, ufp, [doorbell, unadopted_camera])
assert_entity_counts(hass, Platform.BINARY_SENSOR, 13, 13)
assert_entity_counts(hass, Platform.BINARY_SENSOR, 14, 14)

_, entity_id = ids_from_device_description(
Platform.BINARY_SENSOR, doorbell, EVENT_SENSORS[1]
Expand Down

0 comments on commit 34713a8

Please sign in to comment.