FHEM & reconnecting client fixes
This commit is contained in:
@@ -58,6 +58,9 @@ class FhemCover(CoverDevice):
|
||||
def current_cover_position(self):
|
||||
return self._position
|
||||
|
||||
def refresh(self):
|
||||
self.connection.fhem_set(self._ids[0], 'statusRequest')
|
||||
|
||||
@property
|
||||
def is_closed(self):
|
||||
"""Return if the cover is closed."""
|
||||
@@ -88,8 +91,7 @@ class FhemCover(CoverDevice):
|
||||
_, new_motor_state, new_position = line.split(':')
|
||||
new_position = new_position.strip().lower()
|
||||
new_motor_state = new_motor_state.strip().lower()
|
||||
assert new_motor_state == 'stop' or new_motor_state == 'up' or new_motor_state == 'down', \
|
||||
'Unknown motor state ' + new_motor_state
|
||||
assert new_motor_state in ('up', 'down', 'stop', 'err'), 'Unknown motor state ' + new_motor_state
|
||||
if new_motor_state == 'stop':
|
||||
if new_position == 'on':
|
||||
self._position = 100
|
||||
|
||||
Reference in New Issue
Block a user