#Displaying Alert on Dashboard

1 messages · Page 1 of 1 (latest)

solemn hamlet
timid wolf
#

You could create boolean helpers and turn those on and off by an automation. And then you can use the markdown card with ha-alert and some templating.
Details depend on the specific usecase.

solemn hamlet
#

Yeah but that would not work togerther well when wanting to display rt information/states of entities right?

timid wolf
#

shksShrug We don't know, what you actually are trying to do.

solemn hamlet
#

Once of the use cases I would like is that when the temperature reaches X in a room there is a alert saying, 'In Roon Y it is X degrees, you should open a window'.

timid wolf
#

That can be done in the Markdown card with templating.

solemn hamlet
#

Okay and then I have to use like booleans to activate or deactive?

timid wolf
#

No. You can just use the temperature value as an if condition.

solemn hamlet
#

Something like this?:

#

{% set temp = states('sensor.temp_lucaskamer_temperature') | float %}
{% if temp > 28 %}
<ha-alert alert-type="warning">
🔥 It is too hot! Current temperature: <b>{{ temp }}°C</b>
</ha-alert>
{% endif %}

timid wolf
#

Yes.

solemn hamlet
#

Okay then that's it, Thanks a lot ❤️

timid wolf
#

If you don't want to show the Markdown card, if there is nothing to show, you can set according conditions in the visibility settings for example.

solemn hamlet
#

One last thing, the hassio docs sya that when adding dismissable after altert type it becomes.. dismissable 😂 . But when I try it there is no X appearing