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 warning that REST API is no longer supported #2150

Closed
wants to merge 1 commit into from

Conversation

iamjackg
Copy link

@iamjackg iamjackg commented Apr 23, 2024

Proposed change

According to home-assistant/architecture#1074 (comment) the REST API has been superseded by the WebSocket API. There was no mention of this anywhere in the documentation, so I'm adding a warning to let people know.

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

@Klikini
Copy link
Contributor

Klikini commented Apr 25, 2024

This really needs to be merged so people don't rely on the REST API for new projects and then get burned...not that I would know anything about that! 🙃

In addition, I don't remember seeing any mention of this on the blog. Has there been a post about it?

@sebsebseb1982
Copy link

sebsebseb1982 commented Apr 25, 2024

Deprecating the REST API is a really bad idea and will put a stop to projects based on cheap hardware (esp32, etc.). Calling the websocket API on such hardware is unnecessarily complicated.
Very disappointed with Home Assistant and this "surprise" depreciation (ping @emontnemery).
Thank you anyway @iamjackg for your PR.

@Klikini
Copy link
Contributor

Klikini commented Apr 25, 2024

@sebsebseb1982 I learned today that getting states with the Websocket API is actually impossible on memory-limited platforms like those.

I thought there would be a command message to ask the server for the state of a single entity or list of entities, but no, you can only request the state of all entities. This array would take up more memory than embedded devices have, and iterating over an array of a thousand or more entities would take forever even if it fits.

I would really appreciate some justification from Home Assistant leadership as to why the REST API is being deprecated superseded by the WS API, and an opportunity for the community to provide feedback on that decision that will negatively impact it.

@sebsebseb1982
Copy link

Thank you @Klikini for this warning.
I would have been very upset if I had also wasted my time using the WS API without it being viable.

Copy link
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

The rest API is not deprecated, going away, or planned to go away etc.

docs/api/rest.md Show resolved Hide resolved
@krkeegan
Copy link

krkeegan commented May 1, 2024

I just ran into issue home-assistant/core#99820 and spent over an hour banging my head against the wall trying to figure out why it wasn't working.

That is frustrating to say the least.

I agree it seems like the REST API is EOL, will no longer have features added, or at least the get_forecasts will never be supported in REST.

Since at least one of those statements is true, can we at least get a more clear error message to help others who wind up here?

@bdraco
Copy link
Member

bdraco commented May 20, 2024

closing this PR per #2150 (review)

@bdraco bdraco closed this May 20, 2024
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.

Weather get_forecast service returns 500 on 2023.9.0
6 participants