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

export const altruistDomain = "altruist";
export const altruistDefaultName = "Altruist";

export type TAltruistRawData = TSimpleLocalRawData;
export interface IAltruistSnapshot extends ISimpleLocalSnapshot {}
export interface IAltruistConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAltruistConfig extends IAltruistConfig {}

export const altruistProfile: ISimpleLocalIntegrationProfile = {
  domain: "altruist",
  displayName: "Altruist",
  manufacturer: "Altruist",
  model: "local environmental sensor",
  defaultName: "Altruist",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "altruist",
    "environmental",
    "sensor"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/altruist",
    upstreamDomain: "altruist",
    integrationType: "device",
    iotClass: "local_polling",
    qualityScale: "bronze",
    requirements: [
      "altruistclient==0.1.1"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@airalab",
      "@LoSk-p"
    ],
    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"
      ]
    }
  }
};
