Skip to content

Commit 88b0085

Browse files
committed
Tinker_regulation_mode(): catch PlugwiseException
1 parent 047625a commit 88b0085

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_smile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,11 @@ async def tinker_regulation_mode(smile):
581581
warning = " Negative test"
582582
mode = mode[1:]
583583
_LOGGER.info("%s", f"- Adjusting regulation mode to {mode}{warning}")
584-
await smile.set_regulation_mode(mode)
585-
_LOGGER.info(" + worked as intended")
584+
try:
585+
await smile.set_regulation_mode(mode)
586+
_LOGGER.info(" + worked as intended")
587+
except pw_exceptions.PlugwiseException:
588+
_LOGGER.info(" + failed as expected")
586589

587590
@staticmethod
588591
async def tinker_max_boiler_temp(smile):

0 commit comments

Comments
 (0)