Aohzan / ipx800

IPX800 V4 integration for Home-Assistant
Apache License 2.0
20 stars 12 forks source link

icon_template: #14

Closed FredericNauleau closed 3 years ago

FredericNauleau commented 3 years ago

Hello,

An idea to integrate icon_template on switch...

For example:

icon_template: "mdi:window-shutter{{ '-open' if is_state('switch.velux_escalier','on') else '' }}"

Aohzan commented 3 years ago

Hello,

Maybe by using a switch template, or the customize for glob entities : switch.velux_* ? https://www.home-assistant.io/docs/configuration/customizing-devices/

If it's a Velux, I suggest you to create a cover template, which target the switch ?

FredericNauleau commented 3 years ago

Hello Aohzan,

Thank you for your answser

It's a Switch. It activate a VirtualOut on the IPX which execute Scenario in order to make some checks : The cover can be manipulated only if Windows is closed (by state return off a KLF-200 Velux Box..).

I am able to customize the icon in LoveLace... But I cannot do templating... And I have to do each time I am using the switch... If I can customize in IPX declaration, it's done only one time.

Aohzan commented 3 years ago

I didn't find a way to do it in the component according to https://community.home-assistant.io/t/icon-template-in-customize-yaml/54360/4, you have to set a template entity