mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add Color Night Vision switch for UniFi Protect (#106500)
* Add a switch to enable and disable "Color Night Vision" for the Unifi Protect platform, which is a feature on the new G5 Pro cameras with a "Vision Enhancer" attached * Updated tests for the new switch
This commit is contained in:
parent
093c952c38
commit
9b2c67fcd2
@ -209,6 +209,16 @@ CAMERA_SWITCHES: tuple[ProtectSwitchEntityDescription, ...] = (
|
||||
ufp_set_method="set_smoke_detection",
|
||||
ufp_perm=PermRequired.WRITE,
|
||||
),
|
||||
ProtectSwitchEntityDescription(
|
||||
key="color_night_vision",
|
||||
name="Color Night Vision",
|
||||
icon="mdi:light-flood-down",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
ufp_required_field="has_color_night_vision",
|
||||
ufp_value="isp_settings.is_color_night_vision_enabled",
|
||||
ufp_set_method="set_color_night_vision",
|
||||
ufp_perm=PermRequired.WRITE,
|
||||
),
|
||||
)
|
||||
|
||||
PRIVACY_MODE_SWITCH = ProtectSwitchEntityDescription[Camera](
|
||||
|
@ -38,6 +38,7 @@ CAMERA_SWITCHES_BASIC = [
|
||||
and d.name != "Detections: License Plate"
|
||||
and d.name != "Detections: Smoke/CO"
|
||||
and d.name != "SSH Enabled"
|
||||
and d.name != "Color Night Vision"
|
||||
]
|
||||
CAMERA_SWITCHES_NO_EXTRA = [
|
||||
d for d in CAMERA_SWITCHES_BASIC if d.name not in ("High FPS", "Privacy Mode")
|
||||
|
Loading…
x
Reference in New Issue
Block a user