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

export const venstarDomain = "venstar";
export const venstarDefaultName = "Venstar";

export type TVenstarRawData = TSimpleLocalRawData;
export interface IVenstarSnapshot extends ISimpleLocalSnapshot {}
export interface IVenstarConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantVenstarConfig extends IVenstarConfig {}

export const venstarProfile: ISimpleLocalIntegrationProfile = {
  domain: "venstar",
  displayName: "Venstar",
  manufacturer: "Venstar",
  model: "ColorTouch thermostat",
  defaultName: "Venstar",
  defaultPort: 80,
  defaultHttpPath: "/query/info",
  defaultProtocol: "http",
  status: "control-runtime",
  platforms: [
    "climate",
    "sensor"
  ],
  serviceDomains: [
    "climate"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "venstar",
    "colortouch",
    "thermostat"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/venstar",
    upstreamDomain: "venstar",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "venstarcolortouch==0.21"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@garbled1",
      "@jhollowe"
    ],
    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"
      ]
    }
  }
};
