@@ -5067,141 +5067,6 @@ async def test_connect_p1v4(self):
50675067 await smile .close_connection ()
50685068 await self .disconnect (server , client )
50695069
5070- @pytest .mark .asyncio
5071- async def test_connect_p1v4_440beta_single (self ):
5072- """Test a P1 firmware 4 setup."""
5073- testdata = {
5074- "a455b61e52394b2db5081ce025a430f3" : {
5075- "dev_class" : "gateway" ,
5076- "firmware" : "4.4.0" ,
5077- "hardware" : "AME Smile 2.0 board" ,
5078- "location" : "a455b61e52394b2db5081ce025a430f3" ,
5079- "mac_address" : "012345670001" ,
5080- "model" : "Gateway" ,
5081- "name" : "Smile P1" ,
5082- "vendor" : "Plugwise" ,
5083- "binary_sensors" : {"plugwise_notification" : False },
5084- },
5085- "ba4de7613517478da82dd9b6abea36af" : {
5086- "dev_class" : "smartmeter" ,
5087- "location" : "a455b61e52394b2db5081ce025a430f3" ,
5088- "model" : "KFM5KAIFA-METER" ,
5089- "name" : "P1" ,
5090- "vendor" : "SHENZHEN KAIFA TECHNOLOGY (CHENGDU) CO., LTD." ,
5091- "available" : True ,
5092- "sensors" : {
5093- "net_electricity_point" : 581 ,
5094- "electricity_consumed_peak_point" : 581 ,
5095- "electricity_consumed_off_peak_point" : 0 ,
5096- "net_electricity_cumulative" : 30718.064 ,
5097- "electricity_consumed_peak_cumulative" : 13523.584 ,
5098- "electricity_consumed_off_peak_cumulative" : 17194.48 ,
5099- "electricity_consumed_peak_interval" : 9 ,
5100- "electricity_consumed_off_peak_interval" : 0 ,
5101- "electricity_produced_peak_point" : 0 ,
5102- "electricity_produced_off_peak_point" : 0 ,
5103- "electricity_produced_peak_cumulative" : 0.0 ,
5104- "electricity_produced_off_peak_cumulative" : 0.0 ,
5105- "electricity_produced_peak_interval" : 0 ,
5106- "electricity_produced_off_peak_interval" : 0 ,
5107- "electricity_phase_one_consumed" : 0 ,
5108- "electricity_phase_one_produced" : 581 ,
5109- },
5110- },
5111- }
5112-
5113- self .smile_setup = "p1v4_440beta_single"
5114- server , smile , client = await self .connect_wrapper ()
5115- assert smile .smile_hostname == "smile000000"
5116-
5117- _LOGGER .info ("Basics:" )
5118- _LOGGER .info (" # Assert type = power" )
5119- assert smile .smile_type == "power"
5120- _LOGGER .info (" # Assert version" )
5121- assert smile .smile_version [0 ] == "4.4.0"
5122- _LOGGER .info (" # Assert legacy" )
5123- assert not smile ._smile_legacy
5124-
5125- await self .device_test (smile , testdata )
5126- assert smile .gateway_id == "a455b61e52394b2db5081ce025a430f3"
5127- assert self .device_items == 31
5128- assert not self .notifications
5129-
5130- await smile .close_connection ()
5131- await self .disconnect (server , client )
5132-
5133- @pytest .mark .asyncio
5134- async def test_connect_p1v4_440beta_triple (self ):
5135- """Test a P1 firmware 4 setup."""
5136- testdata = {
5137- "03e65b16e4b247a29ae0d75a78cb492e" : {
5138- "dev_class" : "gateway" ,
5139- "firmware" : "4.4.0" ,
5140- "hardware" : "AME Smile 2.0 board" ,
5141- "location" : "03e65b16e4b247a29ae0d75a78cb492e" ,
5142- "mac_address" : "012345670001" ,
5143- "model" : "Gateway" ,
5144- "name" : "Smile P1" ,
5145- "vendor" : "Plugwise" ,
5146- "binary_sensors" : {"plugwise_notification" : False },
5147- },
5148- "b82b6b3322484f2ea4e25e0bd5f3d61f" : {
5149- "dev_class" : "smartmeter" ,
5150- "location" : "03e65b16e4b247a29ae0d75a78cb492e" ,
5151- "model" : "XMX5LGF0010453051839" ,
5152- "name" : "P1" ,
5153- "vendor" : "XEMEX NV" ,
5154- "available" : True ,
5155- "sensors" : {
5156- "net_electricity_point" : 2422 ,
5157- "electricity_consumed_peak_point" : 2422 ,
5158- "electricity_consumed_off_peak_point" : 0 ,
5159- "net_electricity_cumulative" : 220806.738 ,
5160- "electricity_consumed_peak_cumulative" : 154585.221 ,
5161- "electricity_consumed_off_peak_cumulative" : 66221.517 ,
5162- "electricity_consumed_peak_interval" : 0 ,
5163- "electricity_consumed_off_peak_interval" : 0 ,
5164- "electricity_produced_peak_point" : 0 ,
5165- "electricity_produced_off_peak_point" : 0 ,
5166- "electricity_produced_peak_cumulative" : 0.0 ,
5167- "electricity_produced_off_peak_cumulative" : 0.0 ,
5168- "electricity_produced_peak_interval" : 0 ,
5169- "electricity_produced_off_peak_interval" : 0 ,
5170- "electricity_phase_one_consumed" : 0 ,
5171- "electricity_phase_two_consumed" : 0 ,
5172- "electricity_phase_three_consumed" : 0 ,
5173- "electricity_phase_one_produced" : 1737 ,
5174- "electricity_phase_two_produced" : 200 ,
5175- "electricity_phase_three_produced" : 486 ,
5176- "gas_consumed_cumulative" : 15263.4 ,
5177- "gas_consumed_interval" : 0.0 ,
5178- "voltage_phase_one" : 230.3 ,
5179- "voltage_phase_two" : 232.8 ,
5180- "voltage_phase_three" : 232.6 ,
5181- },
5182- },
5183- }
5184-
5185- self .smile_setup = "p1v4_440beta_triple"
5186- server , smile , client = await self .connect_wrapper ()
5187- assert smile .smile_hostname == "smile000000"
5188-
5189- _LOGGER .info ("Basics:" )
5190- _LOGGER .info (" # Assert type = power" )
5191- assert smile .smile_type == "power"
5192- _LOGGER .info (" # Assert version" )
5193- assert smile .smile_version [0 ] == "4.4.0"
5194- _LOGGER .info (" # Assert legacy" )
5195- assert not smile ._smile_legacy
5196-
5197- await self .device_test (smile , testdata )
5198- assert smile .gateway_id == "03e65b16e4b247a29ae0d75a78cb492e"
5199- assert self .device_items == 40
5200- assert not self .notifications
5201-
5202- await smile .close_connection ()
5203- await self .disconnect (server , client )
5204-
52055070 @pytest .mark .asyncio
52065071 async def test_fail_legacy_system (self ):
52075072 """Test erroneous legacy stretch system."""
0 commit comments