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

export const atenPeDomain = "aten_pe";
export const atenPeDefaultName = "ATEN Rack PDU";

export type TAtenPeRawData = TSimpleLocalRawData;
export interface IAtenPeSnapshot extends ISimpleLocalSnapshot {}
export interface IAtenPeConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAtenPeConfig extends IAtenPeConfig {}

export const atenPeProfile: ISimpleLocalIntegrationProfile = {
  domain: "aten_pe",
  displayName: "ATEN Rack PDU",
  manufacturer: "ATEN",
  model: "Rack PDU",
  defaultName: "ATEN Rack PDU",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "switch",
    "sensor"
  ],
  serviceDomains: [
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "aten",
    "pdu",
    "rack"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/aten_pe",
    upstreamDomain: "aten_pe",
    iotClass: "local_polling",
    qualityScale: "legacy",
    requirements: [
      "atenpdu==0.3.2"
    ],
    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"
      ]
    }
  }
};
