Skip to content

Commit

Permalink
Fix issue in sensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
c503ghosh committed Mar 25, 2024
1 parent aae7e68 commit 52b433c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions custom_components/dirigera_platform/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 52b433c

Please sign in to comment.