File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
zha/application/platforms/cover Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ def restore_external_state_attributes(
197
197
self ._state = state
198
198
self ._target_lift_position = target_lift_position
199
199
self ._target_tilt_position = target_tilt_position
200
+ self .maybe_emit_state_changed_event ()
200
201
201
202
@property
202
203
def is_closed (self ) -> bool | None :
@@ -701,14 +702,6 @@ def restore_external_state_attributes(
701
702
target_tilt_position : int | None ,
702
703
):
703
704
"""Restore external state attributes."""
704
-
705
- def refresh_state ():
706
- refresh_task = asyncio .create_task (
707
- self ._device .gateway .entities .refresh_state (self .info_object )
708
- )
709
- self ._tasks .append (refresh_task )
710
- refresh_task .add_done_callback (self ._tasks .remove )
711
-
712
705
task = asyncio .create_task (
713
706
self ._device .gateway .covers .restore_external_state_attributes (
714
707
self .info_object ,
@@ -719,4 +712,3 @@ def refresh_state():
719
712
)
720
713
self ._tasks .append (task )
721
714
task .add_done_callback (self ._tasks .remove )
722
- task .add_done_callback (lambda _ : refresh_state ())
You can’t perform that action at this time.
0 commit comments