From d580c210557de018e1988bc29beea65633d33b69 Mon Sep 17 00:00:00 2001 From: schizza Date: Fri, 19 Apr 2024 15:46:13 +0200 Subject: [PATCH] Just cleanup. Cleanup to satisfy HASSfest. --- custom_components/sws12500/const.py | 34 ++++++++-------- custom_components/sws12500/strings.json | 32 +++++++-------- .../sws12500/translations/cs.json | 40 +++++++++---------- .../sws12500/translations/en.json | 32 +++++++-------- 4 files changed, 70 insertions(+), 68 deletions(-) diff --git a/custom_components/sws12500/const.py b/custom_components/sws12500/const.py index c8a6439..793d178 100644 --- a/custom_components/sws12500/const.py +++ b/custom_components/sws12500/const.py @@ -91,25 +91,27 @@ REMAP_ITEMS: dict = { DISABLED_BY_DEFAULT: Final = [CH2_TEMP, CH2_HUMIDITY] + class UnitOfDir(StrEnum): """Wind direrction azimut.""" - NNE = "NNE" - NE = "NE" - ENE = "ENE" - E = "E" - ESE = "ESE" - SE = "SE" - SSE = "SSE" - S = "S" - SSW = "SSW" - SW = "SW" - WSW = "WSW" - W = "W" - WNW = "WNW" - NW = "NW" - NNW = "NNW" - N = "N" + NNE = "nne" + NE = "ne" + ENE = "ene" + E = "e" + ESE = "ese" + SE = "se" + SSE = "sse" + S = "s" + SSW = "ssw" + SW = "sw" + WSW = "wsw" + W = "w" + WNW = "wnw" + NW = "nw" + NNW = "nnw" + N = "n" + AZIMUT: list[UnitOfDir] = [ UnitOfDir.NNE, diff --git a/custom_components/sws12500/strings.json b/custom_components/sws12500/strings.json index 07adcf3..2ea26ab 100644 --- a/custom_components/sws12500/strings.json +++ b/custom_components/sws12500/strings.json @@ -80,22 +80,22 @@ "wind_azimut": { "name": "Bearing", "state": { - "N": "N", - "NNE": "NNE", - "NE": "NE", - "ENE": "ENE", - "E": "E", - "ESE": "ESE", - "SE": "SE", - "SSE": "SSE", - "S": "S", - "SSW": "SSW", - "SW": "SW", - "WSW": "WSW", - "W": "W", - "WNW": "WNW", - "NW": "NW", - "NNW": "NNW" + "n": "N", + "nne": "NNE", + "ne": "NE", + "ene": "ENE", + "e": "E", + "ese": "ESE", + "se": "SE", + "sse": "SSE", + "s": "S", + "ssw": "SSW", + "sw": "SW", + "wsw": "WSW", + "w": "W", + "wnw": "WNW", + "nw": "NW", + "nnw": "NNW" } } } diff --git a/custom_components/sws12500/translations/cs.json b/custom_components/sws12500/translations/cs.json index 7bf1298..be3c142 100644 --- a/custom_components/sws12500/translations/cs.json +++ b/custom_components/sws12500/translations/cs.json @@ -77,26 +77,26 @@ "ch2_temp": { "name": "Teplota senzoru 2" }, "ch2_humidity": { "name": "Vlhkost sensoru 2" }, "wind_azimut": { - "name": "Azimut", - "state": { - "N": "S", - "NNE": "SSV", - "NE": "SV", - "ENE": "VVS", - "E": "V", - "ESE": "VVJ", - "SE": "JV", - "SSE": "JJV", - "S": "J", - "SSW": "JJZ", - "SW": "JZ", - "WSW": "JZZ", - "W": "Z", - "WNW": "ZZS", - "NW": "SZ", - "NNW": "SSZ" - } - } + "name": "Azimut", + "state": { + "n": "S", + "nne": "SSV", + "ne": "SV", + "ene": "VVS", + "e": "V", + "ese": "VVJ", + "se": "JV", + "sse": "JJV", + "s": "J", + "ssw": "JJZ", + "sw": "JZ", + "wsw": "JZZ", + "w": "Z", + "wnw": "ZZS", + "nw": "SZ", + "nnw": "SSZ" + } + } } }, "notify": { diff --git a/custom_components/sws12500/translations/en.json b/custom_components/sws12500/translations/en.json index 07adcf3..2ea26ab 100644 --- a/custom_components/sws12500/translations/en.json +++ b/custom_components/sws12500/translations/en.json @@ -80,22 +80,22 @@ "wind_azimut": { "name": "Bearing", "state": { - "N": "N", - "NNE": "NNE", - "NE": "NE", - "ENE": "ENE", - "E": "E", - "ESE": "ESE", - "SE": "SE", - "SSE": "SSE", - "S": "S", - "SSW": "SSW", - "SW": "SW", - "WSW": "WSW", - "W": "W", - "WNW": "WNW", - "NW": "NW", - "NNW": "NNW" + "n": "N", + "nne": "NNE", + "ne": "NE", + "ene": "ENE", + "e": "E", + "ese": "ESE", + "se": "SE", + "sse": "SSE", + "s": "S", + "ssw": "SSW", + "sw": "SW", + "wsw": "WSW", + "w": "W", + "wnw": "WNW", + "nw": "NW", + "nnw": "NNW" } } }