Skip to content

Commit 35e0c85

Browse files
committed
fix siren issue
1 parent 482af50 commit 35e0c85

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

tests/test_siren.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ async def test_siren(zha_gateway: Gateway) -> None:
118118
assert len(cluster.request.mock_calls) == 1
119119
assert cluster.request.call_args[0][0] is False
120120
assert cluster.request.call_args[0][1] == 0
121-
assert (
122-
cluster.request.call_args[0][3] == 51
123-
if not hasattr(zha_gateway, "ws_gateway")
124-
else 50 # WHYYYYYY TODO figure this issue out
125-
) # bitmask for specified args
121+
assert cluster.request.call_args[0][3] == 51 # bitmask for specified args
126122
assert cluster.request.call_args[0][4] == 100 # duration in seconds
127123
assert cluster.request.call_args[0][5] == 0
128124
assert cluster.request.call_args[0][6] == 2

zha/application/platforms/siren/websocket_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SirenTurnOnCommand(PlatformEntityCommand):
2424
platform: str = Platform.SIREN
2525
duration: Union[int, None] = None
2626
tone: Union[int, None] = None
27-
level: Union[int, None] = None
27+
volume_level: Union[int, None] = None
2828

2929

3030
@decorators.websocket_command(SirenTurnOnCommand)

zha/websocket/client/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ async def turn_on(
248248
ieee=siren_platform_entity.device_ieee,
249249
unique_id=siren_platform_entity.unique_id,
250250
duration=duration,
251-
level=volume_level,
251+
volume_level=volume_level,
252252
tone=tone,
253253
)
254254
return await self._client.async_send_command(command)

0 commit comments

Comments
 (0)