1 """Support for an Intergas boiler via an InComfort/InTouch Lan2RF gateway."""
3 from __future__
import annotations
7 from incomfortclient
import Heater
as InComfortHeater, Room
as InComfortRoom
20 from .
import InComfortConfigEntry
21 from .const
import DOMAIN
22 from .coordinator
import InComfortDataCoordinator
23 from .entity
import IncomfortEntity
28 entry: InComfortConfigEntry,
29 async_add_entities: AddEntitiesCallback,
31 """Set up InComfort/InTouch climate devices."""
32 incomfort_coordinator = entry.runtime_data
33 heaters = incomfort_coordinator.data.heaters
35 InComfortClimate(incomfort_coordinator, h, r)
for h
in heaters
for r
in h.rooms
40 """Representation of an InComfort/InTouch climate device."""
45 _attr_hvac_mode = HVACMode.HEAT
46 _attr_hvac_modes = [HVACMode.HEAT]
47 _attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
48 _attr_temperature_unit = UnitOfTemperature.CELSIUS
49 _enable_turn_on_off_backwards_compatibility =
False
53 coordinator: InComfortDataCoordinator,
54 heater: InComfortHeater,
57 """Initialize the climate device."""
66 manufacturer=
"Intergas",
67 name=f
"Thermostat {room.room_no}",
72 """Return the device state attributes."""
73 return {
"status": self.
_room_room.status}
77 """Return the current temperature."""
78 return self.
_room_room.room_temp
82 """Return the actual current HVAC action."""
83 if self.
_heater_heater.is_burning
and self.
_heater_heater.is_pumping:
84 return HVACAction.HEATING
85 return HVACAction.IDLE
89 """Return the (override)temperature we try to reach.
91 As we set the override, we report back the override. The actual set point is
92 is returned at a later time.
93 Some older thermostats return 0.0 as override, in that case we fallback to
96 return self.
_room_room.override
or self.
_room_room.setpoint
99 """Set a new target temperature for this zone."""
100 temperature = kwargs.get(ATTR_TEMPERATURE)
101 await self.
_room_room.set_override(temperature)
105 """Set new target hvac mode."""
HVACAction|None hvac_action(self)
dict[str, Any] extra_state_attributes(self)
None async_set_temperature(self, **Any kwargs)
None __init__(self, InComfortDataCoordinator coordinator, InComfortHeater heater, InComfortRoom room)
float|None current_temperature(self)
float|None target_temperature(self)
None async_set_hvac_mode(self, HVACMode hvac_mode)
None async_setup_entry(HomeAssistant hass, InComfortConfigEntry entry, AddEntitiesCallback async_add_entities)