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

export const atagDomain = "atag";
export const atagDefaultName = "Atag";

export type TAtagRawData = TSimpleLocalRawData;
export interface IAtagSnapshot extends ISimpleLocalSnapshot {}
export interface IAtagConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAtagConfig extends IAtagConfig {}

export const atagProfile: ISimpleLocalIntegrationProfile = {
  domain: "atag",
  displayName: "Atag",
  manufacturer: "Atag",
  model: "Heating gateway",
  defaultName: "Atag",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "sensor"
  ],
  serviceDomains: [
    "climate"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "atag",
    "boiler",
    "thermostat"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/atag",
    upstreamDomain: "atag",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "pyatag==0.3.5.3"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "set_temperature",
        "set_hvac_mode"
      ],
      platforms: [
        "climate",
        "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"
      ]
    }
  }
};
