Integration to integrate with ha-nintendoparentalcontrols.
This integration will set up the following platforms.
Platform | Description |
---|---|
sensor |
Read only states (such as current screen time) |
switch |
Per app and device controls |
time |
Control limit time and bonus time for current day |
- Sensor for used screen time
- Screen time sensor displays last 5 days of usage, including applications used and players.
- Switch to enable/disable the "Suspend Software" mode once the screentime limit has been reached.
- Switch to enable and disable alarms for the current day, Nintendo resets this back at midnight.
- Time platform to adjust the total amount of time allowed to play in the day, setting this to 0:00 and turning on "Suspend Software Limit" will effectively disable the device unless you enter the parental controls pin
- Optional switches to control the whitelist state of applications, this needs to be configured from the options menu.
- Add repository URL into HACS and install "Nintendo Switch Parental Controls"
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Nintendo Switch Parental Controls
- You will be prompted for an access token, click the link provided in the description of the dialog (this is unique) and login to your Nintendo account.
- After login, you will see a
Linking an External Account
screen. For the account you wish to link, right click on the red buttonSelect this person
and clickCopy Link
- #Optional# - If you inspect the link you should find the following format npf54789befxxxxxxxx://auth#session_token_code={redacted}&state={redacted}&session_state={redacted}
- Close the
Nintendo Account
tab - Paste the previously copied value into the
Access token
field (the entire string you copied) - Click
Submit
- The configuration flow should then show some additional options, don't adjust the first box as this is the refresh token that will be used to refresh the access tokens in the background and is retrieved from Nintndo using the token you previously provided.
- Click
Submit
You can configure applications to register entites for within the "CONFIGURE" menu after setting up the integration for the first time.
Enabling debugging will produce a lot of log entiries.
- New Nintendo Switch devices (or ones recently enrolled in Nintendo Parental Controls) don't usually provide enough data for the integration to function properly. If you see different errors and warnings such as
Unable to update daily summary for device Switch 1: A summary for the given date 2024-01-01 20:00:00 does not exist
this will resolve itself if left for a period of time once Nintendo has started to collect data from your Switch. See #55 - Duplicate application names in configuration menu - this is purely cosemtic, the underlying IDs are identical between different consoles.
If you want to contribute to this please read the Contribution guidelines