Skip to content

Commit

Permalink
Changed resolution to 0.01 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
KNXBroker committed Feb 7, 2021
1 parent c8932dc commit 16328d4
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions xknx/dpt/dpt_2byte_float.py
Expand Up @@ -22,7 +22,7 @@ class DPT2ByteFloat(DPTBase):
dpt_sub_number = None
value_type = "2byte_float"
unit = ""
resolution = 1
resolution = 0.01
payload_length = 2

@classmethod
Expand Down Expand Up @@ -93,7 +93,6 @@ class DPTTemperature(DPT2ByteFloat):
value_type = "temperature"
unit = "°C"
ha_device_class = "temperature"
resolution = 0.01


class DPTTemperatureDifference2Byte(DPT2ByteFloat):
Expand All @@ -106,7 +105,6 @@ class DPTTemperatureDifference2Byte(DPT2ByteFloat):
value_type = "temperature_difference_2byte"
unit = "K"
ha_device_class = "temperature"
resolution = 0.01


class DPTTemperatureA(DPT2ByteFloat):
Expand All @@ -118,7 +116,6 @@ class DPTTemperatureA(DPT2ByteFloat):
dpt_sub_number = 3
value_type = "temperature_a"
unit = "K/h"
resolution = 0.01


class DPTLux(DPT2ByteFloat):
Expand All @@ -131,7 +128,6 @@ class DPTLux(DPT2ByteFloat):
value_type = "illuminance"
unit = "lx"
ha_device_class = "illuminance"
resolution = 0.01


class DPTWsp(DPT2ByteFloat):
Expand All @@ -143,7 +139,6 @@ class DPTWsp(DPT2ByteFloat):
dpt_sub_number = 5
value_type = "wind_speed_ms"
unit = "m/s"
resolution = 0.01


class DPTPressure2Byte(DPT2ByteFloat):
Expand All @@ -156,7 +151,6 @@ class DPTPressure2Byte(DPT2ByteFloat):
value_type = "pressure_2byte"
unit = "Pa"
ha_device_class = "pressure"
resolution = 0.01


class DPTHumidity(DPT2ByteFloat):
Expand All @@ -169,7 +163,6 @@ class DPTHumidity(DPT2ByteFloat):
value_type = "humidity"
unit = "%"
ha_device_class = "humidity"
resolution = 0.01


class DPTPartsPerMillion(DPT2ByteFloat):
Expand All @@ -179,7 +172,6 @@ class DPTPartsPerMillion(DPT2ByteFloat):
dpt_sub_number = 8
value_type = "ppm"
unit = "ppm"
resolution = 0.01


class DPTTime1(DPT2ByteFloat):
Expand All @@ -191,7 +183,6 @@ class DPTTime1(DPT2ByteFloat):
dpt_sub_number = 10
value_type = "time_1"
unit = "s"
resolution = 0.01


class DPTTime2(DPT2ByteFloat):
Expand All @@ -203,7 +194,6 @@ class DPTTime2(DPT2ByteFloat):
dpt_sub_number = 11
value_type = "time_2"
unit = "ms"
resolution = 0.01


class DPTVoltage(DPT2ByteFloat):
Expand All @@ -213,7 +203,6 @@ class DPTVoltage(DPT2ByteFloat):
dpt_sub_number = 20
value_type = "voltage"
unit = "mV"
resolution = 0.01


class DPTCurrent(DPT2ByteFloat):
Expand All @@ -223,7 +212,6 @@ class DPTCurrent(DPT2ByteFloat):
dpt_sub_number = 21
value_type = "curr"
unit = "mA"
resolution = 0.01


class DPTPowerDensity(DPT2ByteFloat):
Expand All @@ -233,7 +221,6 @@ class DPTPowerDensity(DPT2ByteFloat):
dpt_sub_number = 22
value_type = "power_density"
unit = "W/m²"
resolution = 0.01


class DPTKelvinPerPercent(DPT2ByteFloat):
Expand All @@ -243,7 +230,6 @@ class DPTKelvinPerPercent(DPT2ByteFloat):
dpt_sub_number = 23
value_type = "kelvin_per_percent"
unit = "K/%"
resolution = 0.01


class DPTPower2Byte(DPT2ByteFloat):
Expand All @@ -254,7 +240,6 @@ class DPTPower2Byte(DPT2ByteFloat):
value_type = "power_2byte"
unit = "kW"
ha_device_class = "power"
resolution = 0.01


class DPTVolumeFlow(DPT2ByteFloat):
Expand All @@ -264,7 +249,6 @@ class DPTVolumeFlow(DPT2ByteFloat):
dpt_sub_number = 25
value_type = "volume_flow"
unit = "l/h"
resolution = 0.01


class DPTRainAmount(DPT2ByteFloat):
Expand All @@ -276,7 +260,6 @@ class DPTRainAmount(DPT2ByteFloat):
dpt_sub_number = 26
value_type = "rain_amount"
unit = "l/m²"
resolution = 0.01


class DPTTemperatureF(DPT2ByteFloat):
Expand All @@ -289,7 +272,6 @@ class DPTTemperatureF(DPT2ByteFloat):
value_type = "temperature_f"
unit = "°F"
ha_device_class = "temperature"
resolution = 0.01


class DPTWspKmh(DPT2ByteFloat):
Expand All @@ -301,7 +283,6 @@ class DPTWspKmh(DPT2ByteFloat):
dpt_sub_number = 28
value_type = "wind_speed_kmh"
unit = "km/h"
resolution = 0.01


class DPTEnthalpy(DPT2ByteFloat):
Expand All @@ -312,4 +293,3 @@ class DPTEnthalpy(DPT2ByteFloat):
dpt_sub_number = 999
value_type = "enthalpy"
unit = "H"
resolution = 0.01

0 comments on commit 16328d4

Please sign in to comment.