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

export const airtouch5Domain = "airtouch5";
export const airtouch5DefaultName = "AirTouch 5";

export type TAirtouch5RawData = TSimpleLocalRawData;
export interface IAirtouch5Snapshot extends ISimpleLocalSnapshot {}
export interface IAirtouch5Config extends ISimpleLocalConfig {}
export interface IHomeAssistantAirtouch5Config extends IAirtouch5Config {}

export const airtouch5Profile: ISimpleLocalIntegrationProfile = {
  domain: "airtouch5",
  displayName: "AirTouch 5",
  manufacturer: "AirTouch",
  model: "AirTouch 5",
  defaultName: "AirTouch 5",
  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: [
    "airtouch",
    "airtouch5",
    "hvac"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airtouch5",
    upstreamDomain: "airtouch5",
    integrationType: "hub",
    iotClass: "local_push",
    requirements: [
      "airtouch5py==0.4.0"
    ],
    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"
      ]
    }
  }
};
