Make homematic climate dynamic for datapoints. (#5993)
* Make homematic climate dynamic for datapoints. * Code cleanup * Add more option * add options * Pump version 0.1.22 * optimaze
This commit is contained in:
1 parent
039559882b
commit
80bc2666ac
8 files changed
+52
-59
No files matched your search
@@ -65,9 +65,6 @@ class HMSensor(HMDevice):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the sensor."""
|
||||
if not self.available:
|
||||
return STATE_UNKNOWN
|
||||
|
||||
# Does a cast exist for this class?
|
||||
name = self._hmdevice.__class__.__name__
|
||||
if name in HM_STATE_HA_CAST:
|
||||
@@ -79,9 +76,6 @@ class HMSensor(HMDevice):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement of this entity, if any."""
|
||||
if not self.available:
|
||||
return None
|
||||
|
||||
return HM_UNIT_HA_CAST.get(self._state, None)
|
||||
|
||||
def _init_data_struct(self):
|
||||
|
||||
Reference in new issue
Block a user