-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Refactor group setup #116317
Refactor group setup #116317
Conversation
Note from a previous PR by @emontnemery related to mixed group support:
|
I don't think we have any custom components that register group states as I would expect that its only for base components. Someone might do it though, but I'm not sure we should support that |
Erik knew of one custom integration, see #116317 (comment) I mentioned the code owner, so hopefully that ping will reach him, Added a developer blog post PR |
Hello, I don't think this affects "Bodymiscale". Basically I started with the basics of the “Plant” component. In the event of a problem, we will make the necessary modifications for proper operation. |
* Refactor group setup * Add @callback decorator and remove commented out code * Keep set, add default on state
self.on_off_mapping: dict[str, str] = {STATE_ON: STATE_OFF} | ||
self.off_on_mapping: dict[str, str] = {STATE_OFF: STATE_ON} | ||
self.on_states_by_domain: dict[str, set[str]] = {} | ||
self.exclude_domains: set[str] = set() | ||
self.state_group_mapping: dict[str, tuple[str, str]] = {} | ||
self.group_entities: set[Group] = set() |
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.
I missed the shared container for entities when doing the review. Its not actually used in this PR
Breaking change
Changes the way entity platform domains register the group on/off states or exclusions.
This will break any custom integrations that implement the group platform and use alternative
ON
/OFF
states, or want to exclude a custom entity platform.Proposed change
Refactor group setup up to:
on
state.This is a first step in the refactoring the
group
integration to allow multipleON
states to be processed correctly in mixed groups. See #116318Add PR for blogpost: home-assistant/developers.home-assistant#2157
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: