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

export const wemoDomain = "wemo";
export const wemoDefaultName = "Belkin WeMo";

export type TWemoRawData = TSimpleLocalRawData;
export interface IWemoSnapshot extends ISimpleLocalSnapshot {}
export interface IWemoConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantWemoConfig extends IWemoConfig {}

export const wemoProfile: ISimpleLocalIntegrationProfile = {
  domain: "wemo",
  displayName: "Belkin WeMo",
  manufacturer: "Belkin",
  model: "WeMo device",
  defaultName: "Belkin WeMo",
  defaultPort: 49153,
  defaultProtocol: "upnp",
  status: "control-runtime",
  platforms: [
    "switch",
    "sensor"
  ],
  serviceDomains: [
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "belkin",
    "wemo",
    "upnp"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/wemo",
    upstreamDomain: "wemo",
    iotClass: "local_push",
    requirements: [
      "pywemo==1.4.0"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@esev"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle"
      ],
      platforms: [
        "switch",
        "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"
      ]
    }
  }
};
