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

export const acmedaDomain = "acmeda";
export const acmedaDefaultName = "Rollease Acmeda Automate";

export type TAcmedaRawData = TSimpleLocalRawData;
export interface IAcmedaSnapshot extends ISimpleLocalSnapshot {}
export interface IAcmedaConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAcmedaConfig extends IAcmedaConfig {}

export const acmedaProfile: ISimpleLocalIntegrationProfile = {
  domain: "acmeda",
  displayName: "Rollease Acmeda Automate",
  manufacturer: "Rollease Acmeda",
  model: "Automate Pulse",
  defaultName: "Rollease Acmeda Automate",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "cover",
    "sensor"
  ],
  serviceDomains: [
    "cover"
  ],
  controlServices: [
    "open_cover",
    "close_cover",
    "stop_cover",
    "set_cover_position"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "rollease",
    "acmeda",
    "automate",
    "pulse"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/acmeda",
    upstreamDomain: "acmeda",
    iotClass: "local_push",
    requirements: [
      "aiopulse==0.4.6"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "open_cover",
        "close_cover",
        "stop_cover",
        "set_cover_position"
      ],
      platforms: [
        "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"
      ]
    }
  }
};
