Is best to use 'Antwerpen / Anvers'
Thanks !
Itās working.
Now I only have to add 'language: 'ne'
I guess.
Do you, by accident, have an example on how visualize all this data in Lovelace?
What component are you using?!
Sorry, I donāt understand you question.
What component? Is there a specific component that I have to install extra?
What component (or integration) did you install? The built-in meteoalarm
, the ācustom componentā meteoalarmeu
or other similar ācustom componentā? They have different configurations.
I installed it with HACS.
When I click repository Iām forwarded to
āhttps://github.com/xlcnd/meteoalarmeuā
Seems this is you
Funny, I didnāt know I was talking to the creator
So its meteolarmeu
. So all you need is to put in you config:
binary_sensor:
- platform: meteoalarmeu
country: 'BE'
region: 'Antwerpen / Anvers'
No language
and other things that belong to other components.
Thanks
I was hoping to get only the Dutch message.
Seems that in Belgium you get both NL + FR in one message.
Still, thank you for this component !
But you can use something like this
message: >
{{ state_attr('binary_sensor.meteoalarmeu', 'message').split('franƧais')[0] | replace('nederlands: ', '') | trim }}
to get the message in ānederlandsā.
yes templating to the rescue, as posted above Meteoalarm push message don't work using another example.
I just installed your component and i am waiting for a new alert (not hopefully, but just for checking it is workingā¦).
In the meantime did you created a good markdown lovelace card for examples? Or new automations?
Actually i am using the one you posted in your github, but iād like to have more ideas and services to send notification to my mobileā¦ Any examples?
For automations I have this combo that implements a complete live cycle for persistent notifications:
- alias: Alert me about weather warnings
trigger:
- platform: state
entity_id: binary_sensor.meteoalarmeu
attribute: message_id
condition:
- condition: state
entity_id: binary_sensor.meteoalarmeu
state: 'on'
action:
- repeat:
count: "{{ state_attr('binary_sensor.meteoalarmeu', 'alerts') | int }}"
sequence:
- service: persistent_notification.create
data:
title: >
{% set ext = "" if repeat.first else "_" + (repeat.index-1)|string %}
{{ state_attr('binary_sensor.meteoalarmeu', 'awareness_type' + ext) }} ({{ state_attr('binary_sensor.meteoalarmeu', 'awareness_level' + ext) }})
message: >
{% set ext = "" if repeat.first else "_" + (repeat.index-1)|string %}
{{ state_attr('binary_sensor.meteoalarmeu', 'message' + ext) }}
Effective from **{{ state_attr('binary_sensor.meteoalarmeu', 'from' + ext) }}** until **{{ state_attr('binary_sensor.meteoalarmeu', 'until' + ext) }}**
notification_id: >
{% set ext = "" if repeat.first else "_" + (repeat.index-1)|string %}
meteoalarm-{{ state_attr('binary_sensor.meteoalarmeu', 'alert_id' + ext) }}
- alias: Update weather warnings on HA start
trigger:
- platform: homeassistant
event: start
action:
- service: homeassistant.update_entity
entity_id: binary_sensor.meteoalarmeu
- alias: Dismiss obsolete PNs about weather warnings
mode: restart
trigger:
- platform: event
event_type: persistent_notifications_updated
action:
- service: persistent_notification.dismiss
data:
notification_id: >
{%- for item in states.persistent_notification if item |regex_search("until \*\*(.*?)\*\*") -%}
{%- if item | regex_findall_index("until \*\*(.*?)\*\*") | as_timestamp() < as_timestamp(now()) -%}
{{ item.entity_id |replace('persistent_notification.', '') }}{%- if not loop.last %},{% endif -%}
{%- endif -%}
{%- endfor -%}
In relation to mobile notifications, you could merge this in the first one above:
- alias: Alert me about weather warnings
trigger:
- platform: state
entity_id: binary_sensor.meteoalarmeu
attribute: message_id
condition:
- condition: state
entity_id: binary_sensor.meteoalarmeu
state: 'on'
action:
- service: notify.notify
data:
title: >
{{ state_attr('binary_sensor.meteoalarmeu', 'awareness_type') }} ({{ state_attr('binary_sensor.meteoalarmeu', 'awareness_level') }})
message: >
{{ state_attr('binary_sensor.meteoalarmeu', 'message') }}
Effective from {{ state_attr('binary_sensor.meteoalarmeu', 'from') }} until {{ state_attr('binary_sensor.meteoalarmeu', 'until') }}
For lovelace cards, I use an entity card with attribute alerts
inside a vertical card together with a weather card and a satellite picture.
Thanks, may i have the code of your lovelace card?
entity card
and vertical card
are standard onesā¦
Anyway here it goes the yaml:
type: vertical-stack
cards:
- type: weather-forecast
entity: weather.home
- type: entity
entity: binary_sensor.meteoalarmeu
attribute: alerts
unit: alerts
- type: picture
tap_action:
action: none
hold_action:
action: none
image: 'http://api.sat24.com/animated/EU/visual/1/GMT%20Standard%20Time/'
You have to adapt it to your case.
I did it like this. A normal automation, plus
service: notify.telegram_notify
data:
title: '{{states.binary_sensor.meteoalarm.attributes.headline}}'
message: "{{states.binary_sensor.meteoalarm.attributes.description}} From '{{states.binary_sensor.meteoalarm.attributes.onset}}' to '{{states.binary_sensor.meteoalarm.attributes.expires}}'"