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

export const adaxDomain = "adax";
export const adaxDefaultName = "Adax";

export type TAdaxRawData = TSimpleLocalRawData;
export interface IAdaxSnapshot extends ISimpleLocalSnapshot {}
export interface IAdaxConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAdaxConfig extends IAdaxConfig {}

export const adaxProfile: ISimpleLocalIntegrationProfile = {
  domain: "adax",
  displayName: "Adax",
  manufacturer: "Adax",
  model: "Local heater",
  defaultName: "Adax",
  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: [
    "adax",
    "heater"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/adax",
    upstreamDomain: "adax",
    iotClass: "local_polling",
    requirements: [
      "adax==0.4.0",
      "Adax-local==0.3.0"
    ],
    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"
      ]
    }
  }
};
