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

export const airzoneDomain = "airzone";
export const airzoneDefaultName = "Airzone";

export type TAirzoneRawData = TSimpleLocalRawData;
export interface IAirzoneSnapshot extends ISimpleLocalSnapshot {}
export interface IAirzoneConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAirzoneConfig extends IAirzoneConfig {}

export const airzoneProfile: ISimpleLocalIntegrationProfile = {
  domain: "airzone",
  displayName: "Airzone",
  manufacturer: "Airzone",
  model: "HVAC hub",
  defaultName: "Airzone",
  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: [
    "airzone",
    "hvac",
    "zone"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airzone",
    upstreamDomain: "airzone",
    integrationType: "hub",
    iotClass: "local_polling",
    requirements: [
      "aioairzone==1.0.5"
    ],
    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"
      ]
    }
  }
};
