Skip to content

Commit

Permalink
Integrations rework & MeteoFrance integration (MrBartusek#18)
Browse files Browse the repository at this point in the history
Co-authored-by: MrBartusek <[email protected]>
  • Loading branch information
2 people authored and BartEngelen committed Jan 21, 2022
1 parent a4a3619 commit 0b947f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Meteoalarm Card

[![version](https://img.shields.io/npm/v/meteoalarm-card?label=version)](https://www.npmjs.com/package/meteoalarm-card) [![hacs badge](https://img.shields.io/badge/HACS-default-orange.svg)](https://hacs.xyz) [![build status](https://img.shields.io/github/workflow/status/MrBartusek/MeteoalarmCard/Lint)](https://github.com/MrBartusek/MeteoalarmCard/actions) [![downloads](https://img.shields.io/github/downloads/MrBartusek/MeteoalarmCard/total?color=brightgreen)](https://github.com/MrBartusek/MeteoalarmCard/releases)
[![version](https://img.shields.io/npm/v/meteoalarm-card?label=version)](https://www.npmjs.com/package/meteoalarm-card) [![hacs_badge](https://img.shields.io/badge/HACS-default-41BDF5.svg)](https://github.com/hacs/integration) [![build status](https://img.shields.io/github/workflow/status/MrBartusek/MeteoalarmCard/Lint)](https://github.com/MrBartusek/MeteoalarmCard/actions) [![LGTM alerts](https://img.shields.io/lgtm/alerts/g/MrBartusek/MeteoalarmCard.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MrBartusek/MeteoalarmCard/alerts/) [![downloads](https://img.shields.io/github/downloads/MrBartusek/MeteoalarmCard/total?color=brightgreen)](https://github.com/MrBartusek/MeteoalarmCard/releases)

By default [Home Assistant](https://www.home-assistant.io/) does not provide any card for [Meteoalarm](https://www.home-assistant.io/integrations/meteoalarm/) or [Météo-France](https://www.home-assistant.io/integrations/meteo_france/). This simple card shows you the current active meteorological warnings.
By default [Home Assistant](https://www.home-assistant.io/) does not provide any card for [Meteoalarm](https://www.home-assistant.io/integrations/meteoalarm/), [DWD](https://www.home-assistant.io/integrations/dwd_weather_warnings/) or [Météo-France](https://www.home-assistant.io/integrations/meteo_france/). This simple card shows you the current active meteorological warnings.

![cover](https://i.imgur.com/jsLOGIv.png)

Expand Down Expand Up @@ -44,8 +44,9 @@ Here is what configuration options mean:
| ------------------- | --------- | ------------ | -------------------------------------------------------------------------------- |
| `type` | `string` | **Required** | `custom:meteoalarm-card` |
| `entity` | `string` | **Required** | An entity_id with weather alerts |
| `integration` | `string` | **Required** | Name of the integration. `automatic`, `meteoalarm`, `meteofrance` or `meteoalarmeu`. It's recommended to keep this option at automatic |
| `override_headline` | `boolean` | `false` | Core Meteoalarm provides `event` and `headline` attributes which are used for text displayed on the card. This option forces card to always generate own headline.
| `integration` | `string` | `automatic` | Name of the integration. Available options: <ul><li>`automatic`</li><li>`meteoalarm`</li><li>`meteofrance`</li><li>`dwd`</li><li>`weatheralerts`</li></ul> |
| `override_headline` | `boolean` | `false` | Override headline proved by integration (if present) by generated one |
| `hide_when_no_warning` | `boolean` | `false` | Hide the card when no warning is active. This works like a [conditional card](https://www.home-assistant.io/lovelace/conditional/). |

Example configuration for [Meteoalarm](https://www.home-assistant.io/integrations/meteoalarm/):

Expand All @@ -60,29 +61,32 @@ override_headline: false

This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:

<!-- Languages are sorted alphabetically -->
- English (Default language)
<!-- Languages except English are sorted alphabetically -->
- English
- Deutsch (German)
- Eesti (Estonian)
- Español (Spanish)
- Français (French)
- Hrvatski (Croatian)
- Italiano (Italian)
- Nederlands (Dutch)
- Polski (Polish)
- Español (Spanish)
- Svenska (Swedish)
- [_Your language?_](./CONTRIBUTING.md#how-to-add-translation)

## Supported integrations

This card supports many other integrations.

- [Meteoalarm](https://www.home-assistant.io/integrations/meteoalarm/) - Home Assistant core integration based on ATOM Feed.
- [Météo-France](https://www.home-assistant.io/integrations/meteo_france/) - Home Assistant core integration for Météo France alerts.
- [xlcnd/meteoalarmeu](https://github.com/xlcnd/meteoalarmeu) - RRS Feed alternative for countries that does not use ATOM anymore.
- [Meteoalarm](https://www.home-assistant.io/integrations/meteoalarm/) - Core integration for Europe alerts.
- [Météo-France](https://www.home-assistant.io/integrations/meteo_france/) - Core integration for Météo France alerts.
- [Deutscher Wetterdienst (DWD)](https://www.home-assistant.io/integrations/dwd_weather_warnings/) - Core integration for DWD Germany alerts.
- [weatheralerts](https://github.com/custom-components/weatheralerts) Custom integration for weather.gov USA alerts.
- [_New integration?_](https://github.com/MrBartusek/MeteoalarmCard/issues/new/choose)


## Contributing

Want to contribute to the project?

First of all, thanks! Check [contributing guideline](./CONTRIBUTING.md) for more information.
First of all, thanks! Check [contributing guidelines](./CONTRIBUTING.md) for more information.
35 changes: 26 additions & 9 deletions src/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{
"$schema": "./schema.json",
"$schema": "./schema/schema.json",
"common": {
"name": "Meteoalarm Card",
"description": "Meteoalarm card warns you about current weather events.",
"not_available": "Meteoalarm is not available"
"unavailable": {
"long": "Integration is unavailable",
"short": "Unavailable"
}
},
"error": {
"missing_entity": "Specifying entity is required!",
"missing_integration": "Specifying integration is required!",
"invalid_integration": "This integration is not valid!"
"invalid_integration": "This integration is not valid!",
"automatic_failed": "Failed to automatically detect integration!",
"entity_invalid": "This entity {entity} cannot be parsed by selected integration {integration}!"
},
"editor": {
"entity": "Entity",
"integration": "Integration",
"required": "Required",
"automatic": "Automatic",
"recommended": "Recommended",
"override_headline": "Override headline"
"override_headline": "Override headline",
"hide_when_no_warning": "Hide when there are no warnings"
},
"events": {
"no_warnings": "No warnings",
Expand All @@ -34,8 +39,20 @@
"rain_flood": "rain flood"
},
"messages": {
"yellow": "Yellow {0} warning",
"orange": "Orange {0} warning",
"red": "Red {0} warning"
"yellow": {
"event": "Yellow {event} warning",
"generic": "Yellow warning",
"color": "Yellow"
},
"orange": {
"event": "Orange {event} warning",
"generic": "Orange warning",
"color": "Orange"
},
"red": {
"event": "Red {event} warning",
"generic": "Red warning",
"color": "Red"
}
}
}
}

0 comments on commit 0b947f5

Please sign in to comment.