Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions custom_components/intellicenter/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
WaterHeaterEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE, STATE_IDLE, STATE_OFF, STATE_ON
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.core import HomeAssistant

Expand Down Expand Up @@ -104,16 +104,6 @@ def extra_state_attributes(self) -> Optional[dict[str, Any]]:

return state_attributes

@property
def state(self) -> str:
"""Return the current state."""
status = self._poolObject[STATUS_ATTR]
heater = self._poolObject[HEATER_ATTR]
if status == "OFF" or heater == NULL_OBJNAM:
return STATE_OFF
htmode = self._poolObject[HTMODE_ATTR]
return STATE_ON if htmode != "0" else STATE_IDLE

@property
def unique_id(self):
"""Return a unique ID."""
Expand Down