Repository: XKNX/xknx
Pull request #610 (2021-02-19 16:59:23)

Feature/weather wind bearing
<!--
  You are awesome! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template!.
-->
## Description
<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->

Adds wind bearing attribute to the weather device. Accepts a value in degrees(DPT 5.003) and HA converts it into a heading of 1 to 3 letters (N, NW, NNE etc.).
Some KNX weather stations expose wind direction information. This PR enables showing wind direction in HA.

Fixes # (issue)

## Type of change
<!--
Please tick the applicable options.
NOTE: Ticking multiple options most likely indicates
that your change is to big and it is suggested to split it into several smaller PRs.
-->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Checklist:

- [x] I have performed a self-review of my own code
- [x] The documentation has been adjusted accordingly
- [x] The changes generate no new warnings
- [x] Tests have been added that prove the fix is effective or that the feature works
- [x] The changes are documented in the changelog
- [x] The Homeassistant plugin has been adjusted in case of new config options


coveralls: 
[![Coverage Status](https://coveralls.io/builds/37280207/badge)](https://coveralls.io/builds/37280207)

Coverage increased (+0.005%) to 94.932% when pulling **49ef59a04de26fb2498f955dcde929344eabad8e on eXtenZy:feature/weather_wind_bearing** into **bc8a9f7caa53e4c61f69a22d26cd27b62a6ef1b4 on XKNX:master**.


Patch:
diff --git a/changelog.md b/changelog.md
index eefef6fa..6a4964f6 100644
--- a/changelog.md
+++ b/changelog.md
@@ -16,6 +16,7 @@
 - BinarySensor: return `None` for `BinarySensor.counter` when context timeout is not used (and don't calculate it)
 - Climate: Add `create_temperature_sensors` option to create dedicated sensors for current and target temperature.
 - Weather (breaking change!): Renamed `expose_sensors` to `create_sensors` to prevent confusion with the XKNX `expose_sensor` device type.
+- Weather: Added wind bearing attribute that accepts a value in degrees (0-360) for determining wind direction.
 
 ### Internals
 
diff --git a/docs/config-converter/lib/converter.js b/docs/config-converter/lib/converter.js
index 69326136..c74fe8e9 100644
--- a/docs/config-converter/lib/converter.js
+++ b/docs/config-converter/lib/converter.js
@@ -655,6 +655,9 @@ function parseWeather(name, device, invalid, groupname) {
       case "group_address_wind_speed":
         entity.address_wind_speed = device[conf]
         break;
+      case "group_address_wind_bearing":
+        entity.address_wind_bearing = device[conf]
+        break;
       case "group_address_rain_alarm":
         entity.address_rain_alarm = device[conf]
         break;
diff --git a/docs/weather.md b/docs/weather.md
index c28fd837..f396288c 100644
--- a/docs/weather.md
+++ b/docs/weather.md
@@ -24,6 +24,7 @@ The weather device is basically a set of sensors that you can obtain from your w
             group_address_brightness_east='7/0/4',
             group_address_brightness_west='7/0/3',
             group_address_wind_speed='7/0/2',
+            group_address_wind_bearing='7/0/6',
             group_address_day_night='7/0/7',
             group_address_rain_alarm='7/0/0'
         )
@@ -65,6 +66,7 @@ groups:
 - **group_address_brightness_west** KNX address for the brightness to west **DPT 9.004**.
 - **group_address_brightness_east** KNX address for the brightness to east **DPT 9.004**.
 - **group_address_wind_speed** KNX address for current wind speed. **DPT 9.005**
+- **group_address_wind_bearing** KNX address for current wind bearing. **DPT 5.003**
 - **group_address_rain_alarm** KNX address for reading if rain alarm is on/off.
 - **group_address_wind_alarm** KNX address for reading if wind alarm is on/off.
 - **group_address_frost_alarm** KNX address for reading if frost alarm is on/off.
diff --git a/examples/example_weather.py b/examples/example_weather.py
index 832dbbb0..fc3d84fc 100644
--- a/examples/example_weather.py
+++ b/examples/example_weather.py
@@ -21,6 +21,7 @@ async def main():
         group_address_brightness_east="7/0/4",
         group_address_brightness_west="7/0/3",
         group_address_wind_speed="7/0/2",
+        group_address_wind_bearing="7/0/6",
         group_address_day_night="7/0/7",
         group_address_rain_alarm="7/0/0",
     )
diff --git a/home-assistant-plugin/custom_components/xknx/factory.py b/home-assistant-plugin/custom_components/xknx/factory.py
index 3f3080e9..9f32e0ad 100644
--- a/home-assistant-plugin/custom_components/xknx/factory.py
+++ b/home-assistant-plugin/custom_components/xknx/factory.py
@@ -345,6 +345,9 @@ def _create_weather(knx_module: XKNX, config: ConfigType) -> XknxWeather:
             WeatherSchema.CONF_XKNX_BRIGHTNESS_NORTH_ADDRESS
         ),
         group_address_wind_speed=config.get(WeatherSchema.CONF_XKNX_WIND_SPEED_ADDRESS),
+        group_address_wind_bearing=config.get(
+            WeatherSchema.CONF_XKNX_WIND_BEARING_ADDRESS
+        ),
         group_address_rain_alarm=config.get(WeatherSchema.CONF_XKNX_RAIN_ALARM_ADDRESS),
         group_address_frost_alarm=config.get(
             WeatherSchema.CONF_XKNX_FROST_ALARM_ADDRESS
diff --git a/home-assistant-plugin/custom_components/xknx/schema.py b/home-assistant-plugin/custom_components/xknx/schema.py
index bca4445c..e4a86dcc 100644
--- a/home-assistant-plugin/custom_components/xknx/schema.py
+++ b/home-assistant-plugin/custom_components/xknx/schema.py
@@ -401,6 +401,7 @@ class WeatherSchema:
     CONF_XKNX_BRIGHTNESS_WEST_ADDRESS = "address_brightness_west"
     CONF_XKNX_BRIGHTNESS_NORTH_ADDRESS = "address_brightness_north"
     CONF_XKNX_WIND_SPEED_ADDRESS = "address_wind_speed"
+    CONF_XKNX_WIND_BEARING_ADDRESS = "address_wind_bearing"
     CONF_XKNX_RAIN_ALARM_ADDRESS = "address_rain_alarm"
     CONF_XKNX_FROST_ALARM_ADDRESS = "address_frost_alarm"
     CONF_XKNX_WIND_ALARM_ADDRESS = "address_wind_alarm"
@@ -426,6 +427,7 @@ class WeatherSchema:
             vol.Optional(CONF_XKNX_BRIGHTNESS_WEST_ADDRESS): cv.string,
             vol.Optional(CONF_XKNX_BRIGHTNESS_NORTH_ADDRESS): cv.string,
             vol.Optional(CONF_XKNX_WIND_SPEED_ADDRESS): cv.string,
+            vol.Optional(CONF_XKNX_WIND_BEARING_ADDRESS): cv.string,
             vol.Optional(CONF_XKNX_RAIN_ALARM_ADDRESS): cv.string,
             vol.Optional(CONF_XKNX_FROST_ALARM_ADDRESS): cv.string,
             vol.Optional(CONF_XKNX_WIND_ALARM_ADDRESS): cv.string,
diff --git a/home-assistant-plugin/custom_components/xknx/weather.py b/home-assistant-plugin/custom_components/xknx/weather.py
index 097fa661..f7b1f5af 100644
--- a/home-assistant-plugin/custom_components/xknx/weather.py
+++ b/home-assistant-plugin/custom_components/xknx/weather.py
@@ -64,3 +64,10 @@ class KNXWeather(KnxEntity, WeatherEntity):
             if self._device.wind_speed is not None
             else None
         )
+
+    @property
+    def wind_bearing(self):
+        """Return current wind bearing in degrees."""
+        return (
+            self._device.wind_bearing if self._device.wind_bearing is not None else None
+        )
diff --git a/xknx.yaml b/xknx.yaml
index a1a60161..650720ae 100644
--- a/xknx.yaml
+++ b/xknx.yaml
@@ -290,12 +290,13 @@ groups:
             group_address_brightness_west: "7/0/2",
             group_address_brightness_east: "7/0/3",
             group_address_wind_speed: "7/0/4",
-            group_address_rain_alarm: "7/0/5",
-            group_address_frost_alarm: "7/0/6",
-            group_address_wind_alarm: "7/0/7",
-            group_address_day_night: "7/0/8",
-            group_address_air_pressure: "7/0/9",
-            group_address_humidity: "7/0/10",
+            group_address_wind_bearing: "7/0/5",
+            group_address_rain_alarm: "7/0/6",
+            group_address_frost_alarm: "7/0/7",
+            group_address_wind_alarm: "7/0/8",
+            group_address_day_night: "7/0/9",
+            group_address_air_pressure: "7/0/10",
+            group_address_humidity: "7/0/11",
             create_sensors: True,
             sync_state: True,
           }
