Add unique_id property

This commit is contained in:
David
2018-02-08 21:58:57 +01:00
committed by GitHub
parent 4524f1aa82
commit c213ac360e

View File

@@ -92,6 +92,11 @@ class SystemMonitorSensor(Entity):
self._state = None
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
@property
def unique_id(self):
"""Return a unique identifier for the sensor."""
return self.type
@property
def name(self):
"""Return the name of the sensor."""