Remove energy usage from the switch base class (#68821)
* Remove energy usage from the switch base class * Remove unused attributes from integrations
This commit is contained in:
parent
c6ba987995
commit
69fcce3b2c
24 changed files with 11 additions and 328 deletions
|
@ -110,16 +110,3 @@ class MfiSwitch(SwitchEntity):
|
|||
"""Turn the switch off."""
|
||||
self._port.control(False)
|
||||
self._target_state = False
|
||||
|
||||
@property
|
||||
def current_power_w(self):
|
||||
"""Return the current power usage in W."""
|
||||
return int(self._port.data.get("active_pwr", 0))
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes for the device."""
|
||||
return {
|
||||
"volts": round(self._port.data.get("v_rms", 0), 1),
|
||||
"amps": round(self._port.data.get("i_rms", 0), 1),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue