1 """ATAG water heater component."""
14 from .coordinator
import AtagConfigEntry
15 from .entity
import AtagEntity
17 OPERATION_LIST = [STATE_OFF, STATE_ECO, STATE_PERFORMANCE]
22 config_entry: AtagConfigEntry,
23 async_add_entities: AddEntitiesCallback,
25 """Initialize DHW device from config entry."""
32 """Representation of an ATAG water heater."""
34 _attr_operation_list = OPERATION_LIST
35 _attr_temperature_unit = UnitOfTemperature.CELSIUS
39 """Return the current temperature."""
40 return self.coordinator.atag.dhw.temperature
44 """Return current operation."""
45 operation = self.coordinator.atag.dhw.current_operation
46 return operation
if operation
in self.
operation_listoperation_list
else STATE_OFF
49 """Set new target temperature."""
50 if await self.coordinator.atag.dhw.set_temp(kwargs.get(ATTR_TEMPERATURE)):
55 """Return the setpoint if water demand, otherwise return base temp (comfort level)."""
56 return self.coordinator.atag.dhw.target_temperature
60 """Return the maximum temperature."""
61 return self.coordinator.atag.dhw.max_temp
65 """Return the minimum temperature."""
66 return self.coordinator.atag.dhw.min_temp
None async_set_temperature(self, **Any kwargs)
def current_operation(self)
def current_temperature(self)
def target_temperature(self)
list[str]|None operation_list(self)
None async_write_ha_state(self)
None async_setup_entry(HomeAssistant hass, AtagConfigEntry config_entry, AddEntitiesCallback async_add_entities)