Skip to content

Commit 1bb2dd5

Browse files
Copilotliudger
andcommitted
Fix linting issues to make GitHub Actions pass
Co-authored-by: liudger <4112111+liudger@users.noreply.github.com>
1 parent cd79ec2 commit 1bb2dd5

3 files changed

Lines changed: 8 additions & 20 deletions

File tree

examples/control.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
State,
1818
StaticState,
1919
)
20+
from bsblan.models import DHWTimeSwitchPrograms
2021

2122

2223
async def get_attribute(
@@ -225,7 +226,7 @@ async def main() -> None:
225226

226227
# Example: Set DHW time program for Monday
227228
print("\nSetting DHW time program for Monday to 13:00-14:00")
228-
from bsblan.models import DHWTimeSwitchPrograms
229+
229230
dhw_programs = DHWTimeSwitchPrograms(
230231
monday="13:00-14:00 ##:##-##:## ##:##-##:##"
231232
)

src/bsblan/bsblan.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ async def set_hot_water(
577577
dhw_time_programs (DHWTimeSwitchPrograms | None): Time switch programs.
578578
579579
"""
580-
581580
# Validate only one parameter is being set
582581
time_program_params = []
583582
if dhw_time_programs:

tests/test_dhw_time_switch.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
2323
"""
2424
# Test setting time program for Monday
2525
assert isinstance(mock_bsblan._request, AsyncMock)
26-
dhw_programs = DHWTimeSwitchPrograms(
27-
monday="13:00-14:00 ##:##-##:## ##:##-##:##"
28-
)
26+
dhw_programs = DHWTimeSwitchPrograms(monday="13:00-14:00 ##:##-##:## ##:##-##:##")
2927
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
3028
mock_bsblan._request.assert_awaited_with(
3129
base_path="/JS",
@@ -37,9 +35,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
3735
)
3836

3937
# Test setting time program for Tuesday
40-
dhw_programs = DHWTimeSwitchPrograms(
41-
tuesday="06:00-08:00 17:00-20:00 ##:##-##:##"
42-
)
38+
dhw_programs = DHWTimeSwitchPrograms(tuesday="06:00-08:00 17:00-20:00 ##:##-##:##")
4339
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
4440
mock_bsblan._request.assert_awaited_with(
4541
base_path="/JS",
@@ -65,9 +61,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
6561
)
6662

6763
# Test setting time program for Thursday
68-
dhw_programs = DHWTimeSwitchPrograms(
69-
thursday="06:00-09:00 16:00-22:00 ##:##-##:##"
70-
)
64+
dhw_programs = DHWTimeSwitchPrograms(thursday="06:00-09:00 16:00-22:00 ##:##-##:##")
7165
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
7266
mock_bsblan._request.assert_awaited_with(
7367
base_path="/JS",
@@ -79,9 +73,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
7973
)
8074

8175
# Test setting time program for Friday
82-
dhw_programs = DHWTimeSwitchPrograms(
83-
friday="06:00-09:00 15:00-23:00 ##:##-##:##"
84-
)
76+
dhw_programs = DHWTimeSwitchPrograms(friday="06:00-09:00 15:00-23:00 ##:##-##:##")
8577
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
8678
mock_bsblan._request.assert_awaited_with(
8779
base_path="/JS",
@@ -93,9 +85,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
9385
)
9486

9587
# Test setting time program for Saturday
96-
dhw_programs = DHWTimeSwitchPrograms(
97-
saturday="08:00-23:00 ##:##-##:## ##:##-##:##"
98-
)
88+
dhw_programs = DHWTimeSwitchPrograms(saturday="08:00-23:00 ##:##-##:## ##:##-##:##")
9989
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
10090
mock_bsblan._request.assert_awaited_with(
10191
base_path="/JS",
@@ -107,9 +97,7 @@ async def test_set_dhw_time_program(mock_bsblan: BSBLAN) -> None:
10797
)
10898

10999
# Test setting time program for Sunday
110-
dhw_programs = DHWTimeSwitchPrograms(
111-
sunday="08:00-22:00 ##:##-##:## ##:##-##:##"
112-
)
100+
dhw_programs = DHWTimeSwitchPrograms(sunday="08:00-22:00 ##:##-##:## ##:##-##:##")
113101
await mock_bsblan.set_hot_water(dhw_time_programs=dhw_programs)
114102
mock_bsblan._request.assert_awaited_with(
115103
base_path="/JS",

0 commit comments

Comments
 (0)