Implement correct state for RFlink cover (#16304)
* implement correct state for rflink cover * Fix linting error * invert logic as local testing pointed out it should be reversed * add period at the end to satisfy the linter
This commit is contained in:
parent
85658b6dd1
commit
3bd12fcef6
1 changed files with 8 additions and 3 deletions
|
@ -92,9 +92,9 @@ class RflinkCover(RflinkCommand, CoverDevice):
|
|||
self.cancel_queued_send_commands()
|
||||
|
||||
command = event['command']
|
||||
if command in ['on', 'allon']:
|
||||
if command in ['on', 'allon', 'up']:
|
||||
self._state = True
|
||||
elif command in ['off', 'alloff']:
|
||||
elif command in ['off', 'alloff', 'down']:
|
||||
self._state = False
|
||||
|
||||
@property
|
||||
|
@ -105,7 +105,12 @@ class RflinkCover(RflinkCommand, CoverDevice):
|
|||
@property
|
||||
def is_closed(self):
|
||||
"""Return if the cover is closed."""
|
||||
return None
|
||||
return not self._state
|
||||
|
||||
@property
|
||||
def assumed_state(self):
|
||||
"""Return True because covers can be stopped midway."""
|
||||
return True
|
||||
|
||||
def async_close_cover(self, **kwargs):
|
||||
"""Turn the device close."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue