Skip to content

Update icon_template docs for switch template #2735

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

Merged
merged 3 commits into from
Jun 5, 2017
Merged

Update icon_template docs for switch template #2735

merged 3 commits into from
Jun 5, 2017

Conversation

PhracturedBlue
Copy link
Contributor

Description:
Update the documentation for new icon_template capability in switch template

Pull request in home-assistant (if applicable): home-assistant/core#7862


switches:
garage:
value_template: "{{ is_state(cover.garage_door', 'on') }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid render of the template, use {% raw %}{{your_template}}{% endraw %}.

turn_off:
service: cover.close_cover
entity_id: cover.garage_door
icon_template: "{% if is_state('cover.garage_door', 'open') %}mdi:garage-open{% else %}mdi:garage{% endif %}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dito

@PhracturedBlue
Copy link
Contributor Author

Updated. Thanks.

@fabaff
Copy link
Member

fabaff commented Jun 5, 2017

Thanks 🐦

@fabaff fabaff merged commit 06415a6 into home-assistant:next Jun 5, 2017
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.

2 participants