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

export const advantageAirDomain = "advantage_air";
export const advantageAirDefaultName = "Advantage Air";

export type TAdvantageAirRawData = TSimpleLocalRawData;
export interface IAdvantageAirSnapshot extends ISimpleLocalSnapshot {}
export interface IAdvantageAirConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAdvantageAirConfig extends IAdvantageAirConfig {}

export const advantageAirProfile: ISimpleLocalIntegrationProfile = {
  domain: "advantage_air",
  displayName: "Advantage Air",
  manufacturer: "Advantage Air",
  model: "HVAC controller",
  defaultName: "Advantage Air",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "fan",
    "sensor"
  ],
  serviceDomains: [
    "climate",
    "fan"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode",
    "set_percentage",
    "turn_on",
    "turn_off"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "advantage air",
    "myair",
    "myplace"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/advantage_air",
    upstreamDomain: "advantage_air",
    integrationType: "hub",
    iotClass: "local_polling",
    requirements: [
      "advantage-air==0.4.4"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "set_temperature",
        "set_hvac_mode",
        "set_percentage",
        "turn_on",
        "turn_off"
      ],
      platforms: [
        "climate",
        "fan",
        "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"
      ]
    }
  }
};
