mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Add defult methods to base class for switch_state and sensor_state
This commit is contained in:
@@ -108,6 +108,16 @@ class SwitchDevice(ToggleEntity):
|
||||
""" Today total power usage in mw. """
|
||||
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
|
||||
def device_state_attributes(self):
|
||||
""" Returns device specific state attributes. """
|
||||
|
Reference in New Issue
Block a user