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

Update communication.md #2221

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Update communication.md #2221

merged 1 commit into from
Jun 17, 2024

Conversation

DilanTsasi
Copy link
Contributor

@DilanTsasi DilanTsasi commented Jun 17, 2024

Resolving 404 errors by changing http://supervisor/core/api to http://supervisor/core/api/

Proposed change

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Removed stale or deprecated documentation

Additional information

  • This PR fixes or closes issue: fixes #
  • Link to relevant existing code or pull request:

Summary by CodeRabbit

  • Documentation
    • Updated URL for Home Assistant Core API communication to ensure proper redirection.

Resolving 404 errors by changing http://supervisor/core/api to http://supervisor/core/api/
Copy link
Contributor

coderabbitai bot commented Jun 17, 2024

Walkthrough

Walkthrough

The recent update in the docs/add-ons/communication.md file involves a small but crucial adjustment to an API URL, changing http://supervisor/core/api to http://supervisor/core/api/. This change ensures proper redirection for internal communication with the Home Assistant Core API, enhancing the reliability and accuracy of API calls.

Changes

Files Change Summary
docs/add-ons/communication.md Updated URL from http://supervisor/core/api to http://supervisor/core/api/ to improve API communication.

Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 4b9cc7c and 2ced94c.

Files selected for processing (1)
  • docs/add-ons/communication.md (1 hunks)
Additional context used
LanguageTool
docs/add-ons/communication.md

[style] ~9-~9: The preposition ‘with’ is not usually used with the verb ‘talk’. Consider using ‘speak’ instead, or replacing the preposition. (TALK_WITH)
Context: ...st network are limited in that they can talk with all internal add-ons by their name, but...


[grammar] ~9-~9: The plural noun “works” cannot be used with the article “an”. Did you mean “an alias work” or “alias works”? (A_NNS)
Context: ...s these add-ons by name. However, using an alias works for both! Names/aliases are used for c...


[misspelling] ~12-~12: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...ollowing format: {REPO}_{SLUG}, e.g., local_xy or 3283fh_myaddon. In this example, ...


[misspelling] ~12-~12: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...t: {REPO}_{SLUG}, e.g., local_xy or 3283fh_myaddon. In this example, {SLUG} is defined ...


[uncategorized] ~12-~12: The official name of this software platform is spelled with a capital “H”. (GITHUB)
Context: ...cal. If the add-on is installed from a Github repository, {REPO}` is a hashed identi...


[misspelling] ~12-~12: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...alls that use the [Supervisor add-on API][supervisor-addon-api]. You can view the repository identifie...


[misspelling] ~12-~12: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...via a GET request to the Supervisor API addons endpoint. Use supervisor for commun...


[misspelling] ~18-~18: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...can talk to the [Home Assistant Core API][core-api] using the internal proxy. This makes i...


[style] ~18-~18: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE)
Context: ...using the internal proxy. This makes it very easy to communicate with the API without kno...


[misspelling] ~18-~18: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...he right place. The next step is to add homeassistant_api: true to the config.yaml file an...


[typographical] ~20-~20: After the expression ‘for example’ a comma is usually used. (COMMA_FOR_EXAMPLE)
Context: ...ed-requests) when making requests. For example `curl -X GET -H "Authorization: Bearer ...


[misspelling] ~22-~22: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...is also a proxy for the [Home Assistant Websocket API][core-websocket] that works like th...


[misspelling] ~22-~22: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...xy for the [Home Assistant Websocket API][core-websocket] that works like the API proxy above an...


[misspelling] ~22-~22: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...R_TOKENas the password. Use this URL:ws://supervisor/core/websocket`. It is also possible to talk directly...


[misspelling] ~24-~24: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...Home Assistant instance, which is named homeassistant, over the internal network. However, y...


[misspelling] ~26-~26: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...data over STDIN to an add-on to use the hassio.addon_stdin service. ## Supervisor AP...


[misspelling] ~30-~30: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ... To enable calls to the [Supervisor API][supervisor-api], add hassio_api: true to the `config...


[misspelling] ~30-~30: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...e [Supervisor API][supervisor-api], add hassio_api: true to the config.yaml file an...


[uncategorized] ~30-~30: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...nvironment variable SUPERVISOR_TOKEN. Now you can use the API over the URL: `http...


[misspelling] ~30-~30: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...ed to change the Supervisor API role to hassio_role: default. Add-ons can call some ...


[misspelling] ~32-~32: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...ome API commands without needing to set hassio_api: true: - /core/api - `/core/api...


[style] ~46-~46: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_NEED_TO_VB)
Context: ...ublic to other add-ons without the user needing to add any configuration. An add-on can ge...


[style] ~46-~46: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_NEED_TO_VB)
Context: ...to use and to connect to it. The add-on needs to mark the usage of a service in the add-...


[style] ~46-~46: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...dd-on configuration in order to be able to access a service. All suppor...


[misspelling] ~46-~46: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...are documented in the [API documentation][supervisor-services-api]. Supported services are: - mqtt - my...


[misspelling] ~50-~50: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...vices-api]. Supported services are: - mqtt - mysql You can use Bashio to get this...


[misspelling] ~51-~51: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...pi]. Supported services are: - mqtt - mysql You can use Bashio to get this informa...


[misspelling] ~53-~53: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...vices are: - mqtt - mysql You can use Bashio to get this information for your add-on...


[misspelling] ~53-~53: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...to get this information for your add-on init as: `bashio::services ...

Additional comments not posted (1)
docs/add-ons/communication.md (1)

18-18: Corrected URL ensures proper redirection.

The updated URL http://supervisor/core/api/ includes the trailing slash, which is a common requirement in RESTful APIs to ensure that the endpoint is interpreted as a directory, potentially avoiding redirection issues or 404 errors when accessed without it. Good catch!

Tools
LanguageTool

[misspelling] ~18-~18: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...can talk to the [Home Assistant Core API][core-api] using the internal proxy. This makes i...


[style] ~18-~18: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE)
Context: ...using the internal proxy. This makes it very easy to communicate with the API without kno...


[misspelling] ~18-~18: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...he right place. The next step is to add homeassistant_api: true to the config.yaml file an...


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @DilanTsasi 👍

../Frenck

@frenck frenck merged commit 4e417d8 into home-assistant:master Jun 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants