Hey there,
I’m completly new to the automation stuff and home assistant.
I’m Using an standart Gauge to Display the CPU-Load, Temperatur and some other stuff from my computer. But when the Computer is turned off it just displays “Entity not available”
Instead of that i want the Card to display the Value 0.
Okay, I think I need to create an Template for that. I know it has to look something like that:
template:
- sensor:
- name: "CPULoad"
unit_of_measurement: "%"
state: >
{% if states('sensor.CPULoad') == "unavailable" %}
{{states('"0"')}}
{% else %}
{{states('sensor.CPULoad')}}
{% endif %}
Maybe someone can help or recommend an good tutorial for creating templates.
I think i don’t get the syntax right.
Thanks
Daniel