import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';

export const aprilaireDomain = "aprilaire";
export const aprilaireDefaultName = "AprilAire";

export type TAprilaireRawData = TSimpleLocalRawData;
export interface IAprilaireSnapshot extends ISimpleLocalSnapshot {}
export interface IAprilaireConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAprilaireConfig extends IAprilaireConfig {}

export const aprilaireProfile: ISimpleLocalIntegrationProfile = {
  domain: "aprilaire",
  displayName: "AprilAire",
  manufacturer: "AprilAire",
  model: "Thermostat",
  defaultName: "AprilAire",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "sensor"
  ],
  serviceDomains: [
    "climate"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode",
    "turn_on",
    "turn_off"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "aprilaire",
    "thermostat"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/aprilaire",
    upstreamDomain: "aprilaire",
    integrationType: "device",
    iotClass: "local_push",
    requirements: [
      "pyaprilaire==0.9.1"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "set_temperature",
        "set_hvac_mode",
        "turn_on",
        "turn_off"
      ],
      platforms: [
        "climate",
        "sensor"
      ],
      controls: true
    },
    localApi: {
      implemented: [
        "manual local endpoint setup",
        "snapshot, raw data, snapshotProvider, and injected native client operation",
        "generic HTTP/TCP local transport when config.path, config.transport, or documented defaults are supplied"
      ],
      explicitUnsupported: [
        "claiming live command success without injected client.execute or commandExecutor",
        "cloud account flows and remote API polling",
        "device-specific protocol features not represented by snapshot/rawData/client/executor inputs"
      ]
    }
  }
};
