Skip to content

Commit

Permalink
Minor improvements (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaStrada authored Jan 30, 2023
1 parent fa58f98 commit e5a7fc1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyfreshintellivent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self, ble_device: BLEDevice) -> None:

self.name = None
self.manufacturer = None
self.model = "Intellivent Sky"
self.fw_version = None
self.hw_version = None
self.sw_version = None
Expand Down
3 changes: 3 additions & 0 deletions pyfreshintellivent/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def validated_authentication_code(value: Union[bytes, bytearray, str]):
bytes = bytearray.fromhex(value)
return bytes

elif value == bytearray(b"\x00\x00\x00\x00"):
raise ValueError("Fan was not in pairing mode.")

elif isinstance(value, (bytes, bytearray)):
if len(value) != 4:
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyfreshintellivent"
version = "0.2.0"
version = "0.2.1"
description = "Manage Fresh Intellivent Sky bathroom ventilation fan"
authors = ["Ståle Storø Hauknes <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit e5a7fc1

Please sign in to comment.