Skip to content

Commit

Permalink
Reducing need for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
c503ghosh committed Nov 5, 2024
1 parent 1a374cf commit bf91257
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions custom_components/dirigera_platform/base_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ class ikea_motion_sensor_device(ikea_base_device):
def __init__(self,hass, hub, json_data):
logger.debug("ikea_motion_sensor_device ctor...")
super().__init__(hass, hub, json_data, hub.get_motion_sensor_by_id)

self.skip_update = True

class ikea_motion_sensor(ikea_base_device_sensor, BinarySensorEntity):
def __init__(self, device: ikea_motion_sensor_device):
logger.debug("ikea_motion_sensor ctor...")
Expand All @@ -228,6 +229,7 @@ class ikea_open_close_device(ikea_base_device):
def __init__(self, hass, hub, json_data):
logger.debug("ikea_motion_sensor_device ctor...")
super().__init__(hass, hub, json_data, hub.get_open_close_by_id)
self.skip_update = True

class ikea_open_close_sensor(ikea_base_device_sensor, BinarySensorEntity):
def __init__(self, device: ikea_open_close_device):
Expand All @@ -246,7 +248,8 @@ def is_on(self):
class ikea_water_sensor_device(ikea_base_device):
def __init__(self, hass, hub, json_data):
super().__init__(hass, hub, json_data, hub.get_water_sensor_by_id)

self.skip_update = True

class ikea_water_sensor(ikea_base_device_sensor, BinarySensorEntity):
def __init__(self, device : ikea_water_sensor_device):
logger.debug("ikea_water_sensor ctor...")
Expand Down Expand Up @@ -452,7 +455,8 @@ def __init__(self,hass:core.HomeAssistant, hub:Hub, json_data:Controller):
logger.debug(f"Set #buttons to {self._buttons} as controller model is : {json_data.attributes.model}")

super().__init__(hass , hub, json_data, hub.get_controller_by_id)

self.skip_update = True

@property
def entity_category(self):
return EntityCategory.DIAGNOSTIC
Expand Down

0 comments on commit bf91257

Please sign in to comment.