Skip to content

Commit d07d9ae

Browse files
committed
Adapt relevant testcases
1 parent bf92c0c commit d07d9ae

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

tests/test_smile.py

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,8 @@ async def test_connect_legacy_anna(self):
610610
"model": "4.21",
611611
"name": "OpenTherm",
612612
"vendor": "Bosch Thermotechniek B.V.",
613-
"heating_state": True,
614613
"cooling_active": False,
615-
"binary_sensors": {"flame_state": True},
614+
"binary_sensors": {"flame_state": True, "heating_state": True},
616615
"sensors": {
617616
"water_temperature": 23.6,
618617
"intended_boiler_temperature": 17.0,
@@ -715,9 +714,8 @@ async def test_connect_legacy_anna_2(self):
715714
"model": "Generic heater",
716715
"name": "OpenTherm",
717716
"vendor": None,
718-
"heating_state": False,
719717
"cooling_active": False,
720-
"binary_sensors": {"flame_state": False},
718+
"binary_sensors": {"flame_state": False, "heating_state": False},
721719
"sensors": {
722720
"water_temperature": 54.0,
723721
"intended_boiler_temperature": 0.0,
@@ -907,9 +905,12 @@ async def test_connect_anna_v4(self):
907905
"model": "2.32",
908906
"name": "OpenTherm",
909907
"vendor": "Bosch Thermotechniek B.V.",
910-
"heating_state": True,
911908
"cooling_active": False,
912-
"binary_sensors": {"dhw_state": False, "flame_state": True},
909+
"binary_sensors": {
910+
"dhw_state": False,
911+
"flame_state": True,
912+
"heating_state": True,
913+
},
913914
"sensors": {
914915
"water_temperature": 52.0,
915916
"intended_boiler_temperature": 48.6,
@@ -1129,6 +1130,7 @@ async def test_connect_anna_without_boiler_fw42(self):
11291130
"vendor": None,
11301131
"heating_state": True,
11311132
"cooling_active": False,
1133+
"binary_sensors": {"heating_state": True},
11321134
},
11331135
# Anna
11341136
"7ffbb3ab4b6c4ab2915d7510f7bf8fe9": {
@@ -1220,8 +1222,7 @@ async def test_connect_adam_plus_anna(self):
12201222
},
12211223
# Central
12221224
"2743216f626f43948deec1f7ab3b3d70": {
1223-
"binary_sensors": {"flame_state": False},
1224-
"heating_state": False,
1225+
"binary_sensors": {"flame_state": False, "heating_state": False},
12251226
},
12261227
# Plug MediaCenter
12271228
"aa6b0002df0a46e1b1eb94beb61eddfe": {
@@ -1413,10 +1414,13 @@ async def test_connect_adam_plus_anna_new(self):
14131414
"model": "Generic heater",
14141415
"name": "OpenTherm",
14151416
"vendor": None,
1416-
"heating_state": True,
1417-
"cooling_state": False,
14181417
"cooling_active": False,
1419-
"binary_sensors": {"dhw_state": False, "flame_state": False},
1418+
"binary_sensors": {
1419+
"cooling_state": False,
1420+
"dhw_state": False,
1421+
"flame_state": False,
1422+
"heating_state": True,
1423+
},
14201424
"sensors": {
14211425
"water_temperature": 37.0,
14221426
"intended_boiler_temperature": 38.1,
@@ -1483,8 +1487,7 @@ async def test_connect_adam_plus_anna_new_copy_dhw_and_heating(self):
14831487
testdata = {
14841488
# Central
14851489
"2743216f626f43948deec1f7ab3b3d70": {
1486-
"binary_sensors": {"dhw_state": True},
1487-
"heating_state": True,
1490+
"binary_sensors": {"dhw_state": True, "heating_state": True},
14881491
},
14891492
# Lisa Badkamer
14901493
"453e510de7cb47af8ec5b44fbf40cbe5": {
@@ -1506,7 +1509,7 @@ async def test_connect_adam_plus_anna_new_copy_cooling(self):
15061509
testdata = {
15071510
# Central
15081511
"2743216f626f43948deec1f7ab3b3d70": {
1509-
"cooling_state": True,
1512+
"binary_sensors": {"cooling_state": True},
15101513
},
15111514
}
15121515

@@ -1524,8 +1527,7 @@ async def test_connect_adam_plus_anna_new_copy_dhw_and_cooling(self):
15241527
testdata = {
15251528
# Central
15261529
"2743216f626f43948deec1f7ab3b3d70": {
1527-
"binary_sensors": {"dhw_state": True},
1528-
"cooling_state": True,
1530+
"binary_sensors": {"cooling_state": True, "dhw_state": True},
15291531
}
15301532
}
15311533

@@ -1542,7 +1544,7 @@ async def test_connect_adam_zone_per_device(self):
15421544
"""Test a broad setup of Adam with a zone per device setup."""
15431545
testdata = {
15441546
"90986d591dcd426cae3ec3e8111ff730": {
1545-
"heating_state": False,
1547+
"binary_sensors": {"heating_state": False},
15461548
},
15471549
# Lisa WK
15481550
"b59bcebaf94b499ea7d46e4a66fb62d8": {
@@ -1801,7 +1803,7 @@ async def test_connect_adam_multiple_devices_per_zone(self):
18011803
"name": "OnOff",
18021804
"vendor": None,
18031805
"cooling_active": False,
1804-
"heating_state": True,
1806+
"binary_sensors": {"heating_state": True},
18051807
"sensors": {
18061808
"water_temperature": 70.0,
18071809
"intended_boiler_temperature": 70.0,
@@ -2223,9 +2225,11 @@ async def test_connect_anna_heatpump(self):
22232225
# Heater central
22242226
"1cbf783bb11e4a7c8a6843dee3a86927": {
22252227
"cooling_active": False,
2226-
"cooling_state": False,
2227-
"heating_state": True,
2228-
"binary_sensors": {"dhw_state": False},
2228+
"binary_sensors": {
2229+
"cooling_state": False,
2230+
"dhw_state": False,
2231+
"heating_state": True,
2232+
},
22292233
"sensors": {
22302234
"outdoor_temperature": 3.0,
22312235
"water_temperature": 29.1,
@@ -2279,9 +2283,11 @@ async def test_connect_anna_heatpump_cooling(self):
22792283
# Heater central
22802284
"1cbf783bb11e4a7c8a6843dee3a86927": {
22812285
"cooling_active": True,
2282-
"cooling_state": True,
2283-
"heating_state": False,
2284-
"binary_sensors": {"dhw_state": False},
2286+
"binary_sensors": {
2287+
"cooling_state": True,
2288+
"dhw_state": False,
2289+
"heating_state": False,
2290+
},
22852291
"sensors": {
22862292
"outdoor_temperature": 22.0,
22872293
"water_temperature": 24.7,
@@ -2323,7 +2329,7 @@ async def test_connect_adam_plus_anna_copy_with_error_domain_added(self):
23232329
testdata = {
23242330
# Central
23252331
"2743216f626f43948deec1f7ab3b3d70": {
2326-
"heating_state": False,
2332+
"binary_sensors": {"heating_state": False},
23272333
},
23282334
}
23292335

0 commit comments

Comments
 (0)