88from abc import ABC
99from collections .abc import Callable
1010
11- from roborock .containers import HomeDataDevice
11+ from roborock .containers import HomeDataDevice , HomeDataProduct
1212from roborock .roborock_message import RoborockMessage
1313
1414from .channel import Channel
@@ -37,6 +37,7 @@ class RoborockDevice(ABC, TraitsMixin):
3737 def __init__ (
3838 self ,
3939 device_info : HomeDataDevice ,
40+ product : HomeDataProduct ,
4041 channel : Channel ,
4142 trait : Trait ,
4243 ) -> None :
@@ -49,6 +50,8 @@ def __init__(
4950 TraitsMixin .__init__ (self , trait )
5051 self ._duid = device_info .duid
5152 self ._name = device_info .name
53+ self ._device_info = device_info
54+ self ._product = product
5255 self ._channel = channel
5356 self ._unsub : Callable [[], None ] | None = None
5457
@@ -62,6 +65,23 @@ def name(self) -> str:
6265 """Return the device name."""
6366 return self ._name
6467
68+ @property
69+ def device_info (self ) -> HomeDataDevice :
70+ """Return the device information.
71+
72+ This includes information specific to the device like its identifier or
73+ firmware version.
74+ """
75+ return self ._device_info
76+
77+ @property
78+ def product (self ) -> HomeDataProduct :
79+ """Return the device product name.
80+
81+ This returns product level information such as the model name.
82+ """
83+ return self ._product
84+
6585 @property
6686 def is_connected (self ) -> bool :
6787 """Return whether the device is connected."""
0 commit comments