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

export const anelPwrctrlDomain = "anel_pwrctrl";
export const anelPwrctrlDefaultName = "Anel NET-PwrCtrl";

export type TAnelPwrctrlRawData = TSimpleLocalRawData;
export interface IAnelPwrctrlSnapshot extends ISimpleLocalSnapshot {}
export interface IAnelPwrctrlConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAnelPwrctrlConfig extends IAnelPwrctrlConfig {}

export const anelPwrctrlProfile: ISimpleLocalIntegrationProfile = {
  domain: "anel_pwrctrl",
  displayName: "Anel NET-PwrCtrl",
  manufacturer: "Anel",
  model: "NET-PwrCtrl",
  defaultName: "Anel NET-PwrCtrl",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "switch",
    "sensor"
  ],
  serviceDomains: [
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "anel",
    "pwrctrl",
    "pdu"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/anel_pwrctrl",
    upstreamDomain: "anel_pwrctrl",
    iotClass: "local_polling",
    qualityScale: "legacy",
    requirements: [
      "anel-pwrctrl-homeassistant==0.0.1.dev2"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    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"
      ]
    }
  }
};
