1 """Support for Nexia / Trane XL Thermostats."""
7 from .entity
import NexiaThermostatEntity
8 from .types
import NexiaConfigEntry
13 config_entry: NexiaConfigEntry,
14 async_add_entities: AddEntitiesCallback,
16 """Set up sensors for a Nexia device."""
17 coordinator = config_entry.runtime_data
18 nexia_home = coordinator.nexia_home
21 for thermostat_id
in nexia_home.get_thermostat_ids():
22 thermostat = nexia_home.get_thermostat_by_id(thermostat_id)
25 coordinator, thermostat,
"is_blower_active",
"blower_active"
28 if thermostat.has_emergency_heat():
33 "is_emergency_heat_active",
34 "emergency_heat_active",
42 """Provides Nexia BinarySensor support."""
44 def __init__(self, coordinator, thermostat, sensor_call, translation_key):
45 """Initialize the nexia sensor."""
49 unique_id=f
"{thermostat.thermostat_id}_{sensor_call}",
57 """Return the status of the sensor."""
def __init__(self, coordinator, thermostat, sensor_call, translation_key)
None async_setup_entry(HomeAssistant hass, NexiaConfigEntry config_entry, AddEntitiesCallback async_add_entities)