File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ def __init__(self) -> None:
7373 """Set the constructor for this class."""
7474 self ._endpoint : str
7575 self ._elga : bool
76- self ._gateway_id : str
7776 self ._is_thermostat : bool
7877 self ._last_active : dict [str , str | None ]
7978 self ._loc_data : dict [str , ThermoLoc ]
8079 self ._schedule_old_states : dict [str , dict [str , str ]]
80+ self ._gateway_id : str = NONE
8181 self .smile_hw_version : str | None
8282 self .smile_mac_address : str | None
8383 self .smile_model : str
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ async def async_update(self) -> dict[str, GwEntityData]:
131131 "cooling_enabled"
132132 ]
133133 else : # cover failed data-retrieval for P1
134- _ = self .gw_entities [self ._gateway_id ]["location" ]
134+ _ = self .gw_entities [self ._smile_props [ "gateway_id" ] ]["location" ]
135135 except KeyError as err :
136136 raise DataMissingError ("No Plugwise actual data received" ) from err
137137
@@ -259,7 +259,7 @@ async def set_gateway_mode(self, mode: str) -> None:
259259 vacation_time = time_2 + "T23:00:00.000Z"
260260 valid = f"<valid_from>{ vacation_time } </valid_from><valid_to>{ end_time } </valid_to>"
261261
262- uri = f"{ APPLIANCES } ;id={ self ._gateway_id } /gateway_mode_control"
262+ uri = f"{ APPLIANCES } ;id={ self ._smile_props [ 'gateway_id' ] } /gateway_mode_control"
263263 data = f"<gateway_mode_control_functionality><mode>{ mode } </mode>{ valid } </gateway_mode_control_functionality>"
264264
265265 await self .call_request (uri , method = "put" , data = data )
You can’t perform that action at this time.
0 commit comments