mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 09:23:17 -04:00
Bump uiprotect to 16.12.0 (#182670)
This commit is contained in:
@@ -9,5 +9,5 @@
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["uiprotect"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["uiprotect==16.8.0"]
|
||||
"requirements": ["uiprotect==16.12.0"]
|
||||
}
|
||||
|
||||
@@ -100,9 +100,6 @@ CAMERA_SWITCHES: tuple[ProtectSwitchEntityDescription, ...] = (
|
||||
key="high_fps",
|
||||
translation_key="high_fps",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
# has_highfps has no public counterpart yet (uilibs/uiprotect#1201), so
|
||||
# this stays unreachable in API-key-only mode even though the value
|
||||
# and setter are migrated.
|
||||
ufp_required_field="feature_flags.has_highfps",
|
||||
ufp_public_value="is_high_fps_enabled",
|
||||
ufp_set_method_fn=_set_highfps,
|
||||
|
||||
Generated
+1
-1
@@ -3347,7 +3347,7 @@ uasiren==0.0.1
|
||||
uhooapi==1.2.8
|
||||
|
||||
# homeassistant.components.unifiprotect
|
||||
uiprotect==16.8.0
|
||||
uiprotect==16.12.0
|
||||
|
||||
# homeassistant.components.landisgyr_heat_meter
|
||||
ultraheat-api==0.6.1
|
||||
|
||||
@@ -1294,14 +1294,15 @@ async def test_switch_hybrid_public_sensor_without_private_deferred(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("fixture_name", "make", "key", "setter", "absent_keys"),
|
||||
("fixture_name", "make", "key", "setter", "present_keys", "absent_keys"),
|
||||
[
|
||||
pytest.param(
|
||||
"doorbell",
|
||||
_make_streamless_public_camera,
|
||||
"smart_person",
|
||||
"set_person_detection",
|
||||
{"ssh", "motion", "high_fps", "privacy_mode", "color_night_vision"},
|
||||
{"high_fps"},
|
||||
{"ssh", "motion", "privacy_mode", "color_night_vision"},
|
||||
id="camera",
|
||||
),
|
||||
pytest.param(
|
||||
@@ -1313,6 +1314,7 @@ async def test_switch_hybrid_public_sensor_without_private_deferred(
|
||||
),
|
||||
"motion",
|
||||
"set_motion_status",
|
||||
set(),
|
||||
{"status_light", "temperature"},
|
||||
id="sensor",
|
||||
),
|
||||
@@ -1321,6 +1323,7 @@ async def test_switch_hybrid_public_sensor_without_private_deferred(
|
||||
partial(make_public_light, is_indicator_enabled=True),
|
||||
"status_light",
|
||||
"set_status_light",
|
||||
set(),
|
||||
{"ssh"},
|
||||
id="light",
|
||||
),
|
||||
@@ -1337,6 +1340,7 @@ async def test_public_only_switch_end_to_end(
|
||||
make: Callable[[Any], Mock],
|
||||
key: str,
|
||||
setter: str,
|
||||
present_keys: set[str],
|
||||
absent_keys: set[str],
|
||||
) -> None:
|
||||
"""A public-only entry builds the migrated switches from the public object.
|
||||
@@ -1354,6 +1358,7 @@ async def test_public_only_switch_end_to_end(
|
||||
assert ufp_public_only.entry.state is ConfigEntryState.LOADED
|
||||
keys = _switch_keys(entity_registry, device.mac)
|
||||
assert key in keys
|
||||
assert present_keys <= keys
|
||||
assert not keys & absent_keys
|
||||
assert hass.states.get("switch.unifiprotect_insights_enabled") is None
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ def make_public_camera(
|
||||
)
|
||||
flags = camera.feature_flags
|
||||
public.has_package_camera = flags.has_package_camera
|
||||
# Spec'd so a private-only flag (e.g. ``has_highfps``) reads as absent.
|
||||
# Spec'd so a private-only flag reads as absent.
|
||||
public.feature_flags = Mock(spec=PublicCameraFeatureFlags)
|
||||
public.feature_flags.support_full_hd_snapshot = flags.support_full_hd_snapshot
|
||||
public.feature_flags.has_hdr = flags.has_hdr
|
||||
@@ -691,6 +691,10 @@ def make_public_camera(
|
||||
public.feature_flags.smart_detect_audio_types = list(
|
||||
flags.smart_detect_audio_types or []
|
||||
)
|
||||
# Derived from the mirrored video modes with the library's own logic.
|
||||
public.feature_flags.has_highfps = PublicCameraFeatureFlags.has_highfps.fget(
|
||||
public.feature_flags
|
||||
)
|
||||
# The capability gate runs the library's own logic on the mirrored flags.
|
||||
public.can_detect = Mock(side_effect=partial(PublicCamera.can_detect, public))
|
||||
qualities = [ChannelQuality.HIGH, ChannelQuality.MEDIUM, ChannelQuality.LOW]
|
||||
|
||||
Reference in New Issue
Block a user