Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions custom_components/aqara_gateway/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def update(self, data: dict = None):

self.schedule_update_ha_state()

def reset_state(self):
self._state = ''
self.async_write_ha_state()


class GatewayNatgasSensor(GatewayBinarySensor, BinarySensorEntity):
"""Representation of a Xiaomi/Aqara Natgas Sensor."""
Expand Down Expand Up @@ -159,10 +163,6 @@ def update(self, data: dict = None):
self._state = not value

self.schedule_update_ha_state()

def reset_state(self):
self._state = ''
self.async_write_ha_state()


class GatewayMotionSensor(GatewayBinarySensor):
Expand Down