mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Updates to demo component and platforms
This commit is contained in:
@@ -21,6 +21,11 @@ class DemoSensor(Device):
|
||||
self._state = state
|
||||
self._unit_of_measurement = unit_of_measurement
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
""" No polling needed for a demo sensor. """
|
||||
return False
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
""" Returns the name of the device. """
|
||||
|
||||
Reference in New Issue
Block a user