> ## Documentation Index
> Fetch the complete documentation index at: https://developer.energy-hub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# HVAC commands

> Returns pending commands for HVAC



## OpenAPI

````yaml get /v1.0.0/hvacs/{hvacId}/commands
openapi: 3.0.1
info:
  description: A service used for HVAC devices
  title: hvac-service
  version: 1.0.0
servers:
  - description: Generated server url
    url: https://api.energy-hub.io
security: []
paths:
  /v1.0.0/hvacs/{hvacId}/commands:
    get:
      tags:
        - Hvac Controller
      summary: HVAC commands
      description: Returns pending commands for HVAC
      operationId: getPendingHvacCommands_1
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: hvacId
          description: HVAC ID
          required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubmitCommandResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                UNAUTHORIZED:
                  $ref: '#/components/examples/UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                HVAC_NOT_FOUND:
                  $ref: '#/components/examples/HVAC_NOT_FOUND'
      security:
        - API_Key: []
components:
  schemas:
    SubmitCommandResponse:
      type: object
      required:
        - createdAt
        - deviceId
        - id
        - state
        - type
        - userId
      properties:
        createdAt:
          format: date-time
          description: The timestamp when command is created.
          type: string
        id:
          format: uuid
          description: The ID of the command.
          type: string
        state:
          $ref: '#/components/schemas/CommandState'
        type:
          description: The name of the command type to execute.
          type: string
          enum:
            - SET_TEMPERATURE
            - SET_MODE
            - SET_SCHEDULE
            - POWER_BOOST
        userId:
          description: The ID of the user.
          type: string
          example: 896f9d5a-b618-48a2-98ae-957059bf1bc9
        deviceId:
          format: uuid
          description: The ID of the vehicle.
          type: string
    ErrorMessageDto:
      type: object
      required:
        - errorCode
        - id
        - message
      properties:
        errorCode:
          description: The error code
          type: string
          example: EXAMPLE_ERROR_CODE
        id:
          format: uuid
          description: The error identifier
          type: string
          example: 7958818d-64d2-4ede-b12b-4786dd2f348b
        message:
          description: The error message
          type: string
          example: Example error message
    CommandState:
      description: |
        The state of the command.
        * `PENDING` - Command is waiting to be executed.
        * `FAILED` - Execution of command has failed.
        * `EXECUTED` - Command has been executed successfully.
      type: string
      enum:
        - PENDING
        - EXECUTED
        - FAILED
  examples:
    UNAUTHORIZED:
      value:
        errorCode: UNAUTHORIZED
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: Unauthorized
    HVAC_NOT_FOUND:
      value:
        errorCode: HVAC_NOT_FOUND
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[HVAC] HVAC not found'
  securitySchemes:
    API_Key:
      in: header
      name: X-API-KEY
      description: API key used for authorization and authentication.
      type: apiKey

````