mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add Reolink CPU usage sensor (#126386)
This commit is contained in:
parent
53d76355ec
commit
286c22c0ed
@ -260,6 +260,9 @@
|
||||
"wifi_signal": {
|
||||
"default": "mdi:wifi"
|
||||
},
|
||||
"cpu_usage": {
|
||||
"default": "mdi:cpu-64-bit"
|
||||
},
|
||||
"hdd_storage": {
|
||||
"default": "mdi:harddisk"
|
||||
},
|
||||
|
@ -106,6 +106,17 @@ HOST_SENSORS = (
|
||||
value=lambda api: api.wifi_signal,
|
||||
supported=lambda api: api.supported(None, "wifi") and api.wifi_connection,
|
||||
),
|
||||
ReolinkHostSensorEntityDescription(
|
||||
key="cpu_usage",
|
||||
cmd_key="GetPerformance",
|
||||
translation_key="cpu_usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value=lambda api: api.cpu_usage,
|
||||
supported=lambda api: api.supported(None, "performance"),
|
||||
),
|
||||
)
|
||||
|
||||
HDD_SENSORS = (
|
||||
|
@ -632,6 +632,9 @@
|
||||
"wifi_signal": {
|
||||
"name": "Wi-Fi signal"
|
||||
},
|
||||
"cpu_usage": {
|
||||
"name": "CPU usage"
|
||||
},
|
||||
"ptz_pan_position": {
|
||||
"name": "PTZ pan position"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user