-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add PlayStation Network Documentation #36520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe pull request introduces a new integration for PlayStation Network in Home Assistant, providing comprehensive documentation on enabling support for the integration. It details the steps necessary to connect to PlayStation Network accounts using an NPSSO token and describes the capabilities of the integration, including the creation of media player entities for PlayStation 4 and PlayStation 5 consoles. The integration retrieves game information every 30 seconds while adhering to a rate limit of 300 requests per 15 minutes. Changes
Sequence DiagramsequenceDiagram
participant User
participant HA as Home Assistant
participant PSN as PlayStation Network
User->>HA: Configure PSN Integration
User->>HA: Provide NPSSO Token
HA->>PSN: Authenticate & Request Game Data
PSN-->>HA: Return Game Information
HA->>HA: Create Media Player Entities
HA->>PSN: Periodic Data Refresh (30s)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
source/_integrations/playstation_network.markdown (2)
15-18
: Consider adding developer documentation linksThe related links section could be enhanced by including links to:
- PlayStation Network API documentation
- PlayStation Developer Portal
- The integration's source code in Home Assistant
This would help users and developers better understand the integration's capabilities.
24-24
: Improve writing clarityConsider revising the sentence to be more concise:
-PlayStation Network (PSN) is a digital media entertainment service provided by [Sony Interactive Entertainment](https://en.wikipedia.org/wiki/Sony_Interactive_Entertainment). It allows users to enjoy a variety of gaming-related services such as purchasing games, downloading content, and connecting with other players. +PlayStation Network (PSN) is a digital media entertainment service provided by [Sony Interactive Entertainment](https://en.wikipedia.org/wiki/Sony_Interactive_Entertainment). It enables users to purchase games, download content, and connect with other players.🧰 Tools
🪛 LanguageTool
[style] ~24-~24: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...ntertainment). It allows users to enjoy a variety of gaming-related services such as purchas...(A_VARIETY_OF)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/playstation_network.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/playstation_network.markdown
[style] ~24-~24: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...ntertainment). It allows users to enjoy a variety of gaming-related services such as purchas...
(A_VARIETY_OF)
🔇 Additional comments (2)
source/_integrations/playstation_network.markdown (2)
52-52
: Verify rate limit calculations and add update details
The integration makes 3 requests every 30 seconds:
- 6 requests per minute
- 360 requests per hour
- 90 requests per 15 minutes
While this is within the 300 requests/15 minutes limit, please:
- Specify what data is retrieved in each request
- Explain the retry strategy if rate limits are hit
- Consider implementing exponential backoff for failed requests
Also applies to: 58-58
6-6
: Verify the release version
The release version 2025.1
seems unusually far in the future. Please verify if this is the intended version or if it should be adjusted to a nearer release.
✅ Verification successful
Let me verify the release version by checking other integration documentation files and Home Assistant's release patterns.
Let me try a different approach to check the documentation files and release patterns.
Based on the search results, I can see several integrations with release version 2025.1, including:
- watergate
- powerfox
- playstation_network
- slide_local
- ohme
- ituran
- eheimdigital
- cookidoo
This indicates that 2025.1 is a valid future release version used for upcoming integrations. Since this is a new integration (PlayStation Network) being added, setting the release version to 2025.1 appears to be intentional and follows the pattern used by other new integrations.
Release version 2025.1 is appropriate for this new integration
The version follows the established pattern for new integrations being added to Home Assistant, as evidenced by several other new integrations using the same future release version.
🏁 Scripts executed
The following scripts were executed for the analysis:
Error: No shell scripts found
Script:
#!/bin/bash
# Check recent integration documentation files for their release versions
rg "ha_release:" "source/_integrations/*.markdown" -A 1
# Also check the current version in manifest files
fd manifest.json --exec cat {} \; | jq -r '. | select(.version != null) | .version'
Length of output: 216
Script:
#!/bin/bash
# Check recent integration documentation files for their release versions
rg "ha_release:" source/ -A 1
# List documentation files to verify path structure
fd . source/ -e markdown
Length of output: 66780
## Prerequisites for PlayStation Network integration | ||
|
||
- To set up the PlayStation Network integration, you must first have an active PlayStation Network account. You can register for an account at the [Official PlayStation® Site](https://playstation.com/). | ||
- During the setup process in Home Assistant, you will be asked to provide your NPSSO token. You will need to be logged into [playstation.com](https://playstation.com/) to access the token in your browser. You will find a link to retrieve the token in the config flow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add specific instructions for NPSSO token retrieval
The documentation mentions that users will find a link to retrieve the token in the config flow, but it would be helpful to include:
- Direct steps to obtain the NPSSO token
- Screenshots or a visual guide
- Troubleshooting tips for common token retrieval issues
This would improve the user experience during setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
source/_integrations/playstation_network.markdown (3)
15-17
: Consider adding more relevant related links.The documentation would benefit from additional related links such as:
- PlayStation Network Status page
- PlayStation Network Terms of Service
- PlayStation Network Developer documentation (if public)
28-28
: Enhance the integration overview with more specific features.Consider expanding this section to include:
- List of specific features (e.g., game status tracking, notifications)
- Examples of automation possibilities
- Screenshots of the integration in action
48-51
: Expand the Media Players section with more details.Consider adding:
- Available media player controls and commands
- State information and attributes
- Example screenshots of the media player entity
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/playstation_network.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/playstation_network.markdown
[style] ~24-~24: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...ntertainment). It allows users to enjoy a variety of gaming-related services such as purchas...
(A_VARIETY_OF)
🔇 Additional comments (2)
source/_integrations/playstation_network.markdown (2)
32-33
: Add specific instructions for NPSSO token retrieval.The documentation should include detailed steps for obtaining the NPSSO token to improve user experience during setup.
58-61
: Verify rate limit calculations and provide more context.The documentation states 3 requests per update (every 30 seconds), which equals 360 requests per hour. This needs clarification:
- How does this align with the 300 requests per 15 minutes limit?
- What happens when the rate limit is exceeded?
|
||
Please keep these limits in mind to avoid exceeding the PlayStation Network request allowance. | ||
|
||
The Active state for each device is only reported via the API for the last used device. For example, if you start playing a game on your PS4 and without powering down, launch a game on your PS5, the API will only report your PS5 status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Clarify the device status limitation implications.
Consider adding:
- What users should expect when switching between consoles
- How this affects automations based on device status
- Recommended workarounds if available
## Use Cases | ||
|
||
You can display your currently playing game as artwork on your dashboard. You can also send notifications of your currently playing game to others inviting them to join you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Expand the Use Cases section with more examples.
The current use cases are very brief. Consider adding:
- Detailed automation examples with YAML code snippets
- Common scenarios (e.g., game time tracking, parental controls)
- Integration with other Home Assistant features
Proposed change
This change contains the documentation to accompany the new PlayStation Network integration found on PR#133901. It has followed the quality scale recommendations and attempts to cover all bronze level tasks.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit
New Features
Documentation