mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Add defult methods to base class for switch_state and sensor_state
This commit is contained in:
parent
2a0d459722
commit
c3a9db0a37
@ -108,6 +108,16 @@ class SwitchDevice(ToggleEntity):
|
|||||||
""" Today total power usage in mw. """
|
""" Today total power usage in mw. """
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def standby_state(self):
|
||||||
|
""" Is the device on - or in standby. """
|
||||||
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sensor_state(self):
|
||||||
|
""" Is the sensor on or off. """
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
""" Returns device specific state attributes. """
|
""" Returns device specific state attributes. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user