v2.0.0
Hey everyone! I'm proud to announce the release of the new major MeteoalarmCard version 2.0! This update brings a lot of exciting features, improvements and fixes. But first, I want to say Thank You! to every single one of you! Without contributors, translators and users this project wouldn't grow so much. A couple of months ago MeteoalarmCard turned one year old and in this period accumulated over 13k downloads of 25 releases and, was translated to 11 languages. Your existing card configuration won't work with this update, and thus this is a major release.
Table of contents
⚠️ BREAKING:integration: automatic
has been removed⚠️ BREAKING:entity
was renamed toentities
- Multiple entity support & new integrations
- New integrations
- New Visual Editor
- Alerts swiper
- New element: caption
- Other changes
- New translations
⚠️ BREAKING: integration: automatic
has been removed.
Starting from this update automatic
is not a valid integration type. Please switch to using the name of the currently used integration.
meteoalarm
meteofrance
dwd
weatheralerts
Why this decision was taken
Since version v1.0.0 the vision of the project changed a bit. I've made this card mostly because there wasn't any viable option for cleanly displaying alerts. This card was, back then, focused on only one thing - MeteoAlarm integration. But this started to change as the project gained popularity.
v1.5.0 - Added first multi-integration support for xlcnd/meteoalarmeu. It was very seamless and worked without even the user knowing it.
v1.6.0 - It was a huge update code-wide @Nsbx wrote the first code for the support of the multi-integration system. Back then I suggested the ability to set integration: automatic
since integrations were easy to detect and this didn't cause any problems.
And from update to update this feature became more and more annoying. For example, the Visual card editor doesn't really know what integration will be selected by the card, it only knows that it is automatic
. That really blocks any ability to make anything in the editor to be dependent on the integration. For example, the Override headline was displayed when automatic
was selected even if the selected entity doesn't provide a headline and thus, this option was useless. You may say, this wasn't that bad, and yes, it wasn't. The real problem begins if you look at the new editor when virtually the whole experience is now based on which integration you will select. That's the reason this integration is gone.
⚠️ BREAKING: entity
was renamed to entities
Starting from this update entity
config value has been removed and replaced with entities
. Future use of entity
will result in an error. Please switch to using entities
.
Pre 2.0.0 configuration
type: 'custom:meteoalarm-card'
integration: 'meteoalarm'
entity: 'binary_sensor.meteoalarm'
Post 2.0.0 configuration
type: 'custom:meteoalarm-card'
integration: 'meteoalarm'
entities: 'binary_sensor.meteoalarm'
More on why this decision was taken below.
Multiple entity support & new integrations
This may not look like it but this is the biggest change in this update. Instead of providing only one entity, you can now provide multiple! There are a couple of ways to do it.
One entity ID:
entities: binary_sensor.sensor_1
List of entity IDs:
entities:
- binary_sensor.sensor_1
- binary_sensor.sensor_2
List of entity objects:
entities:
- entity: binary_sensor.sensor_1
- entity: binary_sensor.sensor_2
This project was waiting for this ability for a long time. It finally gives the possibility to implement new muli-entity integrations.
New integrations
- NINA - displays warnings from the Bundesamt für Bevölkerungsschutz und Katastrophenhilfe in Germany.
- Environment Canada - provides warnings for Canadian locations from Environment and Climate Change Canada.
- Burze.dzis.net - Custom sensor for unofficial Poland alerts.
New Visual Editor
Home Assistant 2022.3 made a bit of revolution in the way of handling visual editor by the cards. It broke MeteoalarmCard visual editor (#81) and other cards while bringing the new Material Web Components (MWC). Starting from 2.0 MeteoalarmCard ships with the new and improved graphical card editor. It now supports multiple entities and uses MWC.
Alerts swiper
Before this update, only the first alert was displayed on the card. This caused any other alerts to be hidden from the user. Now, when the card detects more than one alert it enables the swiper and populates each slide with one alert. When the swiper is activated, it shows pagination (white and grey dots) in the lower part of the card. This behaviour can be disabled with disable_swiper
.
New element: caption
Caption is a new card element displayed in the top right of the card. This element is currently only used to inform users using DWD if they are looking at future alerts (coming from the advance_warning_level
sensor). This element may find more use in future updates.
General project cleanup
For the past year, the code became a bit messy so I took the time to rethink and rewrite the whole codebase.
- The whole project has been rewritten to Typescript.
- Project structure now matches https://github.com/custom-cards/boilerplate-card.
- Editor now uses the new elements importing method
ScopedRegistryHost
for HA 2022.03.
Other changes
Other changes in this update not listed above:
- Fix weatheralerts event types @MrBartusek (#83)
- Fix broken visual editor in HA 2022.03 and above @MrBartusek (#81)
- Update Spanish translation @ajtudela (#85/#90)
- Add Czech Translation @martin131 (#86/#89)
- Card is now a couple of pixels higher to accommodate the swiper @MrBartusek
- Update wind event icon @MrBartusek (eae00ee)
- Fix Swedish translation @MrBartusek (e022f06)
- General
CONTRIBUTING.md
andREADME.md
readablity updates @MrBartusek - Update Costal Event icon @MrBartusek (bdecb30)
- Fix
hide_when_no_warning
@MrBartusek in #92 - Clean up README @MrBartusek in eef5856
New translations
This release adds a bunch of new translation keys and you will see a lot of missing strings in this version. The current translation progress is as follows:
+ English - 100% translated
+ Spanish - 100% translated
+ Polish- 100% translated
- Czech - 90% translated
- French - 57% translated
- German - 55% translated
- Estonian - 55% translated
- Croatian - 55% translated
- Slovak - 55% translated
- Swedish - 50% translated
- Dutch - 40% translated
- Italian- 29% translated
You can help to add missing keys in existing languages or add a new language - see CONTRIBUTING.md!