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

export const bryantEvolutionDomain = "bryant_evolution";
export const bryantEvolutionDefaultName = "Bryant Evolution";

export type TBryantEvolutionRawData = TSimpleLocalRawData;
export interface IBryantEvolutionSnapshot extends ISimpleLocalSnapshot {}
export interface IBryantEvolutionConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantBryantEvolutionConfig extends IBryantEvolutionConfig {}

export const bryantEvolutionProfile: ISimpleLocalIntegrationProfile = {
  domain: "bryant_evolution",
  displayName: "Bryant Evolution",
  manufacturer: "Bryant",
  model: "Evolution thermostat",
  defaultName: "Bryant Evolution",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "sensor"
  ],
  serviceDomains: [
    "climate"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode",
    "turn_on",
    "turn_off"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "bryant",
    "evolution",
    "thermostat"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/bryant_evolution",
    upstreamDomain: "bryant_evolution",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "evolutionhttp==0.0.18"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@danielsmyers"
    ],
    configFlow: true,
    sample: {
      temperature: 21.3,
      target_temperature: 22,
      mode: "heat"
    },
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "set_temperature",
        "set_hvac_mode",
        "turn_on",
        "turn_off"
      ],
      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"
      ]
    }
  }
};
