from fastapi import APIRouter, Query from app.controllers.equipment.ahu.supply_air_temperature_set import get_next_supply_air_temperature_set from app.controllers.equipment.ahu.thermal_mode import get_thermal_mode from app.models.domain.devices import DevicesInstructionsBaseResponse router = APIRouter() @router.get('/instructions/acatah/thermal-mode-set', response_model=DevicesInstructionsBaseResponse) async def get_acatah_thermal_mode_set( project_id: str = Query(..., max_length=50, regex='^Pj', alias='projectId'), device_id: str = Query(..., max_length=50, regex='^Eq', alias='equipId') ): thermal_mode = await get_thermal_mode(project_id, device_id) return { 'projectId': project_id, 'equipId': device_id, 'output': { 'thermalModeSet': thermal_mode } } @router.get('/instructions/acatah/supply-air-temperature-set', response_model=DevicesInstructionsBaseResponse) async def get_acatah_supply_air_temperature_set( project_id: str = Query(..., max_length=50, regex='^Pj', alias='projectId'), device_id: str = Query(..., max_length=50, regex='^Eq', alias='equipId') ): next_supply_air_temperature_set = await get_next_supply_air_temperature_set(project_id, device_id) return { 'projectId': project_id, 'equipId': device_id, 'output': { 'supplyAirTemperatureSet': next_supply_air_temperature_set } }