Skip to content

Commit c8f2bee

Browse files
committed
Create m_adam_multiple_devices_per_zone fixture
1 parent 2f7e26c commit c8f2bee

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

scripts/manual_fixtures.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@ def json_writer(manual_name: str, all_data: dict) -> None:
2424

2525
print("... Crafting m_* fixtures from userdata ...") # noqa: T201
2626

27+
28+
# Modified Adam fixtures
29+
30+
base_adam_manual = "adam_multiple_devices_per_zone"
31+
basefile = f"./fixtures/{base_adam_manual}/all_data.json"
32+
33+
io = open(basefile)
34+
base = json.load(io)
35+
36+
adam_multiple_devices_per_zone = base.copy()
37+
38+
# Change schedule to not present for "e7693eb9582644e5b865dba8d4447cf1"
39+
adam_multiple_devices_per_zone["devices"]["e7693eb9582644e5b865dba8d4447cf1"].pop("available_schedules")
40+
adam_multiple_devices_per_zone["devices"]["e7693eb9582644e5b865dba8d4447cf1"].pop("select_schedule")
41+
42+
json_writer("m_adam_multiple_devices_per_zone", adam_multiple_devices_per_zone)
43+
2744
base_adam_manual = "adam_jip"
2845
basefile = f"./fixtures/{base_adam_manual}/all_data.json"
2946

@@ -37,6 +54,7 @@ def json_writer(manual_name: str, all_data: dict) -> None:
3754

3855
json_writer("m_adam_jip", adam_jip)
3956

57+
4058
### Manual Adam fixtures
4159

4260
base_adam_manual = "adam_plus_anna_new"
@@ -218,7 +236,7 @@ def json_writer(manual_name: str, all_data: dict) -> None:
218236

219237
json_writer("m_adam_heating", m_adam_heating)
220238

221-
### ANNA
239+
### Manual Anna fixtures
222240

223241
base_anna_manual = "anna_heatpump_heating"
224242
basefile = f"./fixtures/{base_anna_manual}/all_data.json"

0 commit comments

Comments
 (0)