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