Skip to content
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

Add PlayStation Network Documentation #36520

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

JackJPowell
Copy link

@JackJPowell JackJPowell commented Dec 23, 2024

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

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • New PlayStation Network Integration PR#133901
  • The associated brand images were included for the custom integration and are still up to date. Brands PR

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • New Features

    • Introduced PlayStation Network integration for Home Assistant, allowing users to display currently playing game information on their dashboards.
    • Added support for game titles and cover art in the media player interface.
  • Documentation

    • Comprehensive setup instructions provided, including prerequisites and configuration details for PlayStation 4 and PlayStation 5 consoles.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Dec 23, 2024
Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 1e11ec1
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/6769a02dc4ae3100088b6a35
😎 Deploy Preview https://deploy-preview-36520--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JackJPowell JackJPowell marked this pull request as ready for review December 23, 2024 17:42
Copy link
Contributor

coderabbitai bot commented Dec 23, 2024

📝 Walkthrough

Walkthrough

The pull request introduces a new integration for PlayStation Network in Home Assistant, enabling users to track and display information about their currently playing games. The integration allows connection to PlayStation Network accounts using an NPSSO token, creating media player entities for PlayStation 4 and PlayStation 5 consoles. It supports retrieving game information with periodic updates every 30 seconds, while maintaining a request rate limit of 300 calls per 15 minutes.

Changes

File Change Summary
source/_integrations/playstation_network.markdown Added new integration documentation for PlayStation Network, including setup instructions, configuration details, prerequisites, and usage guidelines

Sequence Diagram

sequenceDiagram
    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)
Loading

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 links

The 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 clarity

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between dc032aa and 1e11ec1.

📒 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:

  1. Specify what data is retrieved in each request
  2. Explain the retry strategy if rate limits are hit
  3. 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.
Copy link
Contributor

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:

  1. Direct steps to obtain the NPSSO token
  2. Screenshots or a visual guide
  3. Troubleshooting tips for common token retrieval issues

This would improve the user experience during setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant