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

export const yardianDomain = "yardian";
export const yardianDefaultName = "Yardian";

export type TYardianRawData = TSimpleLocalRawData;
export interface IYardianSnapshot extends ISimpleLocalSnapshot {}
export interface IYardianConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantYardianConfig extends IYardianConfig {}

export const yardianProfile: ISimpleLocalIntegrationProfile = {
  domain: "yardian",
  displayName: "Yardian",
  manufacturer: "Aeon Matrix",
  model: "Yardian",
  defaultName: "Yardian",
  defaultPort: 80,
  defaultProtocol: "http",
  status: "control-runtime",
  platforms: [
    "switch",
    "sensor"
  ],
  serviceDomains: [
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "yardian",
    "sprinkler",
    "irrigation"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/yardian",
    upstreamDomain: "yardian",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "pyyardian==1.1.1"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@h3l1o5"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle"
      ],
      platforms: [
        "switch",
        "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"
      ]
    }
  }
};
