mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02:00
Remove is_standby from SwitchEntity (#51400)
This commit is contained in:
parent
470514cb08
commit
a6902ffd8a
@ -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."""
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user