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

export const airvisualProDomain = "airvisual_pro";
export const airvisualProDefaultName = "AirVisual Pro";

export type TAirvisualProRawData = TSimpleLocalRawData;
export interface IAirvisualProSnapshot extends ISimpleLocalSnapshot {}
export interface IAirvisualProConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAirvisualProConfig extends IAirvisualProConfig {}

export const airvisualProProfile: ISimpleLocalIntegrationProfile = {
  domain: "airvisual_pro",
  displayName: "AirVisual Pro",
  manufacturer: "IQAir",
  model: "AirVisual Pro",
  defaultName: "AirVisual Pro",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "airvisual",
    "iqair",
    "air quality"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airvisual_pro",
    upstreamDomain: "airvisual_pro",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "pyairvisual==2023.08.1"
    ],
    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"
      ]
    }
  }
};
