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

Document integration can consume the state of entities which provide location #2081

Merged

Conversation

emontnemery
Copy link
Contributor

@emontnemery emontnemery commented Feb 14, 2024

Proposed change

Document integration can consume the state of entities which provide location

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

@@ -23,6 +23,8 @@ To suggest a new domain, start a discussion in [the architecture repository](htt

These integrations interact with external devices & services and make them available in Home Assistant via integrations that define IoT domains like `light`. An example of such an integration is Philips Hue. Philips Hue lights are made available as light entities in Home Assistant.

Integrations which interact with external devices & services are generally not allowed to consume the state of entities from other integrations, with the exception of entities from other integrations which have a location, e.g. the state of zone and device_tracker entities.
Copy link
Member

Choose a reason for hiding this comment

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

This does not exclude sensor entities with lat and long set in the state attributes, as they also show on the map. iss is an example for this.

When you read this, you could read such entity as "entities from other integrations which have a location"

Copy link
Contributor Author

@emontnemery emontnemery Feb 14, 2024

Choose a reason for hiding this comment

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

Do we need to assume our developers read the documentation like the devil reads the bible? A sensor, or button, or switch, is not designed to provide a location whereas a device tracker or zone entity is.
Having said that, do you have a suggestion for how to make it clearer?

Copy link
Member

Choose a reason for hiding this comment

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

True true, just sharing this in case you weren't aware. I don't have any other proposals.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your concern is valid, it's just that I also don't have a great idea for how to make it clearer :)

Copy link
Member

Choose a reason for hiding this comment

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

We've said that we allow location state from other integrations. It doesn't matter what kind of entity that is. If something seems weird in a PR, we'll take it up for discussion at that time.

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare MartinHjelmare merged commit 828927b into master Feb 19, 2024
4 checks passed
@MartinHjelmare MartinHjelmare deleted the clarify_consuming_states_of_other_integrations branch February 19, 2024 10:04
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.

3 participants