Return the listeners with the template result for the websocket api#39925
Merged
bdraco merged 2 commits intohome-assistant:devfrom Sep 11, 2020
Merged
Conversation
balloob
approved these changes
Sep 11, 2020
Merged
9 tasks
Member
Author
|
Tagging this for 0.115 since I think it a small change, and it is going to be difficult and frustrating for users to figure out which state changed events the template is listening for otherwise. If someone feels otherwise, please remove the milestone. |
bdraco
added a commit
to bdraco/home-assistant
that referenced
this pull request
Sep 11, 2020
…et api (home-assistant#39925)" This reverts commit 741487a.
bdraco
added a commit
to bdraco/home-assistant
that referenced
this pull request
Sep 11, 2020
… websocket api (home-assistant#39925)"" This reverts commit 0da704a.
balloob
pushed a commit
that referenced
this pull request
Sep 12, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backstory
@SeanPM5 had some templates that were listening for all states which needed to be cut down to just the needed states. Its hard to tell what the template will listen for currently. To solve this we can return what the template is listening for in the websocket api response. cc @bramkragten
I'm not sure if there are enough users with lots of 'all states' templates that
we should try to get this into 0.115
Proposed change
Return the listeners with the template result for the websocket api
This should make it much easier to find inefficient templates
The thinking is we could update
/developer-tools/templateto showwhat the template is listening for to help make more efficient
templates.
Type of change
Example entry for
configuration.yaml:Example api responses
Additional information
Checklist
black --fast 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.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: