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:
Paulus Schoutsen 2022-03-28 21:56:04 -07:00 committed by GitHub
parent c6ba987995
commit 69fcce3b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 11 additions and 328 deletions

View file

@ -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),
}