Repository: XKNX/xknx

Issue:
KNX Weather entity payload error for air pressure
**Description of problem:**
I set up the new weather entity. For the air pressure the HA log shows an error due to an invalid payload. 

- [ ] using xknx standalone
- [X] using Home-Assistant knx plugin

**Version information:**
- xknx / Home-Assistant release with the issue: 0.13.0

**KNX installation:**
Jung Weather Station 2225 WSU
- communication object: Air Pressure DPT 9.006
![image](https://user-images.githubusercontent.com/53949754/93705737-df789100-fb1f-11ea-8c3a-058d1cefed00.png)

**Problem-relevant `xknx.yaml` or `configuration.yaml` entries (fill out even if it seems unimportant):**

````
- name: 'Dach'
  address_temperature: '6/5/11'
  address_brightness_south: '6/5/6'
  address_brightness_west: '6/5/7'
  address_brightness_east: '6/5/5'
  address_wind_speed: '6/5/0'
  address_rain_alarm: '6/5/37'
  # address_frost_alarm: "7/0/6"
  address_wind_alarm: '6/5/29'
  # address_day_night: "7/0/8"
  address_air_pressure: '6/5/13'
  address_humidity: '6/5/12'
  expose_sensors: False
  sync_state: True
````

**Traceback (if applicable):**
```
2020-09-19 10:35:51 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/xknx/remote_value/remote_value.py", line 151, in read_state
    await self.process(telegram)
  File "/usr/local/lib/python3.8/site-packages/xknx/remote_value/remote_value.py", line 92, in process
    raise CouldNotParseTelegram("payload invalid",
xknx.exceptions.exception.CouldNotParseTelegram: <CouldNotParseTelegram description="payload invalid" device_name="Dach" feature_name="Value" group_address="6/5/13" payload="<DPTArray value="[0x6c,0xad]" />"/>
```


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

Coverage remained the same at 92.138% when pulling **bd820f5a15dd5d8ea489136ad1012e34b4c6618b on marvin-w:bugfix/fix_air_pressure_weather** into **5a3bbc5c493fd18761b3d0b3b383d3a35b3efa54 on XKNX:master**.


Patch:
diff --git a/xknx/devices/weather.py b/xknx/devices/weather.py
index 8b155818..48791d01 100644
--- a/xknx/devices/weather.py
+++ b/xknx/devices/weather.py
@@ -189,7 +189,7 @@ class Weather(Device):
             xknx,
             group_address_state=group_address_air_pressure,
             sync_state=sync_state,
-            value_type="pressure",
+            value_type="pressure_2byte",
             device_name=self.name,
             feature_name="Air pressure",
             after_update_cb=self.after_update,


Test patch:
diff --git a/test/devices_tests/weather_test.py b/test/devices_tests/weather_test.py
index b3956b46..02312d17 100644
--- a/test/devices_tests/weather_test.py
+++ b/test/devices_tests/weather_test.py
@@ -79,16 +79,9 @@ class TestWeather(unittest.TestCase):
         """Test resolve state with pressure."""
         xknx = XKNX(loop=self.loop)
         weather = Weather(name="weather", xknx=xknx, group_address_air_pressure="1/3/4")
-        weather._air_pressure.payload = DPTArray(
-            (
-                0xC5,
-                0xE6,
-                0xE6,
-                0x63,
-            )
-        )
+        weather._air_pressure.payload = DPTArray((0x6C, 0xAD))
 
-        self.assertEqual(weather.air_pressure, -7388.79833984375)
+        self.assertEqual(weather.air_pressure, 98058.24)
         self.assertEqual(weather._air_pressure.unit_of_measurement, "Pa")
         self.assertEqual(weather._air_pressure.ha_device_class, "pressure")