Skip to content
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

feat: Add support for Jinja templates #218

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

philippwaller
Copy link
Contributor

@philippwaller philippwaller commented Dec 17, 2023

This pull request introduces the capability to use Jinja templates in service data JSON. To achieve this, a significant change was made in how the plugin performs service calls. Specifically, the standard CallServiceCommand function has been replaced with ExecuteScriptCommand. This new command enables the execution of script actions, such as service calls, with the key advantage that templates are evaluated before execution.

Key Advantages:

  • Dynamic Customization: Users can dynamically tailor service data based on the context or state of their HomeAssistant environment, allowing for more intelligent and adaptable actions and automations.
  • Enhanced Logic Capabilities: The integration of Jinja templates into service data allows for complex logic, opening up possibilities for advanced scenarios.

Should you require any additional details, please do not hesitate to let me know. I look forward to your feedback.

@cgiesche cgiesche self-requested a review December 17, 2023 17:53
@cgiesche cgiesche self-assigned this Dec 17, 2023
@cgiesche
Copy link
Owner

Great solution! Thank you very much.

@cgiesche cgiesche merged commit 8293b7a into cgiesche:master Dec 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants