mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
Add sensor class to bloomsky binary_sensor
This commit is contained in:
@@ -64,7 +64,7 @@ class BinarySensorDevice(Entity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def sensor_class(self):
|
def sensor_class(self):
|
||||||
"""Return the class of this sensor, from SENSOR_CASSES."""
|
"""Return the class of this sensor, from SENSOR_CLASSES."""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@@ -56,6 +56,11 @@ class BloomSkySensor(BinarySensorDevice):
|
|||||||
"""Unique ID for this sensor."""
|
"""Unique ID for this sensor."""
|
||||||
return self._unique_id
|
return self._unique_id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sensor_class(self):
|
||||||
|
"""Return the class of this sensor, from SENSOR_CLASSES."""
|
||||||
|
return SENSOR_TYPES.get(self._sensor_name)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""If binary sensor is on."""
|
"""If binary sensor is on."""
|
||||||
|
Reference in New Issue
Block a user