From 6dabb1ff1d065f3ea4f6c23ff4e9f5bf54b537e8 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Mon, 30 Jan 2023 17:48:47 +0100 Subject: [PATCH] Update entities.md --- docs/entities.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/entities.md b/docs/entities.md index d80d0c6a..bb3becb2 100644 --- a/docs/entities.md +++ b/docs/entities.md @@ -73,6 +73,11 @@ There probably not much cases where this is needed, but here is an exmaple to sh icon: 'ha:{{ state_attr("climate.wohnzimmer_boden","current_temperature")}}' ``` +You can use the acual chars for the icon in the above ha: template, however if you want to use the icon names you can use `ha-i` instead. This will be evaluated as HA Template first and then looked up as an icon. + +``` + icon: 'ha-i:{{ iif(is_state('light.kitchen', 'on'), 'mdi:flashlight', 'mdi:flashlight-off') }}' +``` ## Hide item based on state