Skip to content

Commit

Permalink
2024.5.0b0
Browse files Browse the repository at this point in the history
bump pynintendoparental to 0.6.1
  • Loading branch information
pantherale0 committed May 15, 2024
1 parent c7b50ad commit 54a77c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions custom_components/nintendo_parental/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"pynintendoparental"
],
"requirements": [
"pynintendoparental==0.5.0"
"pynintendoparental==0.6.1"
],
"version": "2024.4.0"
"version": "2024.5.0b0"
}
9 changes: 5 additions & 4 deletions custom_components/nintendo_parental/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ async def async_set_native_value(self, value: float) -> None:
translation_key="play_time_limit_out_of_range",
)
try:
if value == -1:
await self._device.update_max_daily_playtime(minutes=None)
else:
await self._device.update_max_daily_playtime(minutes=value)
await self._device.update_max_daily_playtime(minutes=value)
await self.coordinator.async_request_refresh()
except HttpException as exc:
raise HomeAssistantError(
"Nintendo returned an unexpected response.",
translation_domain=DOMAIN,
translation_key="unexpected_response") from exc
except ValueError as exc:
raise ServiceValidationError(
"A validation error occurred."
) from exc
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ colorlog==6.8.0
homeassistant==2024.2.0
pip>=21.0,<23.4
ruff==0.1.9
pynintendoparental==0.5.0
pynintendoparental==0.6.1

0 comments on commit 54a77c6

Please sign in to comment.