File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 2525 MIN_SETPOINT ,
2626 MODULES ,
2727 NOTIFICATIONS ,
28+ REQUIRE_APPLIANCES ,
2829 RULES ,
2930 SMILES ,
3031 STATUS ,
@@ -511,12 +512,10 @@ async def async_update(self) -> PlugwiseData:
511512 self ._modules = await self ._request (MODULES )
512513 case "smile_v3" | "smile_v4" :
513514 self ._locations = await self ._request (LOCATIONS )
514- case "smile_thermo_v1" | "smile_thermo_v3" | "smile_thermo_v4" :
515- self ._appliances = await self ._request (APPLIANCES )
516515 case "smile_open_therm_v2" | "smile_open_therm_v3" :
517516 self ._appliances = await self ._request (APPLIANCES )
518517 self ._modules = await self ._request (MODULES )
519- case "stretch_v2" | "stretch_v3" :
518+ case self . _target_smile if self . _target_smile in REQUIRE_APPLIANCES :
520519 self ._appliances = await self ._request (APPLIANCES )
521520
522521 self .gw_data ["notifications" ] = self ._notifications
Original file line number Diff line number Diff line change 200200 "stretch_v2" : SMILE ("stretch" , "Stretch" ),
201201 "stretch_v3" : SMILE ("stretch" , "Stretch" ),
202202}
203+ REQUIRE_APPLIANCES : Final [list [str ]] = [
204+ "smile_thermo_v1" ,
205+ "smile_thermo_v3" ,
206+ "smile_thermo_v4" ,
207+ "stretch_v2" ,
208+ "stretch_v3" ,
209+ ]
203210
204211# Class, Literal and related tuple-definitions
205212
You can’t perform that action at this time.
0 commit comments