mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add watt to mysensors switch attributes (#13370)
This commit is contained in:
parent
2d7d8848cb
commit
17cbd0f3c9
@ -72,6 +72,12 @@ class MySensorsSwitch(mysensors.MySensorsEntity, SwitchDevice):
|
||||
"""Return True if unable to access real state of entity."""
|
||||
return self.gateway.optimistic
|
||||
|
||||
@property
|
||||
def current_power_w(self):
|
||||
"""Return the current power usage in W."""
|
||||
set_req = self.gateway.const.SetReq
|
||||
return self._values.get(set_req.V_WATT)
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return True if switch is on."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user