-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Button to copy service response as json for templates #21226
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
… copy-service-template
@@ -107,6 +107,7 @@ export class HaYamlEditor extends LitElement { | |||
"ui.components.yaml-editor.copy_to_clipboard" | |||
)} | |||
</mwc-button> | |||
<slot name="extra-actions"></slot> |
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 one should be outside of the copyClipboard
ternary, it is not possible to add extra actions now without adding the copy clipboard action.
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.
Changed, is another property the best way to solve? I don't want to create the card-actions div if there aren't any actions.
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.
Yeah looks good! 👍
Proposed change
Button to format
serviceaction response as json, for use with the template editor. Discussed a bit before at #18866.Copies:
and can be directly pasted in the template editor.
Type of change
Example configuration
Additional information
This PR fixes or closes issue: fixes #
This PR is related to issue or discussion:
https://community.home-assistant.io/t/developer-tools-use-variables-generated-in-service-to-be-used-in-template/652213
https://community.home-assistant.io/t/calendar-get-events-response-variable-in-developer-tools-template/731643
https://community.home-assistant.io/t/response-variable/589035/7
Link to documentation pull request:
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Localization