From b8e0d928485fd6784d1fd7579a1df0a74ec5fd78 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 21 Nov 2024 01:48:14 +0100 Subject: [PATCH] Add Reolink push for battery info and sleep status (#131103) Add push for battery info and sleep status --- homeassistant/components/reolink/binary_sensor.py | 1 + homeassistant/components/reolink/sensor.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/homeassistant/components/reolink/binary_sensor.py b/homeassistant/components/reolink/binary_sensor.py index f6c64d0b060..38132d29941 100644 --- a/homeassistant/components/reolink/binary_sensor.py +++ b/homeassistant/components/reolink/binary_sensor.py @@ -103,6 +103,7 @@ BINARY_PUSH_SENSORS = ( BINARY_SENSORS = ( ReolinkBinarySensorEntityDescription( key="sleep", + cmd_id=145, cmd_key="GetChannelstatus", translation_key="sleep", entity_category=EntityCategory.DIAGNOSTIC, diff --git a/homeassistant/components/reolink/sensor.py b/homeassistant/components/reolink/sensor.py index 80e58c3d5c2..337bf9cc29c 100644 --- a/homeassistant/components/reolink/sensor.py +++ b/homeassistant/components/reolink/sensor.py @@ -71,6 +71,7 @@ SENSORS = ( ), ReolinkSensorEntityDescription( key="battery_percent", + cmd_id=252, cmd_key="GetBatteryInfo", native_unit_of_measurement=PERCENTAGE, device_class=SensorDeviceClass.BATTERY, @@ -81,6 +82,7 @@ SENSORS = ( ), ReolinkSensorEntityDescription( key="battery_temperature", + cmd_id=252, cmd_key="GetBatteryInfo", translation_key="battery_temperature", native_unit_of_measurement=UnitOfTemperature.CELSIUS, @@ -93,6 +95,7 @@ SENSORS = ( ), ReolinkSensorEntityDescription( key="battery_state", + cmd_id=252, cmd_key="GetBatteryInfo", translation_key="battery_state", device_class=SensorDeviceClass.ENUM,