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

export const auroraAbbPoweroneDomain = "aurora_abb_powerone";
export const auroraAbbPoweroneDefaultName = "Aurora ABB PowerOne Solar PV";

export type TAuroraAbbPoweroneRawData = TSimpleLocalRawData;
export interface IAuroraAbbPoweroneSnapshot extends ISimpleLocalSnapshot {}
export interface IAuroraAbbPoweroneConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAuroraAbbPoweroneConfig extends IAuroraAbbPoweroneConfig {}

export const auroraAbbPoweroneProfile: ISimpleLocalIntegrationProfile = {
  domain: "aurora_abb_powerone",
  displayName: "Aurora ABB PowerOne Solar PV",
  manufacturer: "ABB",
  model: "Aurora PowerOne inverter",
  defaultName: "Aurora ABB PowerOne Solar PV",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "aurora",
    "abb",
    "powerone",
    "solar"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/aurora_abb_powerone",
    upstreamDomain: "aurora_abb_powerone",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "aurorapy==0.2.7"
    ],
    dependencies: [
      "usb"
    ],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "read-only-runtime",
      services: [
        "snapshot",
        "status",
        "refresh"
      ],
      platforms: [
        "sensor",
        "binary_sensor"
      ],
      controls: false
    },
    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"
      ]
    }
  }
};
