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

export const hisenseAehw4a1Domain = 'hisense_aehw4a1';
export const hisenseAehw4a1DefaultName = 'Hisense AEH-W4A1';

export type THisenseAehw4a1RawData = TSimpleLocalRawData;
export interface IHisenseAehw4a1Snapshot extends ISimpleLocalSnapshot {}
export interface IHisenseAehw4a1Config extends ISimpleLocalConfig {
  ipAddress?: string;
}
export interface IHomeAssistantHisenseAehw4a1Config extends IHisenseAehw4a1Config {}

export const hisenseAehw4a1Profile: ISimpleLocalIntegrationProfile = {
  domain: 'hisense_aehw4a1',
  displayName: 'Hisense AEH-W4A1',
  manufacturer: 'Hisense',
  model: 'AEH-W4A1',
  defaultName: hisenseAehw4a1DefaultName,
  defaultProtocol: 'local',
  status: 'read-only-runtime',
  platforms: [
    'climate',
  ],
  serviceDomains: [
    'climate',
  ],
  controlServices: [
    'set_temperature',
    'set_fan_mode',
    'set_hvac_mode',
    'set_preset_mode',
    'set_swing_mode',
    'turn_off',
    'turn_on',
  ],
  discoverySources: [
    'manual',
    'custom',
  ],
  discoveryKeywords: [
    'hisense',
    'aeh-w4a1',
    'aehw4a1',
    'air conditioner',
    'climate',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/hisense_aehw4a1',
    upstreamDomain: 'hisense_aehw4a1',
    integrationType: 'hub',
    iotClass: 'local_polling',
    qualityScale: undefined,
    requirements: [
      'pyaehw4a1==0.3.9',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      '@bannhead',
    ],
    configFlow: true,
    documentation: 'https://www.home-assistant.io/integrations/hisense_aehw4a1',
    platforms: [
      'climate',
    ],
    runtime: {
      type: 'read-only-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
        'set_temperature',
        'set_fan_mode',
        'set_hvac_mode',
        'set_preset_mode',
        'set_swing_mode',
        'turn_off',
        'turn_on',
      ],
      platforms: [
        'climate',
      ],
      controls: 'delegated only to an injected client.execute or commandExecutor',
    },
    localApi: {
      implemented: [
        'manual local setup for IP metadata, snapshots, raw pyaehw4a1 status data, snapshotProvider, and injected native clients',
        'runtime climate entity mapping for status_102_0 snapshots',
        'safe control delegation to injected client.execute or commandExecutor only',
      ],
      explicitUnsupported: [
        'native pyaehw4a1 discovery and command transport in this TypeScript package',
        'claiming climate command success without an injected client.execute or commandExecutor',
        'Home Assistant YAML import side effects',
      ],
    },
  },
};
