Skip to content

Update icon_template docs for switch template#2735

Merged
fabaff merged 3 commits into
home-assistant:nextfrom
PhracturedBlue:next
Jun 5, 2017
Merged

Update icon_template docs for switch template#2735
fabaff merged 3 commits into
home-assistant:nextfrom
PhracturedBlue:next

Conversation

@PhracturedBlue
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Updated. Thanks.

@fabaff
Copy link
Copy Markdown
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