Skip to content

Commit

Permalink
fix: protocol check in B6 devices (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelli74 authored Oct 6, 2024
1 parent 2f4e5d1 commit 55659c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion midealocal/devices/b6/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
FAN_LEVEL_RANGE_3 = 170
MIN_FAN_LEVEL_RANGE = 100

MESSAGE_PROTOCOL_VERSION = 2


class MessageB6Base(MessageRequest):
"""B6 message base."""
Expand Down Expand Up @@ -46,7 +48,9 @@ def __init__(self, protocol_version: int) -> None:
super().__init__(
protocol_version=protocol_version,
message_type=MessageType.query,
body_type=BodyType.X11 if protocol_version == 2 else BodyType.X31,
body_type=BodyType.X11
if protocol_version == MESSAGE_PROTOCOL_VERSION
else BodyType.X31,
)

@property
Expand Down

0 comments on commit 55659c1

Please sign in to comment.