File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,12 @@ async def _smile_detect(
196196 self .smile .hostname = gateway .find ("hostname" ).text
197197 self .smile .mac_address = gateway .find ("mac_address" ).text
198198 self .smile .model_id = gateway .find ("vendor_model" ).text
199+ if (elec_measurement := gateway .find (
200+ "gateway_environment/electricity_consumption_tariff_structure"
201+ )) and elec_measurement .text :
202+ parts = model .split ("_" )
203+ if len (parts ) == 3 :
204+ model = parts [0 ] + parts [1 ] + "_power" + parts [2 ]
199205 else :
200206 model = await self ._smile_detect_legacy (result , dsmrmain , model )
201207
Original file line number Diff line number Diff line change 3434
3535ADAM : Final = "Adam"
3636ANNA : Final = "Smile Anna"
37+ ANNA_P1 : Final = "Smile Anna P1"
3738DEFAULT_TIMEOUT : Final = 10
3839DEFAULT_LEGACY_TIMEOUT : Final = 30
3940DEFAULT_USERNAME : Final = "smile"
220221 "smile_thermo_v1" : SMILE (THERMOSTAT , ANNA ),
221222 "smile_thermo_v3" : SMILE (THERMOSTAT , ANNA ),
222223 "smile_thermo_v4" : SMILE (THERMOSTAT , ANNA ),
224+ "smile_thermo_power_v4" : SMILE ("thermostat_power" , ANNA_P1 ),
223225 "stretch_v2" : SMILE (STRETCH , "Stretch" ),
224226 "stretch_v3" : SMILE (STRETCH , "Stretch" ),
225227}
You can’t perform that action at this time.
0 commit comments