mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Add Reolink PTZ tilt position sensor (#129837)
This commit is contained in:
parent
15bf652f37
commit
4c86102daf
@ -261,7 +261,10 @@
|
|||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
"ptz_pan_position": {
|
"ptz_pan_position": {
|
||||||
"default": "mdi:pan"
|
"default": "mdi:pan-horizontal"
|
||||||
|
},
|
||||||
|
"ptz_tilt_position": {
|
||||||
|
"default": "mdi:pan-vertical"
|
||||||
},
|
},
|
||||||
"battery_temperature": {
|
"battery_temperature": {
|
||||||
"default": "mdi:thermometer"
|
"default": "mdi:thermometer"
|
||||||
|
@ -58,7 +58,16 @@ SENSORS = (
|
|||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value=lambda api, ch: api.ptz_pan_position(ch),
|
value=lambda api, ch: api.ptz_pan_position(ch),
|
||||||
supported=lambda api, ch: api.supported(ch, "ptz_position"),
|
supported=lambda api, ch: api.supported(ch, "ptz_pan_position"),
|
||||||
|
),
|
||||||
|
ReolinkSensorEntityDescription(
|
||||||
|
key="ptz_tilt_position",
|
||||||
|
cmd_key="GetPtzCurPos",
|
||||||
|
translation_key="ptz_tilt_position",
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
value=lambda api, ch: api.ptz_tilt_position(ch),
|
||||||
|
supported=lambda api, ch: api.supported(ch, "ptz_tilt_position"),
|
||||||
),
|
),
|
||||||
ReolinkSensorEntityDescription(
|
ReolinkSensorEntityDescription(
|
||||||
key="battery_percent",
|
key="battery_percent",
|
||||||
|
@ -649,6 +649,9 @@
|
|||||||
"ptz_pan_position": {
|
"ptz_pan_position": {
|
||||||
"name": "PTZ pan position"
|
"name": "PTZ pan position"
|
||||||
},
|
},
|
||||||
|
"ptz_tilt_position": {
|
||||||
|
"name": "PTZ tilt position"
|
||||||
|
},
|
||||||
"battery_temperature": {
|
"battery_temperature": {
|
||||||
"name": "Battery temperature"
|
"name": "Battery temperature"
|
||||||
},
|
},
|
||||||
|
@ -118,8 +118,8 @@
|
|||||||
'null': 2,
|
'null': 2,
|
||||||
}),
|
}),
|
||||||
'GetPtzCurPos': dict({
|
'GetPtzCurPos': dict({
|
||||||
'0': 1,
|
'0': 2,
|
||||||
'null': 1,
|
'null': 2,
|
||||||
}),
|
}),
|
||||||
'GetPtzGuard': dict({
|
'GetPtzGuard': dict({
|
||||||
'0': 2,
|
'0': 2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user