mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Fix lint
This commit is contained in:
@@ -165,7 +165,7 @@ class MinMaxSensor(Entity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
if (self._unit_of_measurement_mismatch):
|
if self._unit_of_measurement_mismatch:
|
||||||
return STATE_UNKNOWN
|
return STATE_UNKNOWN
|
||||||
return getattr(self, next(
|
return getattr(self, next(
|
||||||
k for k, v in SENSOR_TYPES.items() if self._sensor_type == v))
|
k for k, v in SENSOR_TYPES.items() if self._sensor_type == v))
|
||||||
@@ -173,7 +173,7 @@ class MinMaxSensor(Entity):
|
|||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
"""Return the unit the value is expressed in."""
|
"""Return the unit the value is expressed in."""
|
||||||
if (self._unit_of_measurement_mismatch):
|
if self._unit_of_measurement_mismatch:
|
||||||
return "ERR"
|
return "ERR"
|
||||||
return self._unit_of_measurement
|
return self._unit_of_measurement
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user