Skip to content

Commit af56d52

Browse files
committed
Add new testcase with userdata
1 parent 11ca3eb commit af56d52

File tree

7 files changed

+5261
-0
lines changed

7 files changed

+5261
-0
lines changed

tests/test_smile.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,6 +2207,47 @@ async def test_connect_anna_heatpump_cooling(self):
22072207
await smile.close_connection()
22082208
await self.disconnect(server, client)
22092209

2210+
@pytest.mark.asyncio
2211+
async def test_connect_anna_heatpump_cooling_to_off(self):
2212+
"""Test a Anna with Elga setup in cooling mode, to cooling off ."""
2213+
testdata = {
2214+
# Anna
2215+
"3cb70739631c4d17a86b8b12e8a5161b": {
2216+
"selected_schedule": "None",
2217+
"active_preset": "home",
2218+
"mode": "cool",
2219+
"sensors": {
2220+
"illuminance": 25.5,
2221+
"cooling_activation_outdoor_temperature": 21.0,
2222+
"cooling_deactivation_threshold": 6,
2223+
},
2224+
},
2225+
# Heater central
2226+
"1cbf783bb11e4a7c8a6843dee3a86927": {
2227+
"binary_sensors": {
2228+
"cooling_state": True,
2229+
"dhw_state": False,
2230+
"heating_state": False,
2231+
},
2232+
"sensors": {
2233+
"outdoor_temperature": 22.0,
2234+
"water_temperature": 24.7,
2235+
"water_pressure": 1.61,
2236+
},
2237+
},
2238+
# Gateway
2239+
"015ae9ea3f964e668e490fa39da3870b": {
2240+
"sensors": {"outdoor_temperature": 22.0}
2241+
},
2242+
}
2243+
2244+
self.smile_setup = "anna_heatpump_cooling"
2245+
server, smile, client = await self.connect_wrapper()
2246+
2247+
await self.device_test(smile, testdata, True)
2248+
await smile.close_connection()
2249+
await self.disconnect(server, client)
2250+
22102251
@pytest.mark.asyncio
22112252
async def test_connect_anna_elga_2(self):
22122253
"""Test a Anna with Elga setup in cooling mode (with missing outdoor temperature - solved)."""

userdata/anna_heatpump_cooling_to_off/.!16852!core.domain_objects.xml

Whitespace-only changes.

userdata/anna_heatpump_cooling_to_off/core.appliances.xml

Lines changed: 1267 additions & 0 deletions
Large diffs are not rendered by default.

userdata/anna_heatpump_cooling_to_off/core.direct_objects.xml

Lines changed: 1401 additions & 0 deletions
Large diffs are not rendered by default.

userdata/anna_heatpump_cooling_to_off/core.domain_objects.xml

