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

export const airobotDomain = "airobot";
export const airobotDefaultName = "Airobot";

export type TAirobotRawData = TSimpleLocalRawData;
export interface IAirobotSnapshot extends ISimpleLocalSnapshot {}
export interface IAirobotConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAirobotConfig extends IAirobotConfig {}

export const airobotProfile: ISimpleLocalIntegrationProfile = {
  domain: "airobot",
  displayName: "Airobot",
  manufacturer: "Airobot",
  model: "Ventilation unit",
  defaultName: "Airobot",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "fan",
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [
    "fan"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "set_percentage"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "airobot",
    "ventilation"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airobot",
    upstreamDomain: "airobot",
    integrationType: "device",
    iotClass: "local_polling",
    qualityScale: "platinum",
    requirements: [
      "pyairobotrest==0.3.0"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "set_percentage"
      ],
      platforms: [
        "fan",
        "sensor",
        "binary_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"
      ]
    }
  }
};
