async def async_setup_entry( hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up the config entry.""" data_update_coordinator = get_data_update_coordinator(hass, config_entry) async_add_entities([ DeviceCover(config_entry, data_update_coordinator, door) for door in get_configured_doors(data_update_coordinator.data) ])
async def async_setup_entry( hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up the config entry.""" data_update_coordinator = get_data_update_coordinator(hass, config_entry) sensors = chain( [ DoorSensorBattery(config_entry, data_update_coordinator, door) for door in get_configured_doors(data_update_coordinator.data) if door.sensorid and door.sensorid != SENSOR_ID_WIRED ], [ DoorSensorTemperature(config_entry, data_update_coordinator, door) for door in get_configured_doors(data_update_coordinator.data) if door.sensorid and door.sensorid != SENSOR_ID_WIRED ], ) async_add_entities(sensors)
async def async_setup_entry( opp: OpenPeerPower, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up the config entry.""" data_update_coordinator = get_data_update_coordinator(opp, config_entry) async_add_entities([ DeviceCover(config_entry, data_update_coordinator, door) for door in get_configured_doors(data_update_coordinator.data) ])