parent
ec4c8ae228
commit
38c2688ec2
4 changed files with 50 additions and 0 deletions
|
@ -103,6 +103,9 @@
|
||||||
"motion_sensitivity": {
|
"motion_sensitivity": {
|
||||||
"default": "mdi:motion-sensor"
|
"default": "mdi:motion-sensor"
|
||||||
},
|
},
|
||||||
|
"pir_sensitivity": {
|
||||||
|
"default": "mdi:motion-sensor"
|
||||||
|
},
|
||||||
"ai_face_sensitivity": {
|
"ai_face_sensitivity": {
|
||||||
"default": "mdi:face-recognition"
|
"default": "mdi:face-recognition"
|
||||||
},
|
},
|
||||||
|
@ -257,6 +260,12 @@
|
||||||
},
|
},
|
||||||
"hdr": {
|
"hdr": {
|
||||||
"default": "mdi:hdr"
|
"default": "mdi:hdr"
|
||||||
|
},
|
||||||
|
"pir_enabled": {
|
||||||
|
"default": "mdi:motion-sensor"
|
||||||
|
},
|
||||||
|
"pir_reduce_alarm": {
|
||||||
|
"default": "mdi:motion-sensor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -116,6 +116,18 @@ NUMBER_ENTITIES = (
|
||||||
value=lambda api, ch: api.md_sensitivity(ch),
|
value=lambda api, ch: api.md_sensitivity(ch),
|
||||||
method=lambda api, ch, value: api.set_md_sensitivity(ch, int(value)),
|
method=lambda api, ch, value: api.set_md_sensitivity(ch, int(value)),
|
||||||
),
|
),
|
||||||
|
ReolinkNumberEntityDescription(
|
||||||
|
key="pir_sensitivity",
|
||||||
|
cmd_key="GetPirInfo",
|
||||||
|
translation_key="pir_sensitivity",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
native_step=1,
|
||||||
|
native_min_value=1,
|
||||||
|
native_max_value=100,
|
||||||
|
supported=lambda api, ch: api.supported(ch, "PIR"),
|
||||||
|
value=lambda api, ch: api.pir_sensitivity(ch),
|
||||||
|
method=lambda api, ch, value: api.set_pir(ch, sensitivity=int(value)),
|
||||||
|
),
|
||||||
ReolinkNumberEntityDescription(
|
ReolinkNumberEntityDescription(
|
||||||
key="ai_face_sensititvity",
|
key="ai_face_sensititvity",
|
||||||
cmd_key="GetAiAlarm",
|
cmd_key="GetAiAlarm",
|
||||||
|
|
|
@ -270,6 +270,9 @@
|
||||||
"motion_sensitivity": {
|
"motion_sensitivity": {
|
||||||
"name": "Motion sensitivity"
|
"name": "Motion sensitivity"
|
||||||
},
|
},
|
||||||
|
"pir_sensitivity": {
|
||||||
|
"name": "PIR sensitivity"
|
||||||
|
},
|
||||||
"ai_face_sensitivity": {
|
"ai_face_sensitivity": {
|
||||||
"name": "AI face sensitivity"
|
"name": "AI face sensitivity"
|
||||||
},
|
},
|
||||||
|
@ -451,6 +454,12 @@
|
||||||
},
|
},
|
||||||
"hdr": {
|
"hdr": {
|
||||||
"name": "HDR"
|
"name": "HDR"
|
||||||
|
},
|
||||||
|
"pir_enabled": {
|
||||||
|
"name": "PIR enabled"
|
||||||
|
},
|
||||||
|
"pir_reduce_alarm": {
|
||||||
|
"name": "PIR reduce false alarm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,26 @@ SWITCH_ENTITIES = (
|
||||||
value=lambda api, ch: api.HDR_on(ch) is True,
|
value=lambda api, ch: api.HDR_on(ch) is True,
|
||||||
method=lambda api, ch, value: api.set_HDR(ch, value),
|
method=lambda api, ch, value: api.set_HDR(ch, value),
|
||||||
),
|
),
|
||||||
|
ReolinkSwitchEntityDescription(
|
||||||
|
key="pir_enabled",
|
||||||
|
cmd_key="GetPirInfo",
|
||||||
|
translation_key="pir_enabled",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
|
supported=lambda api, ch: api.supported(ch, "PIR"),
|
||||||
|
value=lambda api, ch: api.pir_enabled(ch) is True,
|
||||||
|
method=lambda api, ch, value: api.set_pir(ch, enable=value),
|
||||||
|
),
|
||||||
|
ReolinkSwitchEntityDescription(
|
||||||
|
key="pir_reduce_alarm",
|
||||||
|
cmd_key="GetPirInfo",
|
||||||
|
translation_key="pir_reduce_alarm",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
|
supported=lambda api, ch: api.supported(ch, "PIR"),
|
||||||
|
value=lambda api, ch: api.pir_reduce_alarm(ch) is True,
|
||||||
|
method=lambda api, ch, value: api.set_pir(ch, reduce_alarm=value),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
NVR_SWITCH_ENTITIES = (
|
NVR_SWITCH_ENTITIES = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue