devices.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. from enum import Enum
  2. from typing import Dict, List, Optional
  3. from pydantic import BaseModel
  4. class ThermalMode(str, Enum):
  5. cooling = 'cooling'
  6. heating = 'heating'
  7. hold = 'hold'
  8. class DevicesInstructionsBaseResponse(BaseModel):
  9. projectId: str
  10. equipId: str
  11. output: Dict
  12. class DevicesEarlyStartTime(BaseModel):
  13. projectId: str
  14. spaceId: str
  15. minutes: float
  16. class ACATVIInstructionsRequest(BaseModel):
  17. return_air_temp: float
  18. space_temp_target: float
  19. space_realtime_temp: float
  20. class ACATVIInstructionsTemporaryResponse(BaseModel):
  21. output: Dict
  22. class ACATVIInstructionsResponse(BaseModel):
  23. switch_set: Optional[str]
  24. speed_set: Optional[str]
  25. temperature_set: Optional[str]
  26. mode_set: Optional[str]
  27. class ACATFCInstructionsRequest(BaseModel):
  28. season: str
  29. supply_air_temperature: Optional[float]
  30. water_in_temperature: Optional[float]
  31. space_temperature_target: float
  32. space_realtime_temperature: Optional[float]
  33. class ACATFCInstructionsResponse(BaseModel):
  34. switch_set: int
  35. speed_set: int
  36. temperature_set: float
  37. mode_set: int
  38. water_valve_switch_set: int
  39. class Space(BaseModel):
  40. realtime_temperature: float
  41. temperature_target: float
  42. vav_default_weight: float
  43. vav_temporary_weight: float
  44. vav_temporary_update_time: str
  45. class ACATVAInstructionsRequest(BaseModel):
  46. season: str
  47. supply_air_temperature: float
  48. supply_air_flow: float
  49. supply_air_flow_lower_limit: float
  50. supply_air_flow_upper_limit: float
  51. spaces: List[Space]
  52. class ACATVAInstructionsResponse(BaseModel):
  53. supply_air_flow_set: float
  54. virtual_target_temperature_set: float
  55. virtual_realtime_temperature: float