Lines changed: 2028 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<locations>
3+
<location id='a57efe5f145f498c9be62a9b63626fbf'>
4+
<name>Home</name>
5+
<description></description>
6+
<type>building</type>
7+
<created_date>2019-01-31T12:00:30.991+01:00</created_date>
8+
<modified_date>2020-04-09T14:09:42.348+02:00</modified_date>
9+
<deleted_date></deleted_date>
10+
<preset>home</preset>
11+
<clients/>
12+
<appliances/>
13+
<logs>
14+
<point_log id='0977ec115e754e65ac849f36381e92d8'>
15+
<updated_date>2020-04-09T14:09:41+02:00</updated_date>
16+
<type>wind_vector</type>
17+
<unit>m_s</unit>
18+
<last_consecutive_log_date>2020-04-09T14:09:41+02:00</last_consecutive_log_date>
19+
<period start_date="2020-04-09T14:09:41+02:00" end_date="2020-04-09T14:09:41+02:00">
20+
<measurement log_date="2020-04-09T14:09:41+02:00">(4.10,50.00)</measurement>
21+
</period>
22+
<wind_vector id='53398d25518a4b258247ce01443f075b'/>
23+
</point_log>
24+
<point_log id='217dcb6bb1114acea5cb9c02eeebce93'>
25+
<updated_date>2020-04-09T14:09:41+02:00</updated_date>
26+
<type>solar_irradiance</type>
27+
<unit>W_m2</unit>
28+
<last_consecutive_log_date>2020-04-09T14:09:41+02:00</last_consecutive_log_date>
29+
<period start_date="2020-04-09T14:09:41+02:00" end_date="2020-04-09T14:09:41+02:00">
30+
<measurement log_date="2020-04-09T14:09:41+02:00">653.63</measurement>
31+
</period>
32+
<irradiance_meter id='2779db419be4410588392bf6c0a59f62'/>
33+
</point_log>
34+
<point_log id='5a2cd3d47eb0459988325e819af6bcd2'>
35+
<updated_date>2020-04-09T14:09:41+02:00</updated_date>
36+
<type>weather_description</type>
37+
<unit></unit>
38+
<last_consecutive_log_date>2020-04-09T14:09:41+02:00</last_consecutive_log_date>
39+
<period start_date="2020-04-09T14:09:41+02:00" end_date="2020-04-09T14:09:41+02:00">
40+
<measurement log_date="2020-04-09T14:09:41+02:00">clear</measurement>
41+
</period>
42+
<weather_descriptor id='e32cda35324644d6a3f306d809ba6dce'/>
43+
</point_log>
44+
<point_log id='7f93a0e35a8941e0af5064efa04d78da'>
45+
<updated_date>2020-04-09T14:09:41+02:00</updated_date>
46+
<type>outdoor_temperature</type>
47+
<unit>C</unit>
48+
<last_consecutive_log_date>2020-04-09T14:09:41+02:00</last_consecutive_log_date>
49+
<period start_date="2020-04-09T14:09:41+02:00" end_date="2020-04-09T14:09:41+02:00">
50+
<measurement log_date="2020-04-09T14:09:41+02:00">20.25</measurement>
51+
</period>
52+
<thermo_meter id='a69da3a5a8504186b6773c95f79e641e'/>
53+
</point_log>
54+
<point_log id='bd20af772cbd4112b5e67b66d23b9cf4'>
55+
<updated_date>2020-04-09T14:09:41+02:00</updated_date>
56+
<type>humidity</type>
57+
<unit>RH</unit>
58+
<last_consecutive_log_date>2020-04-09T14:09:41+02:00</last_consecutive_log_date>
59+
<period start_date="2020-04-09T14:09:41+02:00" end_date="2020-04-09T14:09:41+02:00">
60+
<measurement log_date="2020-04-09T14:09:41+02:00">42.00</measurement>
61+
</period>
62+
<hygro_meter id='37958fc1ba4c4d49a2667084cb78cab3'/>
63+
</point_log>
64+
</logs>
65+
<actuator_functionalities/>
66+
</location>
67+
<location id='c784ee9fdab44e1395b8dee7d7a497d5'>
68+
<name>Living room</name>
69+
<description>The room containing the (central) home thermostat.</description>
70+
<type>livingroom</type>
71+
<created_date>2019-01-31T12:00:42.573+01:00</created_date>
72+
<modified_date>2020-04-09T14:12:19.512+02:00</modified_date>
73+
<deleted_date></deleted_date>
74+
<preset>home</preset>
75+
<clients/>
76+
<appliances>
77+
<appliance id='3cb70739631c4d17a86b8b12e8a5161b'/>
78+
</appliances>
79+
<logs>
80+
<point_log id='20771e494544464d971e576353ed20b1'>
81+
<updated_date>2020-04-09T14:12:19.497+02:00</updated_date>
82+
<type>temperature</type>
83+
<unit></unit>
84+
<last_consecutive_log_date>2020-04-08T19:05:35.819+02:00</last_consecutive_log_date>
85+
<period start_date="2020-04-09T14:12:19.497+02:00" end_date="2020-04-09T14:12:19.497+02:00">
86+
<measurement log_date="2020-04-09T14:12:19.497+02:00">23.30</measurement>
87+
</period>
88+
</point_log>
89+
<point_log id='c962919ed1a449a0bb26fd7d97bff972'>
90+
<updated_date></updated_date>
91+
<type>cooling_activation_outdoor_temperature</type>
92+
<unit></unit>
93+
<last_consecutive_log_date></last_consecutive_log_date>
94+
</point_log>
95+
<point_log id='d33199e9d3d949a9b95d80e86a057ed2'>
96+
<updated_date>2020-04-08T22:20:25.799+02:00</updated_date>
97+
<type>thermostat</type>
98+
<unit>C</unit>
99+
<last_consecutive_log_date>2020-04-08T10:27:27.777+02:00</last_consecutive_log_date>
100+
<period start_date="2020-04-08T22:20:25.799+02:00" end_date="2020-04-08T22:20:25.799+02:00">
101+
<measurement log_date="2020-04-08T22:20:25.799+02:00">21.00</measurement>
102+
</period>
103+
</point_log>
104+
</logs>
105+
<actuator_functionalities>
106+
<thermostat_functionality id='9b6287fc68a545019d2706e892506827'>
107+
<updated_date>2020-04-08T22:20:25.012+02:00</updated_date>
108+
<type>cooling_activation_outdoor_temperature</type>
109+
<setpoint>21</setpoint>
110+
<lower_bound>1</lower_bound>
111+
<upper_bound>40</upper_bound>
112+
<resolution>0.1</resolution>
113+
<regulations/>
114+
</thermostat_functionality>
115+
<thermostat_functionality id='dbe0ce59091f4753a0a31b81c1e8cb2b'>
116+
<updated_date>2020-04-08T22:20:25.800+02:00</updated_date>
117+
<type>thermostat</type>
118+
<setpoint>21</setpoint>
119+
<lower_bound>4</lower_bound>
120+
<upper_bound>30</upper_bound>
121+
<resolution>0.1</resolution>
122+
<regulations><ame_regulation id='b5f6056bf9844cac9d1700eb0d532f66'/></regulations>
123+
</thermostat_functionality>
124+
</actuator_functionalities>
125+
</location>
126+
<location id='1b3dd09c4ec94e73a77be6462be2d34f'>
127+
<name>Kantoor</name>
128+
<description></description>
129+
<type>office</type>
130+
<created_date>2019-11-21T11:46:42.496+01:00</created_date>
131+
<modified_date>2019-11-21T11:46:42.570+01:00</modified_date>
132+
<deleted_date></deleted_date>
133+
<preset>home</preset>
134+
<clients/>
135+
<appliances/>
136+
</location>
137+
</locations>

0 commit comments

Comments
 (0)