From a6902ffd8a43bb93b7567be2b193452c38d64acb Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 3 Jun 2021 14:21:52 +0200 Subject: [PATCH] Remove is_standby from SwitchEntity (#51400) --- homeassistant/components/hdmi_cec/switch.py | 7 +------ homeassistant/components/switch/__init__.py | 6 ------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/homeassistant/components/hdmi_cec/switch.py b/homeassistant/components/hdmi_cec/switch.py index ea0cac76a99..5de38675fca 100644 --- a/homeassistant/components/hdmi_cec/switch.py +++ b/homeassistant/components/hdmi_cec/switch.py @@ -2,7 +2,7 @@ import logging from homeassistant.components.switch import DOMAIN, SwitchEntity -from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY +from homeassistant.const import STATE_OFF, STATE_ON from . import ATTR_NEW, CecEntity @@ -56,11 +56,6 @@ class CecSwitchEntity(CecEntity, SwitchEntity): """Return True if entity is on.""" return self._state == STATE_ON - @property - def is_standby(self): - """Return true if device is in standby.""" - return self._state == STATE_OFF or self._state == STATE_STANDBY - @property def state(self) -> str: """Return the cached state of device.""" diff --git a/homeassistant/components/switch/__init__.py b/homeassistant/components/switch/__init__.py index f468f6f6bd3..f9e9542701b 100644 --- a/homeassistant/components/switch/__init__.py +++ b/homeassistant/components/switch/__init__.py @@ -88,7 +88,6 @@ class SwitchEntity(ToggleEntity): """Base class for switch entities.""" _attr_current_power_w: float | None = None - _attr_is_standby: bool | None = None _attr_today_energy_kwh: float | None = None @property @@ -101,11 +100,6 @@ class SwitchEntity(ToggleEntity): """Return the today total energy usage in kWh.""" return self._attr_today_energy_kwh - @property - def is_standby(self) -> bool | None: - """Return true if device is in standby.""" - return self._attr_is_standby - @final @property def state_attributes(self) -> dict[str, Any] | None: