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

export const cpuspeedDomain = 'cpuspeed';
export const cpuspeedDefaultName = 'CPU Speed';

export type TCpuspeedRawData = TSimpleLocalRawData;
export interface ICpuspeedSnapshot extends ISimpleLocalSnapshot {}
export interface ICpuspeedConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantCpuspeedConfig extends ICpuspeedConfig {}

export const cpuspeedProfile: ISimpleLocalIntegrationProfile = {
  domain: 'cpuspeed',
  displayName: 'CPU Speed',
  defaultName: 'CPU Speed',
  defaultProtocol: 'local',
  status: 'read-only-runtime',
  platforms: [
    'sensor',
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    'manual',
    'custom',
  ],
  discoveryKeywords: [
    'cpu',
    'cpu speed',
    'cpuspeed',
    'processor',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/cpuspeed',
    upstreamDomain: 'cpuspeed',
    integrationType: 'device',
    iotClass: 'local_push',
    qualityScale: undefined,
    requirements: [
      'py-cpuinfo==9.0.0',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      '@fabaff',
    ],
    configFlow: true,
    runtime: {
      type: 'read-only-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
      ],
      platforms: [
        'sensor',
      ],
      controls: false,
    },
    localApi: {
      implemented: [
        'manual local CPU information setup',
        'snapshot, raw data, snapshotProvider, and injected native client operation',
      ],
      explicitUnsupported: [
        'claiming live command success without injected client.execute or commandExecutor',
        'remote API polling',
        'device-specific protocol features not represented by snapshot/rawData/client inputs',
      ],
    },
  },
};
