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

export const comelitDomain = "comelit";
export const comelitDefaultName = "Comelit SimpleHome";

export type TComelitRawData = TSimpleLocalRawData;
export interface IComelitSnapshot extends ISimpleLocalSnapshot {}
export interface IComelitConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantComelitConfig extends IComelitConfig {}

export const comelitProfile: ISimpleLocalIntegrationProfile = {
  domain: "comelit",
  displayName: "Comelit SimpleHome",
  manufacturer: "Comelit",
  model: "SimpleHome hub",
  defaultName: "Comelit SimpleHome",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "switch",
    "light",
    "cover",
    "sensor"
  ],
  serviceDomains: [
    "switch",
    "light",
    "cover"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle",
    "set_level",
    "open_cover",
    "close_cover",
    "stop_cover"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "comelit",
    "simplehome"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/comelit",
    upstreamDomain: "comelit",
    integrationType: "hub",
    iotClass: "local_polling",
    qualityScale: "platinum",
    requirements: [
      "aiocomelit==2.0.3"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@chemelli74"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle",
        "set_level",
        "open_cover",
        "close_cover",
        "stop_cover"
      ],
      platforms: [
        "switch",
        "light",
        "cover",
        "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"
      ]
    }
  }
};