@@ -306,12 +307,13 @@ groups:
             group_address_brightness_west: "7/0/2",
             group_address_brightness_east: "7/0/3",
             group_address_wind_speed: "7/0/4",
-            group_address_rain_alarm: "7/0/5",
-            group_address_frost_alarm: "7/0/6",
-            group_address_wind_alarm: "7/0/7",
-            group_address_day_night: "7/0/8",
-            group_address_air_pressure: "7/0/9",
-            group_address_humidity: "7/0/10",
+            group_address_wind_bearing: "7/0/5",
+            group_address_rain_alarm: "7/0/6",
+            group_address_frost_alarm: "7/0/7",
+            group_address_wind_alarm: "7/0/8",
+            group_address_day_night: "7/0/9",
+            group_address_air_pressure: "7/0/10",
+            group_address_humidity: "7/0/11",
             create_sensors: False,
             sync_state: True,
           }
diff --git a/xknx/config/schema.py b/xknx/config/schema.py
index 58fc6bd0..904c971a 100644
--- a/xknx/config/schema.py
+++ b/xknx/config/schema.py
@@ -434,6 +434,7 @@ class WeatherSchema:
     CONF_WIND_ALARM = "wind_alarm"
     CONF_FROST_ALARM = "frost_alarm"
     CONF_WIND_SPEED = "wind_speed"
