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

export const apsystemsDomain = "apsystems";
export const apsystemsDefaultName = "APsystems";

export type TApsystemsRawData = TSimpleLocalRawData;
export interface IApsystemsSnapshot extends ISimpleLocalSnapshot {}
export interface IApsystemsConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantApsystemsConfig extends IApsystemsConfig {}

export const apsystemsProfile: ISimpleLocalIntegrationProfile = {
  domain: "apsystems",
  displayName: "APsystems",
  manufacturer: "APsystems",
  model: "EZ1 inverter",
  defaultName: "APsystems",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "apsystems",
    "ez1",
    "solar",
    "inverter"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/apsystems",
    upstreamDomain: "apsystems",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "apsystems-ez1==2.7.0"
    ],
    dependencies: [],
    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"
      ]
    }
  }
};
