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

export const awairDomain = "awair";
export const awairDefaultName = "Awair";

export type TAwairRawData = TSimpleLocalRawData;
export interface IAwairSnapshot extends ISimpleLocalSnapshot {}
export interface IAwairConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAwairConfig extends IAwairConfig {}

export const awairProfile: ISimpleLocalIntegrationProfile = {
  domain: "awair",
  displayName: "Awair",
  manufacturer: "Awair",
  model: "Air quality monitor",
  defaultName: "Awair",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "awair",
    "air quality"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/awair",
    upstreamDomain: "awair",
    iotClass: "local_polling",
    requirements: [
      "python-awair==0.2.5"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@ahayworth",
      "@ricohageman"
    ],
    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"
      ]
    }
  }
};
