Skip to content

Commit

Permalink
Round float state to 2 digits. (#164)
Browse files Browse the repository at this point in the history
* Round float state to 2 digits.

Github Issue: #163
  • Loading branch information
vlebourl committed Jul 23, 2020
1 parent e6b4c22 commit 6caeb9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tahoma/sensor.py
Expand Up @@ -85,8 +85,7 @@ class TahomaSensor(TahomaDevice, Entity):
@property
def state(self):
"""Return the name of the sensor."""

return self.select_state(
state = self.select_state(
CORE_LUMINANCE_STATE,
CORE_RELATIVE_HUMIDITY_STATE,
CORE_TEMPERATURE_STATE,
Expand All @@ -97,6 +96,7 @@ def state(self):
CORE_WINDSPEED_STATE,
CORE_SUN_ENERGY_STATE,
)
return round(state, 2)

@property
def unit_of_measurement(self):
Expand Down

0 comments on commit 6caeb9a

Please sign in to comment.