Update entities.md for upcoming version

This commit is contained in:
Johannes
2023-05-20 16:55:09 +02:00
committed by GitHub
parent 1e0fe0ee8d
commit 7978692f6c

View File

@@ -74,10 +74,10 @@ 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")}}' 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. If you want to display icons from a template you can put them between `<I></I>`
```yaml ```yaml
icon: 'ha-i:{{ iif(is_state('light.kitchen', 'on'), 'mdi:flashlight', 'mdi:flashlight-off') }}' icon: 'ha:{{ iif(is_state('light.kitchen', 'on'), '<I>mdi:flashlight</I>', '<I>mdi:flashlight-off</I>') }}'
``` ```
## Hide item based on state ## Hide item based on state