From 1613d24f0c1f5f9a6d18cec9bca31799de84a4e4 Mon Sep 17 00:00:00 2001 From: Jules Dejaeghere Date: Sat, 20 Jan 2024 11:40:26 +0100 Subject: [PATCH] Map freezing rain and freezing fog to rainy and fog respectively --- README.md | 34 +++++++++++++++--------------- custom_components/irm_kmi/const.py | 8 +++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 113612b..2763975 100644 --- a/README.md +++ b/README.md @@ -52,23 +52,23 @@ weather condition is taken into account in this integration. Mapping was established based on my own interpretation of the icons and conditions. -| HA Condition | HA Description | IRM KMI icon | IRM KMI data (`ww-dayNight`) | -|-----------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------| -| clear-night | Clear night | | `0-n` `1-n` | -| cloudy | Many clouds | | `14-d` `14-n` `15-d` `15-n` | -| exceptional | Exceptional | | `21-d` `21-n` `27-d` `27-n` | -| fog | Fog | | `24-d` `24-n` `25-d` `25-n` `26-d` `26-n` | -| hail | Hail | | | -| lightning | Lightning/ thunderstorms | | | -| lightning-rainy | Lightning/ thunderstorms and rain | | `2-d` `2-n` `5-d` `5-n` `7-d` `7-n` `10-d` `10-n` `13-d` `13-n` `17-d` `17-n` | -| partlycloudy | A few clouds | | `3-d` `3-n` | -| pouring | Pouring rain | | `4-d` `4-n` `6-d` `6-n` `16-d` `16-n` `19-d` `19-n` | -| rainy | Rain | | `18-d` `18-n` | -| snowy | Snow | | `11-d` `11-n` `12-d` `12-n` `22-d` `22-n` `23-d` `23-n` | -| snowy-rainy | Snow and Rain | | `8-d` `8-n` `9-d` `9-n` `20-d` `20-n` | -| sunny | Sunshine | | `0-d` `1-d` | -| windy | Wind | | | -| windy-variant | Wind and clouds | | | +| HA Condition | HA Description | IRM KMI icon | IRM KMI data (`ww-dayNight`) | +|-----------------|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------| +| clear-night | Clear night | | `0-n` `1-n` | +| cloudy | Many clouds | | `14-d` `14-n` `15-d` `15-n` | +| exceptional | Exceptional | | | +| fog | Fog | | `24-d` `24-n` `25-d` `25-n` `26-d` `26-n` `27-d` `27-n` | +| hail | Hail | | | +| lightning | Lightning/ thunderstorms | | | +| lightning-rainy | Lightning/ thunderstorms and rain | | `2-d` `2-n` `5-d` `5-n` `7-d` `7-n` `10-d` `10-n` `13-d` `13-n` `17-d` `17-n` | +| partlycloudy | A few clouds | | `3-d` `3-n` | +| pouring | Pouring rain | | `4-d` `4-n` `6-d` `6-n` `16-d` `16-n` `19-d` `19-n` | +| rainy | Rain | | `18-d` `18-n` `21-d` `21-n` | +| snowy | Snow | | `11-d` `11-n` `12-d` `12-n` `22-d` `22-n` `23-d` `23-n` | +| snowy-rainy | Snow and Rain | | `8-d` `8-n` `9-d` `9-n` `20-d` `20-n` | +| sunny | Sunshine | | `0-d` `1-d` | +| windy | Wind | | | +| windy-variant | Wind and clouds | | | ## Warning details diff --git a/custom_components/irm_kmi/const.py b/custom_components/irm_kmi/const.py index 07ef9f0..e061086 100644 --- a/custom_components/irm_kmi/const.py +++ b/custom_components/irm_kmi/const.py @@ -106,8 +106,8 @@ IRM_KMI_TO_HA_CONDITION_MAP: Final = { (19, 'n'): ATTR_CONDITION_POURING, (20, 'd'): ATTR_CONDITION_SNOWY_RAINY, (20, 'n'): ATTR_CONDITION_SNOWY_RAINY, - (21, 'd'): ATTR_CONDITION_EXCEPTIONAL, - (21, 'n'): ATTR_CONDITION_EXCEPTIONAL, + (21, 'd'): ATTR_CONDITION_RAINY, + (21, 'n'): ATTR_CONDITION_RAINY, (22, 'd'): ATTR_CONDITION_SNOWY, (22, 'n'): ATTR_CONDITION_SNOWY, (23, 'd'): ATTR_CONDITION_SNOWY, @@ -118,8 +118,8 @@ IRM_KMI_TO_HA_CONDITION_MAP: Final = { (25, 'n'): ATTR_CONDITION_FOG, (26, 'd'): ATTR_CONDITION_FOG, (26, 'n'): ATTR_CONDITION_FOG, - (27, 'd'): ATTR_CONDITION_EXCEPTIONAL, - (27, 'n'): ATTR_CONDITION_EXCEPTIONAL + (27, 'd'): ATTR_CONDITION_FOG, + (27, 'n'): ATTR_CONDITION_FOG } MAP_WARNING_ID_TO_SLUG: Final = {