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

Implement jinja templates #60

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Implement jinja templates #60

merged 3 commits into from
Feb 21, 2024

Conversation

elchininet
Copy link
Owner

This pull request allows one to use also Jinja templates. The next blocks will render the same:

JavaScript template (the template is rendered locally)

[[[ "My Home " + new Date(states("sensor.date_time_iso")).toLocaleTimeString().slice(0, 5) ]]]

Jinja template (the template is rendered in the back-end)

My Home {{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%H:%M') }}

@elchininet elchininet added the enhancement New feature or request label Feb 21, 2024
@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling 6cf1b5c on implement_jinja_templates
into d46bb1c on master.

@elchininet elchininet merged commit 1712171 into master Feb 21, 2024
4 checks passed
@elchininet elchininet deleted the implement_jinja_templates branch February 21, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants