Skip to content

Commit 46eff7e

Browse files
committed
fix restore external state types
1 parent 34d7c19 commit 46eff7e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

zha/application/platforms/cover/websocket_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ class CoverRestoreExternalStateAttributesCommand(PlatformEntityCommand):
168168
APICommands.COVER_RESTORE_EXTERNAL_STATE_ATTRIBUTES
169169
)
170170
platform: str = Platform.COVER
171-
state: Literal["open", "opening", "closed", "closing"]
172-
target_lift_position: int
173-
target_tilt_position: int
171+
state: Literal["open", "opening", "closed", "closing", "unavailable"]
172+
target_lift_position: int | None = None
173+
target_tilt_position: int | None = None
174174

175175

176176
@decorators.websocket_command(CoverRestoreExternalStateAttributesCommand)

zha/application/platforms/lock/websocket_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class LockRestoreExternalStateAttributesCommand(PlatformEntityCommand):
145145
APICommands.LOCK_RESTORE_EXTERNAL_STATE_ATTRIBUTES
146146
)
147147
platform: str = Platform.LOCK
148-
state: Literal["locked", "unlocked"] | None
148+
state: Literal["locked", "unlocked", "unavailable"] | None
149149

150150

151151
@decorators.websocket_command(LockRestoreExternalStateAttributesCommand)

0 commit comments

Comments
 (0)