title: NWS Alerts path: nws-alerts icon: mdi:cloud-alert visible: - user: 24a4bd075e7f41a497dd0390a1dd4a9f cards: - type: entities title: Severe Weather Alerts show_header_toggle: false entities: - sensor.nws_alerts - type: conditional conditions: - entity: sensor.nws_alerts state_not: '0' card: type: markdown content: | --- # NWS First Active Alert {% if state_attr('sensor.nws_alerts', 'title') != None and state_attr('sensor.nws_alerts', 'title').split(' - ')[0] is defined %} ## {{ states.sensor.nws_alerts.attributes.title.split(' - ')[0] }} {{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[0] }} {% else %} none {% endif %} - type: conditional conditions: - entity: sensor.nws_alerts state_not: '0' - entity: sensor.nws_alerts state_not: '1' card: type: markdown content: > --- # NWS Second Active Alert {% if state_attr('sensor.nws_alerts', 'title').split(' - ')[1] is defined %} ## {{ states.sensor.nws_alerts.attributes.title.split(' - ')[1] }} {{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[1] }} {% else %} none {% endif %} - type: conditional conditions: - entity: sensor.nws_alerts state_not: '0' - entity: sensor.nws_alerts state_not: '1' - entity: sensor.nws_alerts state_not: '2' card: type: markdown content: > --- # NWS Third Active Alert {% if state_attr('sensor.nws_alerts', 'title').split(' - ')[2] is defined %} ## {{ states.sensor.nws_alerts.attributes.title.split(' - ')[2] }} {{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[2] }} {% else %} none {% endif %} - type: conditional conditions: - entity: sensor.nws_alerts state_not: '0' - entity: sensor.nws_alerts state_not: '1' - entity: sensor.nws_alerts state_not: '2' - entity: sensor.nws_alerts state_not: '3' card: type: markdown content: > --- # NWS Fourth Active Alert {% if state_attr('sensor.nws_alerts', 'title').split(' - ')[3] is defined %} ## {{ states.sensor.nws_alerts.attributes.title.split(' - ')[3] }} {{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[3] }} {% else %} none {% endif %} - type: conditional conditions: - entity: sensor.nws_alerts state_not: '0' - entity: sensor.nws_alerts state_not: '1' - entity: sensor.nws_alerts state_not: '2' - entity: sensor.nws_alerts state_not: '3' - entity: sensor.nws_alerts state_not: '4' card: type: markdown content: > --- # NWS Fifth Active Alert {% if state_attr('sensor.nws_alerts', 'title').split(' - ')[4] is defined %} ## {{ states.sensor.nws_alerts.attributes.title.split(' - ')[4] }} {{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[4] }} {% else %} none {% endif %}