diff --git a/blebox_uniapi/box.py b/blebox_uniapi/box.py index fb18b85..bed395d 100644 --- a/blebox_uniapi/box.py +++ b/blebox_uniapi/box.py @@ -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 @@ -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 diff --git a/tests/test_box.py b/tests/test_box.py index 13ec341..a7eddce 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -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"