-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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 the ability to bind the template helper entity to a device #117753
base: dev
Are you sure you want to change the base?
Conversation
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
59280d7
to
303fc43
Compare
…when the changes source device
496aa7a
to
1a3114d
Compare
This would be so useful to make existing Bosch RTH devices work again via Z2M, as the relevant attributes to actually control this device were changed in Z2M 1.38.0. |
…ntries when the changes source device
Why only template sensors? I’d love to be able to bind a template switch entity to a device as well. |
This would be handy for devices that only support Power and not Energy, so we can assign an Energy template sensor to the device it belongs too. |
It is not allowed to create devices through YAML configuration, so this PR is restricted to helpers that are configured by the UI (sensor and binary sensor). |
Breaking change
None
Proposed change
This PR adds the option for the user to bind the template entity (sensor or binary sensor) configured from the UI to a device.
This is a much requested feature, for example in these posts:
I believe the device selector is a good way out of this, giving the user direct control over the helper/device link.
If you accept this implementation, I think about extending it to other helpers that do not inherit the device from their source entity.
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: