Skip to content

Commit

Permalink
Merge pull request #67 from natekspencer/dev
Browse files Browse the repository at this point in the history
Update night light level to match new values from firmware update
  • Loading branch information
natekspencer authored Oct 10, 2022
2 parents 8a68ae5 + 0b0d274 commit 3f92b54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pylitterbot/robot/litterrobot4.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
class NightLightLevel(IntEnum):
"""Night light level of a Litter-Robot 4 unit."""

LOW = 85
MEDIUM = 170
HIGH = 255
LOW = 25
MEDIUM = 50
HIGH = 100


@unique
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"cleanCycleWaitTime": 7,
"isKeypadLockout": False,
"nightLightMode": "AUTO",
"nightLightBrightness": 255,
"nightLightBrightness": 100,
"isPanelSleepMode": False,
"panelSleepTime": 0,
"panelWakeTime": 0,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_litterrobot4.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def test_litter_robot_4(
)
assert robot.model == "Litter-Robot 4"
assert robot.name == "Litter-Robot 4"
assert robot.night_light_brightness == 255
assert robot.night_light_brightness == 100
assert robot.night_light_level == NightLightLevel.HIGH
assert robot.night_light_mode == NightLightMode.AUTO
assert robot.night_light_mode_enabled
Expand Down Expand Up @@ -146,7 +146,7 @@ async def test_litter_robot_4(
"errors": [{"message": error_message}],
},
)
assert not await robot.set_night_light_brightness(255)
assert not await robot.set_night_light_brightness(100)
assert caplog.messages[-1] == error_message

# test multiple errors in message
Expand All @@ -158,7 +158,7 @@ async def test_litter_robot_4(
"errors": [{"message": error_message}, {"message": error_message2}],
},
)
assert not await robot.set_night_light_brightness(255)
assert not await robot.set_night_light_brightness(100)
assert caplog.messages[-1] == f"{error_message}, {error_message2}"

mock_aioresponse.post(
Expand Down Expand Up @@ -223,7 +223,7 @@ async def test_litter_robot_4(
}
},
)
await robot.set_night_light_brightness(85)
await robot.set_night_light_brightness(25)
with pytest.raises(InvalidCommandException):
await robot.set_night_light_brightness(20)

Expand Down

0 comments on commit 3f92b54

Please sign in to comment.