mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Remove "Changing the icon" (#3305)
Text was copy and pasted verbatim from Template Sensor page, the Template Binary Sensor does not currently support the icon_template feature.
This commit is contained in:
parent
3c6ff37c03
commit
6ae0daf2d5
@ -96,19 +96,6 @@ binary_sensor:
|
|||||||
- sensor.kitchen_co_status
|
- sensor.kitchen_co_status
|
||||||
- sensor.wardrobe_co_status
|
- sensor.wardrobe_co_status
|
||||||
```
|
```
|
||||||
### {% linkable_title Change the icon %}
|
|
||||||
|
|
||||||
This example shows how to change the icon based on the day/night cycle.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
day_night:
|
|
||||||
friendly_name: 'Day/Night'
|
|
||||||
value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %}
|
|
||||||
icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %}
|
|
||||||
```
|
|
||||||
|
|
||||||
### {% linkable_title Is anyone home? %}
|
### {% linkable_title Is anyone home? %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user