Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95468

Daily briefing alert

$
0
0

@carltonb wrote:

I send to myself a daily briefing of today’s weather, sunrise/sunset, etc.
I am stuck on a particular part of the code on area weather alerts.
I have written the following code.

{% if is_state('sensor.east_valley_alert_event', '') %} No East Valley weather alerts today {% else %}There is an East Valley weather alert of a {{states('sensor.east_valley_alert_event')}}{% endif %}

The text result in the template tool is as follows

There is an East Valley weather alert of a None

It is displaying the information correctly.

What I am trying to achieve is If there is no alert to say

There is no East Valley weather alert.

And if there is a weather alert to say

There is an East Valley weather alert of <list the alert>

Can anyone point me in a direction that might help.
Thanks
carltonb

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>