Skip to content

Commit

Permalink
move assumed state
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Oct 26, 2020
1 parent eb3c3ac commit bcc2458
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/somfy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ def has_capability(self, capability):
capabilities = self.device.capabilities
return bool([c for c in capabilities if c.name == capability])

@property
def assumed_state(self):
"""Return if the device has an assumed state."""
return not bool(self.device.states)


@Throttle(SCAN_INTERVAL)
async def update_all_devices(hass):
Expand Down
7 changes: 0 additions & 7 deletions homeassistant/components/somfy/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ def is_closed(self):
is_closed = self._closed
return is_closed

@property
def assumed_state(self):
"""Return if the cover has an assumed state."""
if not self.optimistic:
return None
return not bool(self.device.states)

@property
def current_cover_tilt_position(self):
"""Return current position of cover tilt.
Expand Down

0 comments on commit bcc2458

Please sign in to comment.