I’m using the MeteoAlarm integration. I’ve configured it for my country (NL) and my province (Groningen), and combined it with an automation to message me when it fires:
- id: alert_weather_alarm
trigger:
platform: state
entity_id: binary_sensor.meteoalarm
from: 'off'
action:
- service: notify.telegram
data:
message: "Weather alarm: {{state_attr('binary_sensor.meteoalarm', 'headline')}}. Message: {{state_attr('binary_sensor.meteoalarm', 'description')}} is effective on {{state_attr('binary_sensor.meteoalarm', 'effective')}}"
It works, however, I also get messages that are not meant for my province. The are formatted like this:
Weather alarm: Snow-ice - No warnings for Groningen - The Netherlands. Message: Risk of locally icy patches due to condensation.
BE AWARE of widespread snow and/or ice on roads and pavements.
Localized disruption of outdoor activities.
Take care when walking, cycling or driving due to slippery surfaces. is effective on 2020-11-29T22:43:42+00:00
So I’d like to extend the automation (or use another binary sensor) to only trigger when the headline doesn’t contain ‘No warnings for Groningen’. However, I have no clue as to how.
Any idea?