Skip to content

Commit

Permalink
2024.2.0 (#82)
Browse files Browse the repository at this point in the history
* fixes #78

* bump version

* Update devcontainer
  • Loading branch information
pantherale0 committed Feb 11, 2024
1 parent 3c85792 commit ac69780
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ludeeus/integration_blueprint",
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
"image": "mcr.microsoft.com/devcontainers/python:3.12-bullseye",
"postCreateCommand": "scripts/setup",
"forwardPorts": [8123],
"portsAttributes": {
Expand Down
11 changes: 7 additions & 4 deletions custom_components/nintendo_parental/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DataUpdateCoordinator for nintendo_parental."""

from __future__ import annotations
import contextlib

Expand Down Expand Up @@ -39,14 +40,16 @@ def __init__(
config_entry: ConfigEntry,
) -> None:
"""Initialize."""
self._update_interval = config_entry.data[CONF_UPDATE_INTERVAL]
self._config_update_interval = config_entry.data[CONF_UPDATE_INTERVAL]
if config_entry.options:
self.update_interval = config_entry.options.get(CONF_UPDATE_INTERVAL)
self._config_update_interval = config_entry.options.get(
CONF_UPDATE_INTERVAL
)
super().__init__(
hass=hass,
logger=LOGGER,
name=DOMAIN,
update_interval=timedelta(seconds=self._update_interval),
update_interval=timedelta(seconds=self._config_update_interval),
)

self.api: NintendoParental = NintendoParental(
Expand All @@ -67,7 +70,7 @@ async def _async_update_data(self):
"""Request the API to update."""
try:
with contextlib.suppress(InvalidSessionTokenException):
async with async_timeout.timeout(self._update_interval - 5):
async with async_timeout.timeout(self._config_update_interval - 5):
return await self.api.update()
except InvalidOAuthConfigurationException as err:
raise ConfigEntryAuthFailed(err) from err
Expand Down
2 changes: 1 addition & 1 deletion custom_components/nintendo_parental/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"requirements": [
"pynintendoparental==0.4.7"
],
"version": "2024.1.1"
"version": "2024.2.0"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Nintendo Switch Parental Controls",
"filename": "nintendo_parental.zip",
"hide_default_branch": true,
"homeassistant": "2023.12.4",
"homeassistant": "2024.2.0",
"render_readme": true,
"zip_release": true
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
colorlog==6.8.0
homeassistant==2023.12.4
homeassistant==2024.2.0
pip>=21.0,<23.4
ruff==0.1.9
pynintendoparental==0.4.6

0 comments on commit ac69780

Please sign in to comment.