Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions blebox_uniapi/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def __init__(

self._data_path = config["api_path"]
self._type = type
self._product = product
self._unique_id = unique_id
self._name = name
self._address = address
Expand Down Expand Up @@ -212,6 +213,11 @@ def last_data(self) -> Optional[Dict[Any, Any]]:
def type(self) -> str:
return self._type

@property
def product(self) -> str:
"""Product name for informational purpose only - do not use it in any application logic."""
return self._product

@property
def unique_id(self) -> Any:
return self._unique_id
Expand Down
1 change: 1 addition & 0 deletions tests/test_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ async def test_properties(mock_session, sample_data, config):
assert box.last_data is None
assert box.type == "airSensor"
assert box.model == "airSensor"
assert box.product == "airSensor"
assert box.unique_id == "abcd1234ef"
assert box.firmware_version == "1.23"
assert box.hardware_version == "4.56"
Expand Down
Loading