Skip to content

Commit

Permalink
0.2.1-b3
Browse files Browse the repository at this point in the history
  • Loading branch information
hakana committed Nov 25, 2020
1 parent 8b37efa commit e13e92e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion custom_components/shelly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

_LOGGER = logging.getLogger(__name__)

__version__ = "0.2.1-b2"
__version__ = "0.2.1-b3"
VERSION = __version__

async def async_setup(hass, config):
Expand Down
8 changes: 2 additions & 6 deletions custom_components/shelly/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def __init__(self, block, instance, prefix=""):
self.async_on_remove(self._remove_handler)
self._master_unit = False
self._settings = instance.get_settings(block.id)
self.last_ha_update = None

def _remove_handler(self):
self._is_removed = True
Expand All @@ -57,11 +56,8 @@ def name(self):
name += " [" + self._block.id + "]"
return name

def _update_ha_state(self):
#snapshot = { "attr" : self.device_state_attributes, "state" : self.state, "available": self.available }
#if self.last_ha_update != snapshot:
self.schedule_update_ha_state()
#self.last_ha_update = snapshot
def _update_ha_state(self):
self.schedule_update_ha_state(True)

def _updated(self, _block):
"""Receive events when the switch state changed (by mobile,
Expand Down
7 changes: 1 addition & 6 deletions custom_components/shelly/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ def __init__(self, dev, instance):

self._settings = instance.get_settings(dev.id, dev.block.id)

self.last_ha_update = None

def _update_ha_state(self):
#snapshot = { "attr" : self.device_state_attributes, "state" : self.state, "available": self.available }
#if self.last_ha_update != snapshot:
self.schedule_update_ha_state()
#self.last_ha_update = snapshot
self.schedule_update_ha_state(True)

def _updated(self, _block):
"""Receive events when the switch state changed (by mobile,
Expand Down
1 change: 0 additions & 1 deletion custom_components/shelly/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ async def async_turn_off(self, **_kwargs):
self._update_ha_state()

def remove(self):
print("REMOVE*******************")
if self._removing:
return
self._removing = True
Expand Down

0 comments on commit e13e92e

Please sign in to comment.