mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
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
@ -92,9 +92,9 @@ class RflinkCover(RflinkCommand, CoverDevice):
|
|||||||
self.cancel_queued_send_commands()
|
self.cancel_queued_send_commands()
|
||||||
|
|
||||||
command = event['command']
|
command = event['command']
|
||||||
if command in ['on', 'allon']:
|
if command in ['on', 'allon', 'up']:
|
||||||
self._state = True
|
self._state = True
|
||||||
elif command in ['off', 'alloff']:
|
elif command in ['off', 'alloff', 'down']:
|
||||||
self._state = False
|
self._state = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -105,7 +105,12 @@ class RflinkCover(RflinkCommand, CoverDevice):
|
|||||||
@property
|
@property
|
||||||
def is_closed(self):
|
def is_closed(self):
|
||||||
"""Return if the cover is closed."""
|
"""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):
|
def async_close_cover(self, **kwargs):
|
||||||
"""Turn the device close."""
|
"""Turn the device close."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user