+    CONF_WIND_BEARING = "wind_bearing"
     CONF_DAY_NIGHT = "day_night"
     CONF_AIR_PRESSURE = "air_pressure"
     CONF_HUMIDITY = "humidity"
@@ -495,6 +496,12 @@ class WeatherSchema:
                     vol.Required(CONF_STATE_ADDRESS): ensure_group_address,
                 }
             ),
+            vol.Optional(CONF_WIND_BEARING): RemoteValueSchema.SCHEMA.extend(
+                {
+                    vol.Remove(CONF_ADDRESS): ensure_group_address,
+                    vol.Required(CONF_STATE_ADDRESS): ensure_group_address,
+                }
+            ),
             vol.Optional(CONF_DAY_NIGHT): RemoteValueSchema.SCHEMA.extend(
                 {
                     vol.Remove(CONF_ADDRESS): ensure_group_address,
diff --git a/xknx/devices/weather.py b/xknx/devices/weather.py
index 94e4f3a3..3185f861 100644
--- a/xknx/devices/weather.py
+++ b/xknx/devices/weather.py
@@ -7,6 +7,7 @@ It provides functionality for
 * reading current brightness in 3 directions (DPT 9.004)
 * reading current alarms (DPTBinary)
 * reading current wind speed in m/s (DPT 9.005)
+* reading current wind bearing in degrees (DPT 5.003)
 * reading current air pressure (DPT 9.006)
 * reading current humidity (DPT 9.007)
 
@@ -86,6 +87,7 @@ class Weather(Device):
         group_address_brightness_west: Optional["GroupAddressableType"] = None,
         group_address_brightness_east: Optional["GroupAddressableType"] = None,
         group_address_wind_speed: Optional["GroupAddressableType"] = None,
+        group_address_wind_bearing: Optional["GroupAddressableType"] = None,
         group_address_rain_alarm: Optional["GroupAddressableType"] = None,
         group_address_frost_alarm: Optional["GroupAddressableType"] = None,
         group_address_wind_alarm: Optional["GroupAddressableType"] = None,
@@ -160,6 +162,16 @@ class Weather(Device):
             after_update_cb=self.after_update,
         )
 
+        self._wind_bearing = RemoteValueSensor(
+            xknx,
+            group_address_state=group_address_wind_bearing,
+            sync_state=sync_state,
+            value_type="angle",
+            device_name=self.name,
+            feature_name="Wind bearing",
+            after_update_cb=self.after_update,
+        )
+
         self._rain_alarm = RemoteValueSwitch(
             xknx,
             group_address_state=group_address_rain_alarm,
@@ -223,6 +235,7 @@ class Weather(Device):
         yield self._brightness_east
         yield self._brightness_west
         yield self._wind_speed
+        yield self._wind_bearing
         yield self._rain_alarm
         yield self._wind_alarm
         yield self._frost_alarm
@@ -277,6 +290,11 @@ class Weather(Device):
         """Return wind speed in m/s."""
         return self._wind_speed.value  # type: ignore
 
+    @property
+    def wind_bearing(self) -> Optional[int]:
+        """Return wind bearing in °."""
+        return self._wind_bearing.value  # type: ignore
+
     @property
     def rain_alarm(self) -> Optional[bool]:
         """Return True if rain alarm False if not."""
@@ -363,6 +381,11 @@ class Weather(Device):
                 self._wind_speed.group_address_state,
                 "wind_speed_ms",
             ),
+            (
+                "_wind_bearing",
+                self._wind_bearing.group_address_state,
+                "angle",
+            ),
             (
                 "_air_pressure",
                 self._air_pressure.group_address_state,
@@ -429,6 +452,7 @@ class Weather(Device):
         group_address_brightness_west = config.get("group_address_brightness_west")
         group_address_brightness_east = config.get("group_address_brightness_east")
         group_address_wind_speed = config.get("group_address_wind_speed")
+        group_address_wind_bearing = config.get("group_address_wind_bearing")
         group_address_rain_alarm = config.get("group_address_rain_alarm")
         group_address_frost_alarm = config.get("group_address_frost_alarm")
         group_address_wind_alarm = config.get("group_address_wind_alarm")
@@ -447,6 +471,7 @@ class Weather(Device):
             group_address_brightness_west=group_address_brightness_west,
             group_address_brightness_east=group_address_brightness_east,
             group_address_wind_speed=group_address_wind_speed,
+            group_address_wind_bearing=group_address_wind_bearing,
             group_address_rain_alarm=group_address_rain_alarm,
             group_address_frost_alarm=group_address_frost_alarm,
             group_address_wind_alarm=group_address_wind_alarm,
@@ -462,7 +487,7 @@ class Weather(Device):
         return (
             '<Weather name="{}" '
             'temperature="{}" brightness_south="{}" brightness_north="{}" brightness_west="{}" '
-            'brightness_east="{}" wind_speed="{}" rain_alarm="{}" '
+            'brightness_east="{}" wind_speed="{}" wind_bearing="{}" rain_alarm="{}" '
             'wind_alarm="{}" frost_alarm="{}" day_night="{}" '
             'air_pressure="{}" humidity="{}" />'.format(
                 self.name,
@@ -472,6 +497,7 @@ class Weather(Device):
                 self._brightness_west.group_addr_str(),
                 self._brightness_east.group_addr_str(),
                 self._wind_speed.group_addr_str(),
+                self._wind_bearing.group_addr_str(),
                 self._rain_alarm.group_addr_str(),
                 self._wind_alarm.group_addr_str(),
                 self._frost_alarm.group_addr_str(),
diff --git a/xknx_v2.yaml b/xknx_v2.yaml
index 7693a1cc..6cf73499 100644
--- a/xknx_v2.yaml
+++ b/xknx_v2.yaml
@@ -155,6 +155,9 @@ climate:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"


Test patch:
diff --git a/test/config_tests/config_v1_test.py b/test/config_tests/config_v1_test.py
index f428ea6c..ec56df5b 100644
--- a/test/config_tests/config_v1_test.py
+++ b/test/config_tests/config_v1_test.py
@@ -582,12 +582,13 @@ class TestConfig(unittest.TestCase):
                 group_address_brightness_west="7/0/2",
                 group_address_brightness_east="7/0/3",
                 group_address_wind_speed="7/0/4",
-                group_address_rain_alarm="7/0/5",
-                group_address_frost_alarm="7/0/6",
-                group_address_wind_alarm="7/0/7",
-                group_address_day_night="7/0/8",
-                group_address_air_pressure="7/0/9",
-                group_address_humidity="7/0/10",
+                group_address_wind_bearing="7/0/5",
+                group_address_rain_alarm="7/0/6",
+                group_address_frost_alarm="7/0/7",
+                group_address_wind_alarm="7/0/8",
+                group_address_day_night="7/0/9",
+                group_address_air_pressure="7/0/10",
+                group_address_humidity="7/0/11",
                 create_sensors=False,
                 sync_state=True,
             ),
diff --git a/test/config_tests/resources/weather/invalid_1.yaml b/test/config_tests/resources/weather/invalid_1.yaml
index 7e535b81..70cc9450 100644
--- a/test/config_tests/resources/weather/invalid_1.yaml
+++ b/test/config_tests/resources/weather/invalid_1.yaml
@@ -24,6 +24,9 @@ wind_alarm:
 wind_speed:
   state_address: "7/0/6"
   state_update: "expire 60"
+wind_bearing:
+  state_address: "7/0/7"
+  state_update: "expire 60"
 day_night:
   state_address: "7/0/8"
   state_update: "expire 60"
diff --git a/test/config_tests/resources/weather/invalid_2.yaml b/test/config_tests/resources/weather/invalid_2.yaml
index a6f6980e..08bbe74a 100644
--- a/test/config_tests/resources/weather/invalid_2.yaml
+++ b/test/config_tests/resources/weather/invalid_2.yaml
@@ -25,6 +25,9 @@ wind_alarm:
 wind_speed:
   state_address: "7/0/6"
   state_update: "expire 60"
+wind_bearing:
+  state_address: "7/0/7"
+  state_update: "expire 60"
 day_night:
   state_address: "7/0/8"
   state_update: "expire 60"
diff --git a/test/config_tests/resources/weather/valid_1.yaml b/test/config_tests/resources/weather/valid_1.yaml
index c0fb1d29..5f446869 100644
--- a/test/config_tests/resources/weather/valid_1.yaml
+++ b/test/config_tests/resources/weather/valid_1.yaml
@@ -27,6 +27,9 @@ wind_alarm:
 wind_speed:
   state_address: "7/0/6"
   state_update: "expire 60"
+wind_bearing:
+  state_address: "7/0/7"
+  state_update: "expire 60"
 day_night:
   state_address: "7/0/8"
   state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/invalid_1.yaml b/test/config_tests/resources/xknx/invalid_1.yaml
index 261e172f..404663f6 100644
--- a/test/config_tests/resources/xknx/invalid_1.yaml
+++ b/test/config_tests/resources/xknx/invalid_1.yaml
@@ -148,6 +148,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/invalid_2.yaml b/test/config_tests/resources/xknx/invalid_2.yaml
index bc465c53..a74bbb19 100644
--- a/test/config_tests/resources/xknx/invalid_2.yaml
+++ b/test/config_tests/resources/xknx/invalid_2.yaml
@@ -146,6 +146,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/invalid_3.yaml b/test/config_tests/resources/xknx/invalid_3.yaml
index 1c70d10d..bf1ce14d 100644
--- a/test/config_tests/resources/xknx/invalid_3.yaml
+++ b/test/config_tests/resources/xknx/invalid_3.yaml
@@ -145,6 +145,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/valid_1.yaml b/test/config_tests/resources/xknx/valid_1.yaml
index e9948bd0..36287d7e 100644
--- a/test/config_tests/resources/xknx/valid_1.yaml
+++ b/test/config_tests/resources/xknx/valid_1.yaml
@@ -151,6 +151,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/valid_2.yaml b/test/config_tests/resources/xknx/valid_2.yaml
index 233bbc3e..8ebc3351 100644
--- a/test/config_tests/resources/xknx/valid_2.yaml
+++ b/test/config_tests/resources/xknx/valid_2.yaml
@@ -148,6 +148,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/config_tests/resources/xknx/valid_3.yaml b/test/config_tests/resources/xknx/valid_3.yaml
index 67717c12..0d37e165 100644
--- a/test/config_tests/resources/xknx/valid_3.yaml
+++ b/test/config_tests/resources/xknx/valid_3.yaml
@@ -153,6 +153,9 @@ weather:
     wind_speed:
       state_address: "7/0/6"
       state_update: "expire 60"
+    wind_bearing:
+      state_address: "7/0/7"
+      state_update: "expire 60"
     day_night:
       state_address: "7/0/8"
       state_update: "expire 60"
diff --git a/test/devices_tests/weather_test.py b/test/devices_tests/weather_test.py
index 5df3806f..1c59eec3 100644
--- a/test/devices_tests/weather_test.py
+++ b/test/devices_tests/weather_test.py
@@ -118,6 +118,19 @@ class TestWeather(unittest.TestCase):
         self.assertEqual(weather._wind_speed.unit_of_measurement, "m/s")
         self.assertEqual(weather._wind_speed.ha_device_class, None)
 
+    def test_wind_bearing(self):
+        """Test wind bearing received."""
+        xknx = XKNX()
+        weather: Weather = Weather(
+            name="weather", xknx=xknx, group_address_brightness_east="1/3/8"
+        )
+
+        weather._wind_bearing.payload = DPTArray((0xBF,))
+
+        self.assertEqual(weather.wind_bearing, 270)
+        self.assertEqual(weather._wind_bearing.unit_of_measurement, "°")
+        self.assertEqual(weather._wind_bearing.ha_device_class, None)
+
     def test_state_lightning(self):
         """Test current_state returns lightning if wind alarm and rain alarm are true."""
         xknx = XKNX()
diff --git a/test/str_test.py b/test/str_test.py
index b8b3233e..a94cc05f 100644
--- a/test/str_test.py
+++ b/test/str_test.py
@@ -336,6 +336,7 @@ class TestStringRepresentations(unittest.TestCase):
             group_address_brightness_east="7/0/4",
             group_address_brightness_west="7/0/3",
             group_address_wind_speed="7/0/2",
+            group_address_wind_bearing="7/0/6",
             group_address_day_night="7/0/7",
             group_address_rain_alarm="7/0/0",
             group_address_frost_alarm="7/0/8",
@@ -347,12 +348,13 @@ class TestStringRepresentations(unittest.TestCase):
         self.assertEqual(
             str(weather),
             '<Weather name="Home" temperature="None/GroupAddress("7/0/1")/None/None" '
-            'brightness_south="None/GroupAddress("7/0/5")/None/None" brightness_north="None/None/None/None"'
-            ' brightness_west="None/GroupAddress("7/0/3")/None/None" '
-            'brightness_east="None/GroupAddress("7/0/4")/None/None" wind_speed="None/GroupAddress("7/0/2")/None/None"'
-            ' rain_alarm="None/GroupAddress("7/0/0")/None/None" wind_alarm="None/GroupAddress("7/0/10")/None/None" '
-            'frost_alarm="None/GroupAddress("7/0/8")/None/None" day_night="None/GroupAddress("7/0/7")/None/None" '
-            'air_pressure="None/GroupAddress("7/0/9")/None/None" humidity="None/GroupAddress("7/0/9")/None/None" />',
+            'brightness_south="None/GroupAddress("7/0/5")/None/None" brightness_north="None/None/None/None" '
+            'brightness_west="None/GroupAddress("7/0/3")/None/None" '
+            'brightness_east="None/GroupAddress("7/0/4")/None/None" wind_speed="None/GroupAddress("7/0/2")/None/None" '
+            'wind_bearing="None/GroupAddress("7/0/6")/None/None" rain_alarm="None/GroupAddress("7/0/0")/None/None" '
+            'wind_alarm="None/GroupAddress("7/0/10")/None/None" frost_alarm="None/GroupAddress("7/0/8")/None/None" '
+            'day_night="None/GroupAddress("7/0/7")/None/None" air_pressure="None/GroupAddress("7/0/9")/None/None" '
+            'humidity="None/GroupAddress("7/0/9")/None/None" />',
         )
 
         telegram = Telegram(
@@ -368,7 +370,7 @@ class TestStringRepresentations(unittest.TestCase):
             'brightness_south="None/GroupAddress("7/0/5")/None/None" brightness_north="None/None/None/None" '
             'brightness_west="None/GroupAddress("7/0/3")/None/None" '
             'brightness_east="None/GroupAddress("7/0/4")/None/None" wind_speed="None/GroupAddress("7/0/2")/None/None" '
-            'rain_alarm="None/GroupAddress("7/0/0")/None/None" '
+            'wind_bearing="None/GroupAddress("7/0/6")/None/None" rain_alarm="None/GroupAddress("7/0/0")/None/None" '
             'wind_alarm="None/GroupAddress("7/0/10")/<DPTBinary value="1" />/True" '
             'frost_alarm="None/GroupAddress("7/0/8")/None/None" day_night="None/GroupAddress("7/0/7")/None/None" '
             'air_pressure="None/GroupAddress("7/0/9")/None/None" humidity="None/GroupAddress("7/0/9")/None/None" />',