From 52b433c431651487cde4d3a7a2042c8684a5d56f Mon Sep 17 00:00:00 2001 From: Sanjoy Ghosh Date: Mon, 25 Mar 2024 14:26:25 +0530 Subject: [PATCH] Fix issue in sensor.py --- custom_components/dirigera_platform/sensor.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/dirigera_platform/sensor.py b/custom_components/dirigera_platform/sensor.py index 9bb8464..aed8c10 100644 --- a/custom_components/dirigera_platform/sensor.py +++ b/custom_components/dirigera_platform/sensor.py @@ -72,9 +72,6 @@ async def async_setup_entry( logger.debug("Found {} env entities to setup...".format(len(env_sensors))) logger.debug("Found {} controller devices to setup...".format(len(controller_devices))) - logger.debug(env_sensors) - logger.debug(controller_devices) - async_add_entities(env_sensors) async_add_entities(controller_devices) @@ -318,10 +315,14 @@ def name(self): def is_on(self): return self._json_data.attributes.is_on - @property - def device_info(self) -> DeviceInfo: - return SensorDeviceClass.BATTERY + #@property + #def device_info(self) -> DeviceInfo: + # return SensorDeviceClass.BATTERY + @property + def icon(self): + return "mdi:battery" + @property def native_value(self): return self._json_data.attributes.battery_percentage