1717 SMILES ,
1818 STATUS ,
1919 SYSTEM ,
20- GatewayData ,
2120 PlugwiseData ,
21+ SmileProps ,
2222 ThermoLoc ,
2323)
2424from plugwise .exceptions import (
@@ -70,10 +70,10 @@ def __init__(
7070 self ._opentherm_device = False
7171 self ._schedule_old_states : dict [str , dict [str , str ]] = {}
7272 self ._smile_api : SmileAPI | SmileLegacyAPI
73+ self ._smile_props : SmileProps = {}
7374 self ._stretch_v2 = False
7475 self ._target_smile : str = NONE
7576 self .cooling_present = False
76- self .gw_data : GatewayData = {}
7777 self .smile_hostname : str = NONE
7878 self .smile_hw_version : str | None = None
7979 self .smile_legacy = False
@@ -88,27 +88,27 @@ def __init__(
8888 @property
8989 def gateway_id (self ) -> str :
9090 """Return the gateway-id."""
91- return self .gw_data ["gateway_id" ]
91+ return self ._smile_props ["gateway_id" ]
9292
9393 @property
9494 def heater_id (self ) -> str :
9595 """Return the heater-id."""
96- return self .gw_data ["heater_id" ]
96+ return self ._smile_props ["heater_id" ]
9797
9898 @property
9999 def item_count (self ) -> int :
100100 """Return the item-count."""
101- return self .gw_data ["item_count" ]
101+ return self ._smile_props ["item_count" ]
102102
103103 @property
104104 def notifications (self ) -> dict [str , dict [str , str ]]:
105105 """Return the Plugwise notifications."""
106- return self .gw_data ["notifications" ]
106+ return self ._smile_props ["notifications" ]
107107
108108 @property
109109 def reboot (self ) -> bool :
110110 """Return the reboot capability."""
111- return self .gw_data ["reboot" ]
111+ return self ._smile_props ["reboot" ]
112112
113113 async def connect (self ) -> Version | None :
114114 """Connect to the Plugwise Gateway and determine its name, type, version, and other data."""
@@ -156,8 +156,8 @@ async def connect(self) -> Version | None:
156156 self ._opentherm_device ,
157157 self ._request ,
158158 self ._schedule_old_states ,
159+ self ._smile_props ,
159160 self .cooling_present ,
160- self .gw_data ,
161161 self .smile_hostname ,
162162 self .smile_hw_version ,
163163 self .smile_mac_address ,
@@ -174,9 +174,9 @@ async def connect(self) -> Version | None:
174174 self ._on_off_device ,
175175 self ._opentherm_device ,
176176 self ._request ,
177+ self ._smile_props ,
177178 self ._stretch_v2 ,
178179 self ._target_smile ,
179- self .gw_data ,
180180 self .smile_hostname ,
181181 self .smile_hw_version ,
182182 self .smile_mac_address ,
0 commit comments