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

export const aveaDomain = "avea";
export const aveaDefaultName = "Elgato Avea";

export type TAveaRawData = TSimpleLocalRawData;
export interface IAveaSnapshot extends ISimpleLocalSnapshot {}
export interface IAveaConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAveaConfig extends IAveaConfig {}

export const aveaProfile: ISimpleLocalIntegrationProfile = {
  domain: "avea",
  displayName: "Elgato Avea",
  manufacturer: "Elgato",
  model: "Avea light",
  defaultName: "Elgato Avea",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "light",
    "sensor"
  ],
  serviceDomains: [
    "light"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle",
    "set_level"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "elgato",
    "avea",
    "light"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/avea",
    upstreamDomain: "avea",
    iotClass: "local_polling",
    qualityScale: "legacy",
    requirements: [
      "Avea==1.6.1"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@pattyland"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle",
        "set_level"
      ],
      platforms: [
        "light",
        "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"
      ]
    }
  }
};
