diff --git a/custom_components/davis_vantage/icons.json b/custom_components/davis_vantage/icons.json index ca57b2d..42d1dac 100644 --- a/custom_components/davis_vantage/icons.json +++ b/custom_components/davis_vantage/icons.json @@ -20,14 +20,14 @@ "wind_direction_rose": { "default": "mdi:compass-outline", "state": { - "N": "mdi:arrow-down-bold-outline", - "NE": "mdi:arrow-bottom-left-bold-outline", - "E": "mdi:arrow-left-bold-outline", - "SE": "mdi:arrow-top-left-bold-outline", - "S": "mdi:arrow-up-bold-outline", - "SW": "mdi:arrow-top-right-bold-outline", - "W": "mdi:arrow-right-bold-outline", - "NW": "mdi:arrow-bottom-right-bold-outline" + "n": "mdi:arrow-down-bold-outline", + "ne": "mdi:arrow-bottom-left-bold-outline", + "e": "mdi:arrow-left-bold-outline", + "se": "mdi:arrow-top-left-bold-outline", + "s": "mdi:arrow-up-bold-outline", + "sw": "mdi:arrow-top-right-bold-outline", + "w": "mdi:arrow-right-bold-outline", + "nw": "mdi:arrow-bottom-right-bold-outline" } } } diff --git a/custom_components/davis_vantage/translations/en.json b/custom_components/davis_vantage/translations/en.json index 7a112d0..8c1b102 100755 --- a/custom_components/davis_vantage/translations/en.json +++ b/custom_components/davis_vantage/translations/en.json @@ -47,22 +47,14 @@ }, "wind_direction_rose": { "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", + "ne": "NE", + "e": "E", + "se": "SE", + "s": "S", + "sw": "SW", + "w": "W", + "nw": "NW" } } } diff --git a/custom_components/davis_vantage/translations/nl.json b/custom_components/davis_vantage/translations/nl.json index 1f47c9c..3a8ecb6 100755 --- a/custom_components/davis_vantage/translations/nl.json +++ b/custom_components/davis_vantage/translations/nl.json @@ -47,22 +47,14 @@ }, "wind_direction_rose": { "state": { - "N": "N", - "NNE": "NNO", - "NE": "NO", - "ENE": "ONO", - "E": "O", - "ESE": "OZO", - "SE": "ZO", - "SSE": "ZZO", - "S": "Z", - "SSW": "ZZW", - "SW": "ZW", - "WSW": "WZW", - "W": "W", - "WNW": "WNW", - "NW": "NW", - "NNW": "NNW" + "n": "N", + "ne": "NO", + "e": "O", + "se": "ZO", + "s": "Z", + "sw": "ZW", + "w": "W", + "nw": "NW" } } } diff --git a/custom_components/davis_vantage/utils.py b/custom_components/davis_vantage/utils.py index 65383d5..7e072b4 100755 --- a/custom_components/davis_vantage/utils.py +++ b/custom_components/davis_vantage/utils.py @@ -489,7 +489,7 @@ def convert_to_iso_datetime(value: datetime, tzinfo: ZoneInfo) -> datetime: return value.replace(tzinfo=tzinfo) def get_wind_rose(bearing: int) -> str: - directions = [ 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW' ] + directions = [ 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw' ] index = round(bearing / 45) % 8 return directions[index]