mirror of
https://github.com/home-assistant/core.git
synced 2026-04-27 06:15:04 +00:00
Add Reolink bicycle sensitivity and delay (#153217)
This commit is contained in:
@@ -229,6 +229,9 @@
|
||||
"ai_vehicle_sensitivity": {
|
||||
"default": "mdi:car"
|
||||
},
|
||||
"ai_non_motor_vehicle_sensitivity": {
|
||||
"default": "mdi:bicycle"
|
||||
},
|
||||
"ai_package_sensitivity": {
|
||||
"default": "mdi:gift-outline"
|
||||
},
|
||||
@@ -265,6 +268,9 @@
|
||||
"ai_vehicle_delay": {
|
||||
"default": "mdi:car"
|
||||
},
|
||||
"ai_non_motor_vehicle_delay": {
|
||||
"default": "mdi:bicycle"
|
||||
},
|
||||
"ai_package_delay": {
|
||||
"default": "mdi:gift-outline"
|
||||
},
|
||||
|
||||
@@ -255,6 +255,23 @@ NUMBER_ENTITIES = (
|
||||
value=lambda api, ch: api.ai_sensitivity(ch, "vehicle"),
|
||||
method=lambda api, ch, value: api.set_ai_sensitivity(ch, int(value), "vehicle"),
|
||||
),
|
||||
ReolinkNumberEntityDescription(
|
||||
key="ai_non_motor_vehicle_sensitivity",
|
||||
cmd_key="GetAiAlarm",
|
||||
translation_key="ai_non_motor_vehicle_sensitivity",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_step=1,
|
||||
native_min_value=0,
|
||||
native_max_value=100,
|
||||
supported=lambda api, ch: (
|
||||
api.supported(ch, "ai_sensitivity")
|
||||
and api.supported(ch, "ai_non-motor vehicle")
|
||||
),
|
||||
value=lambda api, ch: api.ai_sensitivity(ch, "non-motor vehicle"),
|
||||
method=lambda api, ch, value: (
|
||||
api.set_ai_sensitivity(ch, int(value), "non-motor vehicle")
|
||||
),
|
||||
),
|
||||
ReolinkNumberEntityDescription(
|
||||
key="ai_package_sensititvity",
|
||||
cmd_key="GetAiAlarm",
|
||||
@@ -345,6 +362,25 @@ NUMBER_ENTITIES = (
|
||||
value=lambda api, ch: api.ai_delay(ch, "people"),
|
||||
method=lambda api, ch, value: api.set_ai_delay(ch, int(value), "people"),
|
||||
),
|
||||
ReolinkNumberEntityDescription(
|
||||
key="ai_non_motor_vehicle_delay",
|
||||
cmd_key="GetAiAlarm",
|
||||
translation_key="ai_non_motor_vehicle_delay",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
device_class=NumberDeviceClass.DURATION,
|
||||
entity_registry_enabled_default=False,
|
||||
native_step=1,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
native_min_value=0,
|
||||
native_max_value=8,
|
||||
supported=lambda api, ch: (
|
||||
api.supported(ch, "ai_delay") and api.supported(ch, "ai_non-motor vehicle")
|
||||
),
|
||||
value=lambda api, ch: api.ai_delay(ch, "non-motor vehicle"),
|
||||
method=lambda api, ch, value: (
|
||||
api.set_ai_delay(ch, int(value), "non-motor vehicle")
|
||||
),
|
||||
),
|
||||
ReolinkNumberEntityDescription(
|
||||
key="ai_vehicle_delay",
|
||||
cmd_key="GetAiAlarm",
|
||||
|
||||
@@ -578,6 +578,9 @@
|
||||
"ai_vehicle_sensitivity": {
|
||||
"name": "AI vehicle sensitivity"
|
||||
},
|
||||
"ai_non_motor_vehicle_sensitivity": {
|
||||
"name": "AI bicycle sensitivity"
|
||||
},
|
||||
"ai_package_sensitivity": {
|
||||
"name": "AI package sensitivity"
|
||||
},
|
||||
@@ -614,6 +617,9 @@
|
||||
"ai_vehicle_delay": {
|
||||
"name": "AI vehicle delay"
|
||||
},
|
||||
"ai_non_motor_vehicle_delay": {
|
||||
"name": "AI bicycle delay"
|
||||
},
|
||||
"ai_package_delay": {
|
||||
"name": "AI package delay"
|
||||
},
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
'null': 2,
|
||||
}),
|
||||
'GetAiAlarm': dict({
|
||||
'0': 5,
|
||||
'null': 5,
|
||||
'0': 6,
|
||||
'null': 6,
|
||||
}),
|
||||
'GetAiCfg': dict({
|
||||
'0': 2,
|
||||
|
||||
Reference in New Issue
Block a user