Skip to content

Commit

Permalink
Constants for device scan request and response
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Jul 4, 2024
1 parent d9ea000 commit de99bd1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions custom_components/solaredge_modbus_multi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,35 @@ class SunSpecNotImpl(IntEnum):
}

LIMIT_CONTROL = {0: "Total", 1: "Per Phase"}

DEV_SCAN_REQUEST = [0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x3, 0x9C, 0x40, 0x0, 0x09]

DEV_SCAN_RESPONSE = [
0x0,
0x0,
0x0,
0x0,
0x0,
0x15,
0x0,
0x3,
0x12,
0x53,
0x75,
0x6E,
0x53,
0x0,
0x1,
0x0,
0x41,
0x53,
0x6F,
0x6C,
0x61,
0x72,
0x45,
0x64,
0x67,
0x65,
0x20,
]
2 changes: 1 addition & 1 deletion custom_components/solaredge_modbus_multi/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def deviceIdsFromString(value: str) -> list[int]:
return sorted(set(ids))


def checkDeviceId(value: (str | int)) -> int:
def checkDeviceId(value: str | int) -> int:
"""The `checkDeviceId` function takes a value and checks if it is a valid device
ID between 1 and 247, raising an error if it is not.
Expand Down

0 comments on commit de99bd1

Please sign in to comment.