add script shortcut for activating scenes#27223
Merged
Merged
Conversation
use `- scene: scene.<scene name>` in a script to activate a scene
2 tasks
balloob
reviewed
Oct 5, 2019
|
|
||
| DEVICE_ACTION_SCHEMA = DEVICE_ACTION_BASE_SCHEMA.extend({}, extra=vol.ALLOW_EXTRA) | ||
|
|
||
| _SCRIPT_SCENE_SCHEMA = vol.Schema({vol.Required("scene"): string}) |
Member
There was a problem hiding this comment.
Let's validate it as entity ID for the scene domain.
Suggested change
| _SCRIPT_SCENE_SCHEMA = vol.Schema({vol.Required("scene"): string}) | |
| _SCRIPT_SCENE_SCHEMA = vol.Schema({vol.Required("scene"): entity_domain("scene")}) |
balloob
approved these changes
Oct 5, 2019
Member
balloob
left a comment
There was a problem hiding this comment.
Awesome! This is a great contribution 🎉 🐬
Member
|
I think that we should keep it as an entity ID and not object ID, because we don't use just object ID anywhere in the codebase. |
mdonoughe
added a commit
to mdonoughe/home-assistant.github.io
that referenced
this pull request
Oct 5, 2019
script support added in home-assistant/core#27223
mdonoughe
added a commit
to mdonoughe/home-assistant-polymer
that referenced
this pull request
Oct 5, 2019
Script support added in home-assistant/core#27223
balloob
pushed a commit
to home-assistant/frontend
that referenced
this pull request
Oct 5, 2019
Script support added in home-assistant/core#27223
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description:
Use
- scene: scene.<scene name>in a script to activate a scene instead of writingShould it be just
-scene: <scene name>? Writing-scene: scene.seems redundant.Related issue (if applicable): fixes #27026
Pull request with documentation for home-assistant.io: home-assistant/home-assistant.io#10616
Pull request for frontend: home-assistant/home-assistant-polymer#
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: