Skip to content

Commit a4397d8

Browse files
committed
Update relevant test-jsons, asserst
1 parent d15f842 commit a4397d8

File tree

7 files changed

+163
-65
lines changed

7 files changed

+163
-65
lines changed

tests/data/anna/anna_v4.json

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"devices": {
33
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
4-
"active_preset": "home",
5-
"available_schedules": ["Standaard", "Thuiswerken", "off"],
6-
"climate_mode": "heat",
7-
"control_state": "heating",
84
"dev_class": "thermostat",
95
"firmware": "2018-02-08T11:15:53+01:00",
106
"hardware": "6539-1301-5002",
117
"location": "eb5309212bf5407bb143e5bfa3b18aee",
128
"model": "ThermoTouch",
139
"name": "Anna",
14-
"preset_modes": ["vacation", "no_frost", "away", "asleep", "home"],
15-
"select_schedule": "off",
1610
"sensors": {
1711
"illuminance": 60.0,
1812
"setpoint": 20.5,
@@ -24,12 +18,6 @@
2418
"setpoint": 0.0,
2519
"upper_bound": 2.0
2620
},
27-
"thermostat": {
28-
"lower_bound": 4.0,
29-
"resolution": 0.1,
30-
"setpoint": 20.5,
31-
"upper_bound": 30.0
32-
},
3321
"vendor": "Plugwise"
3422
},
3523
"0466eae8520144c78afb29628384edeb": {
@@ -85,6 +73,43 @@
8573
"dhw_cm_switch": false
8674
},
8775
"vendor": "Bosch Thermotechniek B.V."
76+
},
77+
"eb5309212bf5407bb143e5bfa3b18aee": {
78+
"active_preset": "home",
79+
"available_schedules": [
80+
"Standaard",
81+
"Thuiswerken",
82+
"off"
83+
],
84+
"climate_mode": "heat",
85+
"control_state": "idle",
86+
"dev_class": "climate",
87+
"model": "ThermoZone",
88+
"name": "Living room",
89+
"preset_modes": [
90+
"vacation",
91+
"no_frost",
92+
"away",
93+
"asleep",
94+
"home"
95+
],
96+
"select_schedule": "off",
97+
"sensors": {
98+
"temperature": 20.6
99+
},
100+
"thermostat": {
101+
"lower_bound": 4.0,
102+
"resolution": 0.1,
103+
"setpoint": 20.5,
104+
"upper_bound": 30.0
105+
},
106+
"thermostats": {
107+
"primary": [
108+
"01b85360fdd243d0aaad4d6ac2a5ba7e"
109+
],
110+
"secondary": []
111+
},
112+
"vendor": "Plugwise"
88113
}
89114
}
90115
}

tests/data/anna/anna_v4_UPDATED_DATA.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,19 @@
2929
"dhw_cm_switch": true
3030
}
3131
},
32-
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
32+
"eb5309212bf5407bb143e5bfa3b18aee": {
3333
"thermostat": {
34-
"setpoint": 19.5,
3534
"lower_bound": 4.0,
36-
"upper_bound": 30.0,
37-
"resolution": 0.1
38-
},
39-
"active_preset": "away",
40-
"select_schedule": "Standaard",
41-
"climate_mode": "auto",
42-
"control_state": "idle",
35+
"resolution": 0.1,
36+
"setpoint": 19.5,
37+
"upper_bound": 30.0
38+
}
39+
},
40+
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
4341
"sensors": {
44-
"temperature": 19.5,
42+
"illuminance": 39.5,
4543
"setpoint": 19.5,
46-
"illuminance": 39.5
44+
"temperature": 19.5
4745
}
4846
},
4947
"0466eae8520144c78afb29628384edeb": {

tests/data/anna/anna_v4_dhw.json

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"devices": {
33
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
4-
"active_preset": "home",
5-
"available_schedules": ["Standaard", "Thuiswerken", "off"],
6-
"climate_mode": "heat",
7-
"control_state": "idle",
84
"dev_class": "thermostat",
95
"firmware": "2018-02-08T11:15:53+01:00",
106
"hardware": "6539-1301-5002",
117
"location": "eb5309212bf5407bb143e5bfa3b18aee",
128
"model": "ThermoTouch",
139
"name": "Anna",
14-
"preset_modes": ["vacation", "no_frost", "away", "asleep", "home"],
15-
"select_schedule": "off",
1610
"sensors": {
1711
"illuminance": 60.0,
1812
"setpoint": 20.5,
@@ -24,12 +18,6 @@
2418
"setpoint": 0.0,
2519
"upper_bound": 2.0
2620
},
27-
"thermostat": {
28-
"lower_bound": 4.0,
29-
"resolution": 0.1,
30-
"setpoint": 20.5,
31-
"upper_bound": 30.0
32-
},
3321
"vendor": "Plugwise"
3422
},
3523
"0466eae8520144c78afb29628384edeb": {
@@ -85,6 +73,43 @@
8573
"dhw_cm_switch": false
8674
},
8775
"vendor": "Bosch Thermotechniek B.V."
76+
},
77+
"eb5309212bf5407bb143e5bfa3b18aee": {
78+
"active_preset": "home",
79+
"available_schedules": [
80+
"Standaard",
81+
"Thuiswerken",
82+
"off"
83+
],
84+
"climate_mode": "heat",
85+
"control_state": "idle",
86+
"dev_class": "climate",
87+
"model": "ThermoZone",
88+
"name": "Living room",
89+
"preset_modes": [
90+
"vacation",
91+
"no_frost",
92+
"away",
93+
"asleep",
94+
"home"
95+
],
96+
"select_schedule": "off",
97+
"sensors": {
98+
"temperature": 20.6
99+
},
100+
"thermostat": {
101+
"lower_bound": 4.0,
102+
"resolution": 0.1,
103+
"setpoint": 20.5,
104+
"upper_bound": 30.0
105+
},
106+
"thermostats": {
107+
"primary": [
108+
"01b85360fdd243d0aaad4d6ac2a5ba7e"
109+
],
110+
"secondary": []
111+
},
112+
"vendor": "Plugwise"
88113
}
89114
}
90115
}

tests/data/anna/anna_v4_no_tag.json

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"devices": {
33
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
4-
"active_preset": "home",
5-
"available_schedules": ["Standaard", "Thuiswerken", "off"],
6-
"climate_mode": "auto",
7-
"control_state": "heating",
84
"dev_class": "thermostat",
95
"firmware": "2018-02-08T11:15:53+01:00",
106
"hardware": "6539-1301-5002",
117
"location": "eb5309212bf5407bb143e5bfa3b18aee",
128
"model": "ThermoTouch",
139
"name": "Anna",
14-
"preset_modes": ["vacation", "no_frost", "away", "asleep", "home"],
15-
"select_schedule": "Thuiswerken",
1610
"sensors": {
1711
"illuminance": 60.0,
1812
"setpoint": 20.5,
@@ -24,12 +18,6 @@
2418
"setpoint": 0.0,
2519
"upper_bound": 2.0
2620
},
27-
"thermostat": {
28-
"lower_bound": 4.0,
29-
"resolution": 0.1,
30-
"setpoint": 20.5,
31-
"upper_bound": 30.0
32-
},
3321
"vendor": "Plugwise"
3422
},
3523
"0466eae8520144c78afb29628384edeb": {
@@ -85,6 +73,43 @@
8573
"dhw_cm_switch": false
8674
},
8775
"vendor": "Bosch Thermotechniek B.V."
76+
},
77+
"eb5309212bf5407bb143e5bfa3b18aee": {
78+
"active_preset": "home",
79+
"available_schedules": [
80+
"Standaard",
81+
"Thuiswerken",
82+
"off"
83+
],
84+
"climate_mode": "auto",
85+
"control_state": "idle",
86+
"dev_class": "climate",
87+
"model": "ThermoZone",
88+
"name": "Living room",
89+
"preset_modes": [
90+
"vacation",
91+
"no_frost",
92+
"away",
93+
"asleep",
94+
"home"
95+
],
96+
"select_schedule": "Thuiswerken",
97+
"sensors": {
98+
"temperature": 20.6
99+
},
100+
"thermostat": {
101+
"lower_bound": 4.0,
102+
"resolution": 0.1,
103+
"setpoint": 20.5,
104+
"upper_bound": 30.0
105+
},
106+
"thermostats": {
107+
"primary": [
108+
"01b85360fdd243d0aaad4d6ac2a5ba7e"
109+
],
110+
"secondary": []
111+
},
112+
"vendor": "Plugwise"
88113
}
89114
}
90115
}

tests/data/anna/anna_without_boiler_fw441.json

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"devices": {
33
"7ffbb3ab4b6c4ab2915d7510f7bf8fe9": {
4-
"active_preset": "home",
5-
"available_schedules": ["Test", "Normaal", "off"],
6-
"climate_mode": "auto",
7-
"control_state": "idle",
84
"dev_class": "thermostat",
95
"firmware": "2018-02-08T11:15:53+01:00",
106
"hardware": "6539-1301-5002",
117
"location": "c34c6864216446528e95d88985e714cc",
128
"model": "ThermoTouch",
139
"name": "Anna",
14-
"preset_modes": ["no_frost", "asleep", "away", "vacation", "home"],
15-
"select_schedule": "Normaal",
1610
"sensors": {
1711
"illuminance": 0.25,
1812
"setpoint": 19.0,
@@ -24,12 +18,6 @@
2418
"setpoint": 0.0,
2519
"upper_bound": 2.0
2620
},
27-
"thermostat": {
28-
"lower_bound": 4.0,
29-
"resolution": 0.1,
30-
"setpoint": 19.0,
31-
"upper_bound": 30.0
32-
},
3321
"vendor": "Plugwise"
3422
},
3523
"a270735e4ccd45239424badc0578a2b1": {
@@ -50,6 +38,43 @@
5038
},
5139
"vendor": "Plugwise"
5240
},
41+
"c34c6864216446528e95d88985e714cc": {
42+
"active_preset": "home",
43+
"available_schedules": [
44+
"Test",
45+
"Normaal",
46+
"off"
47+
],
48+
"climate_mode": "auto",
49+
"control_state": "idle",
50+
"dev_class": "climate",
51+
"model": "ThermoZone",
52+
"name": "Living room",
53+
"preset_modes": [
54+
"no_frost",
55+
"asleep",
56+
"away",
57+
"vacation",
58+
"home"
59+
],
60+
"select_schedule": "Normaal",
61+
"sensors": {
62+
"temperature": 19.1
63+
},
64+
"thermostat": {
65+
"lower_bound": 4.0,
66+
"resolution": 0.1,
67+
"setpoint": 19.0,
68+
"upper_bound": 30.0
69+
},
70+
"thermostats": {
71+
"primary": [
72+
"7ffbb3ab4b6c4ab2915d7510f7bf8fe9"
73+
],
74+
"secondary": []
75+
},
76+
"vendor": "Plugwise"
77+
},
5378
"c46b4794d28149699eacf053deedd003": {
5479
"binary_sensors": {
5580
"heating_state": false

tests/test_anna.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def test_connect_anna_v4(self):
3030
await self.device_test(api, "2020-04-05 00:00:01", testdata)
3131
assert api.gateway_id == "0466eae8520144c78afb29628384edeb"
3232
assert api._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard"
33-
assert self.entity_items == 60
33+
assert self.entity_items == 64
3434
assert not self.notifications
3535

3636
assert not self.cooling_present
@@ -103,7 +103,7 @@ async def test_connect_anna_v4_dhw(self):
103103

104104
await self.device_test(api, "2020-04-05 00:00:01", testdata)
105105
assert api._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard"
106-
assert self.entity_items == 60
106+
assert self.entity_items == 64
107107
assert not self.notifications
108108

109109
result = await self.tinker_thermostat(
@@ -132,7 +132,7 @@ async def test_connect_anna_v4_no_tag(self):
132132
)
133133

134134
await self.device_test(api, "2020-04-05 00:00:01", testdata)
135-
assert self.entity_items == 60
135+
assert self.entity_items == 64
136136

137137
result = await self.tinker_thermostat(
138138
api,
@@ -161,7 +161,7 @@ async def test_connect_anna_without_boiler_fw441(self):
161161

162162
await self.device_test(api, "2022-05-16 00:00:01", testdata)
163163
assert api._last_active["c34c6864216446528e95d88985e714cc"] == "Normaal"
164-
assert self.entity_items == 41
164+
assert self.entity_items == 45
165165
assert not self.notifications
166166

167167
result = await self.tinker_thermostat(

userdata/updated/anna_v4/core.domain_objects.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@
647647
<unit>C</unit>
648648
<last_consecutive_log_date>2020-04-01T08:04:13.351+02:00</last_consecutive_log_date>
649649
<period start_date="2020-04-02T08:33:05.127+02:00" end_date="2020-04-02T08:33:05.127+02:00">
650-
<measurement log_date="2020-04-02T08:33:05.127+02:00">20.50</measurement>
650+
<measurement log_date="2020-04-02T08:33:05.127+02:00">19.50</measurement>
651651
</period>
652652
</point_log>
653653
<point_log id='beae032e4725428796d58f609805c299'>
@@ -664,7 +664,7 @@
664664
<thermostat_functionality id='50be63f8ab7641e89b90fd64a097c3b5'>
665665
<updated_date>2020-04-02T08:33:05.069+02:00</updated_date>
666666
<type>thermostat</type>
667-
<setpoint>20.5</setpoint>
667+
<setpoint>19.5</setpoint>
668668
<lower_bound>4</lower_bound>
669669
<upper_bound>30</upper_bound>
670670
<resolution>0.1</resolution>

0 commit comments

Comments
 (0)