-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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 invert option to switch_as_x #107535
Add invert option to switch_as_x #107535
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
if config_entry.minor_version < 2: | ||
options[CONF_INVERT] = False |
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.
This means that if someone has upgraded and configured a switch_as_x
with invert=True
and then downgrades it will change the option for that entry to invert=False
hence changing how that entity works (even if the user then upgrade again).
It should probably only set this option if it's not already there?
Co-authored-by: G Johansson <[email protected]>
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
Thanks!
An approved frontend PR should be linked and the PR description checklist should be filled out. After that we can merge. |
I found the frontend PR and linked it in the PR description. It's approved but not merged. |
Please fill out the PR description and merge. |
Proposed change
Add invert option to switch_as_x cover, lock and valve entities.
When the invert option is enabled, the state of the entity is reversed, as an example an inverted switch_as_x valve will be open when the switch is turned off.
Needs frontend change
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: