1 """Support for using switch with ecoNet thermostats."""
3 from __future__
import annotations
8 from pyeconet.equipment
import EquipmentType
9 from pyeconet.equipment.thermostat
import ThermostatOperationMode
16 from .const
import DOMAIN, EQUIPMENT
17 from .entity
import EcoNetEntity
19 _LOGGER = logging.getLogger(__name__)
25 async_add_entities: AddEntitiesCallback,
27 """Set up the ecobee thermostat switch entity."""
28 equipment = hass.data[DOMAIN][EQUIPMENT][entry.entry_id]
31 for thermostat
in equipment[EquipmentType.THERMOSTAT]
36 """Representation of a aux_heat_only EcoNet switch."""
39 """Initialize EcoNet ventilator platform."""
43 f
"{thermostat.device_id}_{thermostat.device_name}_auxheat"
47 """Set the hvacMode to auxHeatOnly."""
48 self.
_econet_econet.set_mode(ThermostatOperationMode.EMERGENCY_HEAT)
51 """Set the hvacMode back to the prior setting."""
52 self.
_econet_econet.set_mode(ThermostatOperationMode.HEATING)
56 """Return true if auxHeatOnly mode is active."""
57 return self.
_econet_econet.mode == ThermostatOperationMode.EMERGENCY_HEAT
None turn_on(self, **Any kwargs)
None __init__(self, thermostat)
None turn_off(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)