mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
commit
41b02928ef
@ -1,4 +1,4 @@
|
|||||||
""" Demo platform that has two fake switchces. """
|
""" Demo platform that has two fake switches. """
|
||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME
|
from homeassistant.const import STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class DemoSwitch(ToggleEntity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
""" Returns the name of the device if any. """
|
""" Returns the state of the device if any. """
|
||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user