Add native local connectivity integrations
This commit is contained in:
+60
@@ -21,12 +21,14 @@ import { Airtouch5Integration } from './integrations/airtouch5/index.js';
|
||||
import { AirvisualProIntegration } from './integrations/airvisual_pro/index.js';
|
||||
import { AirzoneIntegration } from './integrations/airzone/index.js';
|
||||
import { AlarmdecoderIntegration } from './integrations/alarmdecoder/index.js';
|
||||
import { AltruistIntegration } from './integrations/altruist/index.js';
|
||||
import { AmcrestIntegration } from './integrations/amcrest/index.js';
|
||||
import { AndroidIpWebcamIntegration } from './integrations/android_ip_webcam/index.js';
|
||||
import { AndroidtvIntegration } from './integrations/androidtv/index.js';
|
||||
import { AndroidtvRemoteIntegration } from './integrations/androidtv_remote/index.js';
|
||||
import { AnelPwrctrlIntegration } from './integrations/anel_pwrctrl/index.js';
|
||||
import { AnthemavIntegration } from './integrations/anthemav/index.js';
|
||||
import { ApacheKafkaIntegration } from './integrations/apache_kafka/index.js';
|
||||
import { ApcupsdIntegration } from './integrations/apcupsd/index.js';
|
||||
import { AppleTvIntegration } from './integrations/apple_tv/index.js';
|
||||
import { AprilaireIntegration } from './integrations/aprilaire/index.js';
|
||||
@@ -38,23 +40,51 @@ import { ArcamFmjIntegration } from './integrations/arcam_fmj/index.js';
|
||||
import { ArestIntegration } from './integrations/arest/index.js';
|
||||
import { ArrisTg2492lgIntegration } from './integrations/arris_tg2492lg/index.js';
|
||||
import { ArubaIntegration } from './integrations/aruba/index.js';
|
||||
import { ArwnIntegration } from './integrations/arwn/index.js';
|
||||
import { AsuswrtIntegration } from './integrations/asuswrt/index.js';
|
||||
import { AtagIntegration } from './integrations/atag/index.js';
|
||||
import { AtenPeIntegration } from './integrations/aten_pe/index.js';
|
||||
import { AuroraAbbPoweroneIntegration } from './integrations/aurora_abb_powerone/index.js';
|
||||
import { AveaIntegration } from './integrations/avea/index.js';
|
||||
import { AwairIntegration } from './integrations/awair/index.js';
|
||||
import { AxisIntegration } from './integrations/axis/index.js';
|
||||
import { BafIntegration } from './integrations/baf/index.js';
|
||||
import { BalboaIntegration } from './integrations/balboa/index.js';
|
||||
import { BangOlufsenIntegration } from './integrations/bang_olufsen/index.js';
|
||||
import { BboxIntegration } from './integrations/bbox/index.js';
|
||||
import { BeewiSmartclimIntegration } from './integrations/beewi_smartclim/index.js';
|
||||
import { BlackbirdIntegration } from './integrations/blackbird/index.js';
|
||||
import { BleboxIntegration } from './integrations/blebox/index.js';
|
||||
import { BlinksticklightIntegration } from './integrations/blinksticklight/index.js';
|
||||
import { BluemaestroIntegration } from './integrations/bluemaestro/index.js';
|
||||
import { BluesoundIntegration } from './integrations/bluesound/index.js';
|
||||
import { BluetoothLeTrackerIntegration } from './integrations/bluetooth_le_tracker/index.js';
|
||||
import { BondIntegration } from './integrations/bond/index.js';
|
||||
import { BoschAlarmIntegration } from './integrations/bosch_alarm/index.js';
|
||||
import { BoschShcIntegration } from './integrations/bosch_shc/index.js';
|
||||
import { BraviatvIntegration } from './integrations/braviatv/index.js';
|
||||
import { BroadlinkIntegration } from './integrations/broadlink/index.js';
|
||||
import { BrotherIntegration } from './integrations/brother/index.js';
|
||||
import { BryantEvolutionIntegration } from './integrations/bryant_evolution/index.js';
|
||||
import { BsblanIntegration } from './integrations/bsblan/index.js';
|
||||
import { BtHomeHub5Integration } from './integrations/bt_home_hub_5/index.js';
|
||||
import { BtSmarthubIntegration } from './integrations/bt_smarthub/index.js';
|
||||
import { BthomeIntegration } from './integrations/bthome/index.js';
|
||||
import { CambridgeAudioIntegration } from './integrations/cambridge_audio/index.js';
|
||||
import { CasperGlowIntegration } from './integrations/casper_glow/index.js';
|
||||
import { CastIntegration } from './integrations/cast/index.js';
|
||||
import { Ccm15Integration } from './integrations/ccm15/index.js';
|
||||
import { ChannelsIntegration } from './integrations/channels/index.js';
|
||||
import { CiscoIosIntegration } from './integrations/cisco_ios/index.js';
|
||||
import { CiscoMobilityExpressIntegration } from './integrations/cisco_mobility_express/index.js';
|
||||
import { ClementineIntegration } from './integrations/clementine/index.js';
|
||||
import { CmusIntegration } from './integrations/cmus/index.js';
|
||||
import { ComelitIntegration } from './integrations/comelit/index.js';
|
||||
import { ComfoconnectIntegration } from './integrations/comfoconnect/index.js';
|
||||
import { Concord232Integration } from './integrations/concord232/index.js';
|
||||
import { Control4Integration } from './integrations/control4/index.js';
|
||||
import { CoolmasterIntegration } from './integrations/coolmaster/index.js';
|
||||
import { CppmTrackerIntegration } from './integrations/cppm_tracker/index.js';
|
||||
import { DaikinIntegration } from './integrations/daikin/index.js';
|
||||
import { DdwrtIntegration } from './integrations/ddwrt/index.js';
|
||||
import { DeconzIntegration } from './integrations/deconz/index.js';
|
||||
@@ -192,12 +222,14 @@ export const integrations = [
|
||||
new AirvisualProIntegration(),
|
||||
new AirzoneIntegration(),
|
||||
new AlarmdecoderIntegration(),
|
||||
new AltruistIntegration(),
|
||||
new AmcrestIntegration(),
|
||||
new AndroidIpWebcamIntegration(),
|
||||
new AndroidtvIntegration(),
|
||||
new AndroidtvRemoteIntegration(),
|
||||
new AnelPwrctrlIntegration(),
|
||||
new AnthemavIntegration(),
|
||||
new ApacheKafkaIntegration(),
|
||||
new ApcupsdIntegration(),
|
||||
new AppleTvIntegration(),
|
||||
new AprilaireIntegration(),
|
||||
@@ -209,23 +241,51 @@ export const integrations = [
|
||||
new ArestIntegration(),
|
||||
new ArrisTg2492lgIntegration(),
|
||||
new ArubaIntegration(),
|
||||
new ArwnIntegration(),
|
||||
new AsuswrtIntegration(),
|
||||
new AtagIntegration(),
|
||||
new AtenPeIntegration(),
|
||||
new AuroraAbbPoweroneIntegration(),
|
||||
new AveaIntegration(),
|
||||
new AwairIntegration(),
|
||||
new AxisIntegration(),
|
||||
new BafIntegration(),
|
||||
new BalboaIntegration(),
|
||||
new BangOlufsenIntegration(),
|
||||
new BboxIntegration(),
|
||||
new BeewiSmartclimIntegration(),
|
||||
new BlackbirdIntegration(),
|
||||
new BleboxIntegration(),
|
||||
new BlinksticklightIntegration(),
|
||||
new BluemaestroIntegration(),
|
||||
new BluesoundIntegration(),
|
||||
new BluetoothLeTrackerIntegration(),
|
||||
new BondIntegration(),
|
||||
new BoschAlarmIntegration(),
|
||||
new BoschShcIntegration(),
|
||||
new BraviatvIntegration(),
|
||||
new BroadlinkIntegration(),
|
||||
new BrotherIntegration(),
|
||||
new BryantEvolutionIntegration(),
|
||||
new BsblanIntegration(),
|
||||
new BtHomeHub5Integration(),
|
||||
new BtSmarthubIntegration(),
|
||||
new BthomeIntegration(),
|
||||
new CambridgeAudioIntegration(),
|
||||
new CasperGlowIntegration(),
|
||||
new CastIntegration(),
|
||||
new Ccm15Integration(),
|
||||
new ChannelsIntegration(),
|
||||
new CiscoIosIntegration(),
|
||||
new CiscoMobilityExpressIntegration(),
|
||||
new ClementineIntegration(),
|
||||
new CmusIntegration(),
|
||||
new ComelitIntegration(),
|
||||
new ComfoconnectIntegration(),
|
||||
new Concord232Integration(),
|
||||
new Control4Integration(),
|
||||
new CoolmasterIntegration(),
|
||||
new CppmTrackerIntegration(),
|
||||
new DaikinIntegration(),
|
||||
new DdwrtIntegration(),
|
||||
new DeconzIntegration(),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IAltruistConfig } from './altruist.types.js';
|
||||
import { altruistProfile } from './altruist.types.js';
|
||||
|
||||
export class AltruistClient extends SimpleLocalClient<IAltruistConfig> {
|
||||
constructor(configArg: IAltruistConfig) {
|
||||
super(altruistProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IAltruistConfig } from './altruist.types.js';
|
||||
import { altruistProfile } from './altruist.types.js';
|
||||
|
||||
export class AltruistConfigFlow extends SimpleLocalConfigFlow<IAltruistConfig> {
|
||||
constructor() {
|
||||
super(altruistProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { AltruistConfigFlow } from './altruist.classes.configflow.js';
|
||||
import { createAltruistDiscoveryDescriptor } from './altruist.discovery.js';
|
||||
import type { IAltruistConfig } from './altruist.types.js';
|
||||
import { altruistDomain, altruistProfile } from './altruist.types.js';
|
||||
|
||||
export class AltruistIntegration extends SimpleLocalIntegration<IAltruistConfig> {
|
||||
public readonly domain = altruistDomain;
|
||||
public readonly discoveryDescriptor = createAltruistDiscoveryDescriptor();
|
||||
public readonly configFlow = new AltruistConfigFlow();
|
||||
|
||||
export class HomeAssistantAltruistIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "altruist",
|
||||
displayName: "Altruist",
|
||||
status: 'descriptor-only',
|
||||
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"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(altruistProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantAltruistIntegration extends AltruistIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { altruistProfile } from './altruist.types.js';
|
||||
|
||||
export const createAltruistDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(altruistProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IAltruistConfig } from './altruist.types.js';
|
||||
import { altruistProfile } from './altruist.types.js';
|
||||
|
||||
export class AltruistMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IAltruistConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: altruistProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IAltruistConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: altruistProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(altruistProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(altruistProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,80 @@
|
||||
export interface IHomeAssistantAltruistConfig {
|
||||
// TODO: replace with the TypeScript-native config for altruist.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './altruist.classes.client.js';
|
||||
export * from './altruist.classes.configflow.js';
|
||||
export * from './altruist.classes.integration.js';
|
||||
export * from './altruist.discovery.js';
|
||||
export * from './altruist.mapper.js';
|
||||
export * from './altruist.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IApacheKafkaConfig } from './apache_kafka.types.js';
|
||||
import { apacheKafkaProfile } from './apache_kafka.types.js';
|
||||
|
||||
export class ApacheKafkaClient extends SimpleLocalClient<IApacheKafkaConfig> {
|
||||
constructor(configArg: IApacheKafkaConfig) {
|
||||
super(apacheKafkaProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IApacheKafkaConfig } from './apache_kafka.types.js';
|
||||
import { apacheKafkaProfile } from './apache_kafka.types.js';
|
||||
|
||||
export class ApacheKafkaConfigFlow extends SimpleLocalConfigFlow<IApacheKafkaConfig> {
|
||||
constructor() {
|
||||
super(apacheKafkaProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { ApacheKafkaConfigFlow } from './apache_kafka.classes.configflow.js';
|
||||
import { createApacheKafkaDiscoveryDescriptor } from './apache_kafka.discovery.js';
|
||||
import type { IApacheKafkaConfig } from './apache_kafka.types.js';
|
||||
import { apacheKafkaDomain, apacheKafkaProfile } from './apache_kafka.types.js';
|
||||
|
||||
export class ApacheKafkaIntegration extends SimpleLocalIntegration<IApacheKafkaConfig> {
|
||||
public readonly domain = apacheKafkaDomain;
|
||||
public readonly discoveryDescriptor = createApacheKafkaDiscoveryDescriptor();
|
||||
public readonly configFlow = new ApacheKafkaConfigFlow();
|
||||
|
||||
export class HomeAssistantApacheKafkaIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "apache_kafka",
|
||||
displayName: "Apache Kafka",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/apache_kafka",
|
||||
"upstreamDomain": "apache_kafka",
|
||||
"iotClass": "local_push",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"aiokafka==0.10.0"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@bachya"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(apacheKafkaProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantApacheKafkaIntegration extends ApacheKafkaIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { apacheKafkaProfile } from './apache_kafka.types.js';
|
||||
|
||||
export const createApacheKafkaDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(apacheKafkaProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IApacheKafkaConfig } from './apache_kafka.types.js';
|
||||
import { apacheKafkaProfile } from './apache_kafka.types.js';
|
||||
|
||||
export class ApacheKafkaMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IApacheKafkaConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: apacheKafkaProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IApacheKafkaConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: apacheKafkaProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(apacheKafkaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(apacheKafkaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,86 @@
|
||||
export interface IHomeAssistantApacheKafkaConfig {
|
||||
// TODO: replace with the TypeScript-native config for apache_kafka.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const apacheKafkaDomain = "apache_kafka";
|
||||
export const apacheKafkaDefaultName = "Apache Kafka";
|
||||
|
||||
export type TApacheKafkaRawData = TSimpleLocalRawData;
|
||||
export interface IApacheKafkaSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IApacheKafkaConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantApacheKafkaConfig extends IApacheKafkaConfig {}
|
||||
|
||||
export const apacheKafkaProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "apache_kafka",
|
||||
displayName: "Apache Kafka",
|
||||
manufacturer: "Apache",
|
||||
model: "Kafka broker",
|
||||
defaultName: "Apache Kafka",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [
|
||||
"apache_kafka"
|
||||
],
|
||||
controlServices: [
|
||||
"publish",
|
||||
"send_message"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"kafka",
|
||||
"broker",
|
||||
"topic"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/apache_kafka",
|
||||
upstreamDomain: "apache_kafka",
|
||||
integrationType: "service",
|
||||
iotClass: "local_push",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"aiokafka==0.10.0"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@bachya"
|
||||
],
|
||||
configFlow: true,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"publish",
|
||||
"send_message"
|
||||
],
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './apache_kafka.classes.client.js';
|
||||
export * from './apache_kafka.classes.configflow.js';
|
||||
export * from './apache_kafka.classes.integration.js';
|
||||
export * from './apache_kafka.discovery.js';
|
||||
export * from './apache_kafka.mapper.js';
|
||||
export * from './apache_kafka.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IArwnConfig } from './arwn.types.js';
|
||||
import { arwnProfile } from './arwn.types.js';
|
||||
|
||||
export class ArwnClient extends SimpleLocalClient<IArwnConfig> {
|
||||
constructor(configArg: IArwnConfig) {
|
||||
super(arwnProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IArwnConfig } from './arwn.types.js';
|
||||
import { arwnProfile } from './arwn.types.js';
|
||||
|
||||
export class ArwnConfigFlow extends SimpleLocalConfigFlow<IArwnConfig> {
|
||||
constructor() {
|
||||
super(arwnProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { ArwnConfigFlow } from './arwn.classes.configflow.js';
|
||||
import { createArwnDiscoveryDescriptor } from './arwn.discovery.js';
|
||||
import type { IArwnConfig } from './arwn.types.js';
|
||||
import { arwnDomain, arwnProfile } from './arwn.types.js';
|
||||
|
||||
export class ArwnIntegration extends SimpleLocalIntegration<IArwnConfig> {
|
||||
public readonly domain = arwnDomain;
|
||||
public readonly discoveryDescriptor = createArwnDiscoveryDescriptor();
|
||||
public readonly configFlow = new ArwnConfigFlow();
|
||||
|
||||
export class HomeAssistantArwnIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "arwn",
|
||||
displayName: "Ambient Radio Weather Network",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/arwn",
|
||||
"upstreamDomain": "arwn",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [],
|
||||
"dependencies": [
|
||||
"mqtt"
|
||||
],
|
||||
"afterDependencies": [],
|
||||
"codeowners": []
|
||||
},
|
||||
});
|
||||
super(arwnProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantArwnIntegration extends ArwnIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { arwnProfile } from './arwn.types.js';
|
||||
|
||||
export const createArwnDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(arwnProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IArwnConfig } from './arwn.types.js';
|
||||
import { arwnProfile } from './arwn.types.js';
|
||||
|
||||
export class ArwnMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IArwnConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: arwnProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IArwnConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: arwnProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(arwnProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(arwnProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,78 @@
|
||||
export interface IHomeAssistantArwnConfig {
|
||||
// TODO: replace with the TypeScript-native config for arwn.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const arwnDomain = "arwn";
|
||||
export const arwnDefaultName = "Ambient Radio Weather Network";
|
||||
|
||||
export type TArwnRawData = TSimpleLocalRawData;
|
||||
export interface IArwnSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IArwnConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantArwnConfig extends IArwnConfig {}
|
||||
|
||||
export const arwnProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "arwn",
|
||||
displayName: "Ambient Radio Weather Network",
|
||||
manufacturer: "Ambient",
|
||||
model: "Radio weather receiver",
|
||||
defaultName: "Ambient Radio Weather Network",
|
||||
defaultProtocol: "local",
|
||||
status: "read-only-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [],
|
||||
controlServices: [],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"ambient",
|
||||
"radio",
|
||||
"weather",
|
||||
"arwn"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/arwn",
|
||||
upstreamDomain: "arwn",
|
||||
integrationType: "device",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [],
|
||||
dependencies: [
|
||||
"mqtt"
|
||||
],
|
||||
afterDependencies: [],
|
||||
codeowners: [],
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './arwn.classes.client.js';
|
||||
export * from './arwn.classes.configflow.js';
|
||||
export * from './arwn.classes.integration.js';
|
||||
export * from './arwn.discovery.js';
|
||||
export * from './arwn.mapper.js';
|
||||
export * from './arwn.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IAveaConfig } from './avea.types.js';
|
||||
import { aveaProfile } from './avea.types.js';
|
||||
|
||||
export class AveaClient extends SimpleLocalClient<IAveaConfig> {
|
||||
constructor(configArg: IAveaConfig) {
|
||||
super(aveaProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IAveaConfig } from './avea.types.js';
|
||||
import { aveaProfile } from './avea.types.js';
|
||||
|
||||
export class AveaConfigFlow extends SimpleLocalConfigFlow<IAveaConfig> {
|
||||
constructor() {
|
||||
super(aveaProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { AveaConfigFlow } from './avea.classes.configflow.js';
|
||||
import { createAveaDiscoveryDescriptor } from './avea.discovery.js';
|
||||
import type { IAveaConfig } from './avea.types.js';
|
||||
import { aveaDomain, aveaProfile } from './avea.types.js';
|
||||
|
||||
export class AveaIntegration extends SimpleLocalIntegration<IAveaConfig> {
|
||||
public readonly domain = aveaDomain;
|
||||
public readonly discoveryDescriptor = createAveaDiscoveryDescriptor();
|
||||
public readonly configFlow = new AveaConfigFlow();
|
||||
|
||||
export class HomeAssistantAveaIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "avea",
|
||||
displayName: "Elgato Avea",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/avea",
|
||||
"upstreamDomain": "avea",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"avea==1.6.1"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@pattyland"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(aveaProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantAveaIntegration extends AveaIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { aveaProfile } from './avea.types.js';
|
||||
|
||||
export const createAveaDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(aveaProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IAveaConfig } from './avea.types.js';
|
||||
import { aveaProfile } from './avea.types.js';
|
||||
|
||||
export class AveaMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IAveaConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: aveaProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IAveaConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: aveaProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(aveaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(aveaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,89 @@
|
||||
export interface IHomeAssistantAveaConfig {
|
||||
// TODO: replace with the TypeScript-native config for avea.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const aveaDomain = "avea";
|
||||
export const aveaDefaultName = "Elgato Avea";
|
||||
|
||||
export type TAveaRawData = TSimpleLocalRawData;
|
||||
export interface IAveaSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IAveaConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantAveaConfig extends IAveaConfig {}
|
||||
|
||||
export const aveaProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "avea",
|
||||
displayName: "Elgato Avea",
|
||||
manufacturer: "Elgato",
|
||||
model: "Avea light",
|
||||
defaultName: "Elgato Avea",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"light",
|
||||
"sensor"
|
||||
],
|
||||
serviceDomains: [
|
||||
"light"
|
||||
],
|
||||
controlServices: [
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_level"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"elgato",
|
||||
"avea",
|
||||
"light"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/avea",
|
||||
upstreamDomain: "avea",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"Avea==1.6.1"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@pattyland"
|
||||
],
|
||||
configFlow: true,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_level"
|
||||
],
|
||||
platforms: [
|
||||
"light",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './avea.classes.client.js';
|
||||
export * from './avea.classes.configflow.js';
|
||||
export * from './avea.classes.integration.js';
|
||||
export * from './avea.discovery.js';
|
||||
export * from './avea.mapper.js';
|
||||
export * from './avea.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IAwairConfig } from './awair.types.js';
|
||||
import { awairProfile } from './awair.types.js';
|
||||
|
||||
export class AwairClient extends SimpleLocalClient<IAwairConfig> {
|
||||
constructor(configArg: IAwairConfig) {
|
||||
super(awairProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IAwairConfig } from './awair.types.js';
|
||||
import { awairProfile } from './awair.types.js';
|
||||
|
||||
export class AwairConfigFlow extends SimpleLocalConfigFlow<IAwairConfig> {
|
||||
constructor() {
|
||||
super(awairProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { AwairConfigFlow } from './awair.classes.configflow.js';
|
||||
import { createAwairDiscoveryDescriptor } from './awair.discovery.js';
|
||||
import type { IAwairConfig } from './awair.types.js';
|
||||
import { awairDomain, awairProfile } from './awair.types.js';
|
||||
|
||||
export class AwairIntegration extends SimpleLocalIntegration<IAwairConfig> {
|
||||
public readonly domain = awairDomain;
|
||||
public readonly discoveryDescriptor = createAwairDiscoveryDescriptor();
|
||||
public readonly configFlow = new AwairConfigFlow();
|
||||
|
||||
export class HomeAssistantAwairIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "awair",
|
||||
displayName: "Awair",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/awair",
|
||||
"upstreamDomain": "awair",
|
||||
"iotClass": "local_polling",
|
||||
"requirements": [
|
||||
"python-awair==0.2.5"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@ahayworth",
|
||||
"@ricohageman"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(awairProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantAwairIntegration extends AwairIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { awairProfile } from './awair.types.js';
|
||||
|
||||
export const createAwairDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(awairProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IAwairConfig } from './awair.types.js';
|
||||
import { awairProfile } from './awair.types.js';
|
||||
|
||||
export class AwairMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IAwairConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: awairProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IAwairConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: awairProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(awairProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(awairProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,77 @@
|
||||
export interface IHomeAssistantAwairConfig {
|
||||
// TODO: replace with the TypeScript-native config for awair.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const awairDomain = "awair";
|
||||
export const awairDefaultName = "Awair";
|
||||
|
||||
export type TAwairRawData = TSimpleLocalRawData;
|
||||
export interface IAwairSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IAwairConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantAwairConfig extends IAwairConfig {}
|
||||
|
||||
export const awairProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "awair",
|
||||
displayName: "Awair",
|
||||
manufacturer: "Awair",
|
||||
model: "Air quality monitor",
|
||||
defaultName: "Awair",
|
||||
defaultProtocol: "local",
|
||||
status: "read-only-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [],
|
||||
controlServices: [],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"awair",
|
||||
"air quality"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/awair",
|
||||
upstreamDomain: "awair",
|
||||
iotClass: "local_polling",
|
||||
requirements: [
|
||||
"python-awair==0.2.5"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@ahayworth",
|
||||
"@ricohageman"
|
||||
],
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './awair.classes.client.js';
|
||||
export * from './awair.classes.configflow.js';
|
||||
export * from './awair.classes.integration.js';
|
||||
export * from './awair.discovery.js';
|
||||
export * from './awair.mapper.js';
|
||||
export * from './awair.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBalboaConfig } from './balboa.types.js';
|
||||
import { balboaProfile } from './balboa.types.js';
|
||||
|
||||
export class BalboaClient extends SimpleLocalClient<IBalboaConfig> {
|
||||
constructor(configArg: IBalboaConfig) {
|
||||
super(balboaProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBalboaConfig } from './balboa.types.js';
|
||||
import { balboaProfile } from './balboa.types.js';
|
||||
|
||||
export class BalboaConfigFlow extends SimpleLocalConfigFlow<IBalboaConfig> {
|
||||
constructor() {
|
||||
super(balboaProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BalboaConfigFlow } from './balboa.classes.configflow.js';
|
||||
import { createBalboaDiscoveryDescriptor } from './balboa.discovery.js';
|
||||
import type { IBalboaConfig } from './balboa.types.js';
|
||||
import { balboaDomain, balboaProfile } from './balboa.types.js';
|
||||
|
||||
export class BalboaIntegration extends SimpleLocalIntegration<IBalboaConfig> {
|
||||
public readonly domain = balboaDomain;
|
||||
public readonly discoveryDescriptor = createBalboaDiscoveryDescriptor();
|
||||
public readonly configFlow = new BalboaConfigFlow();
|
||||
|
||||
export class HomeAssistantBalboaIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "balboa",
|
||||
displayName: "Balboa Spa Client",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/balboa",
|
||||
"upstreamDomain": "balboa",
|
||||
"integrationType": "device",
|
||||
"iotClass": "local_push",
|
||||
"requirements": [
|
||||
"pybalboa==1.1.3"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@garbled1",
|
||||
"@natekspencer"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(balboaProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBalboaIntegration extends BalboaIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { balboaProfile } from './balboa.types.js';
|
||||
|
||||
export const createBalboaDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(balboaProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBalboaConfig } from './balboa.types.js';
|
||||
import { balboaProfile } from './balboa.types.js';
|
||||
|
||||
export class BalboaMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBalboaConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: balboaProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBalboaConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: balboaProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(balboaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(balboaProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,93 @@
|
||||
export interface IHomeAssistantBalboaConfig {
|
||||
// TODO: replace with the TypeScript-native config for balboa.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const balboaDomain = "balboa";
|
||||
export const balboaDefaultName = "Balboa Spa Client";
|
||||
|
||||
export type TBalboaRawData = TSimpleLocalRawData;
|
||||
export interface IBalboaSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBalboaConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBalboaConfig extends IBalboaConfig {}
|
||||
|
||||
export const balboaProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "balboa",
|
||||
displayName: "Balboa Spa Client",
|
||||
manufacturer: "Balboa",
|
||||
model: "Spa controller",
|
||||
defaultName: "Balboa Spa Client",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"climate",
|
||||
"switch",
|
||||
"sensor"
|
||||
],
|
||||
serviceDomains: [
|
||||
"climate",
|
||||
"switch"
|
||||
],
|
||||
controlServices: [
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_temperature"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"balboa",
|
||||
"spa",
|
||||
"hot tub"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/balboa",
|
||||
upstreamDomain: "balboa",
|
||||
integrationType: "device",
|
||||
iotClass: "local_push",
|
||||
requirements: [
|
||||
"pybalboa==1.1.3"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@garbled1",
|
||||
"@natekspencer"
|
||||
],
|
||||
configFlow: true,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_temperature"
|
||||
],
|
||||
platforms: [
|
||||
"climate",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './balboa.classes.client.js';
|
||||
export * from './balboa.classes.configflow.js';
|
||||
export * from './balboa.classes.integration.js';
|
||||
export * from './balboa.discovery.js';
|
||||
export * from './balboa.mapper.js';
|
||||
export * from './balboa.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBangOlufsenConfig } from './bang_olufsen.types.js';
|
||||
import { bangOlufsenProfile } from './bang_olufsen.types.js';
|
||||
|
||||
export class BangOlufsenClient extends SimpleLocalClient<IBangOlufsenConfig> {
|
||||
constructor(configArg: IBangOlufsenConfig) {
|
||||
super(bangOlufsenProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBangOlufsenConfig } from './bang_olufsen.types.js';
|
||||
import { bangOlufsenProfile } from './bang_olufsen.types.js';
|
||||
|
||||
export class BangOlufsenConfigFlow extends SimpleLocalConfigFlow<IBangOlufsenConfig> {
|
||||
constructor() {
|
||||
super(bangOlufsenProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BangOlufsenConfigFlow } from './bang_olufsen.classes.configflow.js';
|
||||
import { createBangOlufsenDiscoveryDescriptor } from './bang_olufsen.discovery.js';
|
||||
import type { IBangOlufsenConfig } from './bang_olufsen.types.js';
|
||||
import { bangOlufsenDomain, bangOlufsenProfile } from './bang_olufsen.types.js';
|
||||
|
||||
export class BangOlufsenIntegration extends SimpleLocalIntegration<IBangOlufsenConfig> {
|
||||
public readonly domain = bangOlufsenDomain;
|
||||
public readonly discoveryDescriptor = createBangOlufsenDiscoveryDescriptor();
|
||||
public readonly configFlow = new BangOlufsenConfigFlow();
|
||||
|
||||
export class HomeAssistantBangOlufsenIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "bang_olufsen",
|
||||
displayName: "Bang & Olufsen",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/bang_olufsen",
|
||||
"upstreamDomain": "bang_olufsen",
|
||||
"integrationType": "device",
|
||||
"iotClass": "local_push",
|
||||
"requirements": [
|
||||
"mozart-api==5.3.1.108.2"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@mj23000"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(bangOlufsenProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBangOlufsenIntegration extends BangOlufsenIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { bangOlufsenProfile } from './bang_olufsen.types.js';
|
||||
|
||||
export const createBangOlufsenDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(bangOlufsenProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBangOlufsenConfig } from './bang_olufsen.types.js';
|
||||
import { bangOlufsenProfile } from './bang_olufsen.types.js';
|
||||
|
||||
export class BangOlufsenMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBangOlufsenConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: bangOlufsenProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBangOlufsenConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: bangOlufsenProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(bangOlufsenProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(bangOlufsenProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,103 @@
|
||||
export interface IHomeAssistantBangOlufsenConfig {
|
||||
// TODO: replace with the TypeScript-native config for bang_olufsen.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const bangOlufsenDomain = "bang_olufsen";
|
||||
export const bangOlufsenDefaultName = "Bang & Olufsen";
|
||||
|
||||
export type TBangOlufsenRawData = TSimpleLocalRawData;
|
||||
export interface IBangOlufsenSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBangOlufsenConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBangOlufsenConfig extends IBangOlufsenConfig {}
|
||||
|
||||
export const bangOlufsenProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "bang_olufsen",
|
||||
displayName: "Bang & Olufsen",
|
||||
manufacturer: "Bang & Olufsen",
|
||||
model: "Mozart speaker",
|
||||
defaultName: "Bang & Olufsen",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"media_player",
|
||||
"sensor"
|
||||
],
|
||||
serviceDomains: [
|
||||
"media_player"
|
||||
],
|
||||
controlServices: [
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"volume_up",
|
||||
"volume_down",
|
||||
"volume_mute",
|
||||
"select_source",
|
||||
"media_play",
|
||||
"media_pause",
|
||||
"media_stop",
|
||||
"media_next_track",
|
||||
"media_previous_track"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"bang olufsen",
|
||||
"beoplay",
|
||||
"mozart"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/bang_olufsen",
|
||||
upstreamDomain: "bang_olufsen",
|
||||
integrationType: "device",
|
||||
iotClass: "local_push",
|
||||
requirements: [
|
||||
"mozart-api==5.3.1.108.2"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@mj23000"
|
||||
],
|
||||
configFlow: true,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"volume_up",
|
||||
"volume_down",
|
||||
"volume_mute",
|
||||
"select_source",
|
||||
"media_play",
|
||||
"media_pause",
|
||||
"media_stop",
|
||||
"media_next_track",
|
||||
"media_previous_track"
|
||||
],
|
||||
platforms: [
|
||||
"media_player",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './bang_olufsen.classes.client.js';
|
||||
export * from './bang_olufsen.classes.configflow.js';
|
||||
export * from './bang_olufsen.classes.integration.js';
|
||||
export * from './bang_olufsen.discovery.js';
|
||||
export * from './bang_olufsen.mapper.js';
|
||||
export * from './bang_olufsen.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBboxConfig } from './bbox.types.js';
|
||||
import { bboxProfile } from './bbox.types.js';
|
||||
|
||||
export class BboxClient extends SimpleLocalClient<IBboxConfig> {
|
||||
constructor(configArg: IBboxConfig) {
|
||||
super(bboxProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBboxConfig } from './bbox.types.js';
|
||||
import { bboxProfile } from './bbox.types.js';
|
||||
|
||||
export class BboxConfigFlow extends SimpleLocalConfigFlow<IBboxConfig> {
|
||||
constructor() {
|
||||
super(bboxProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BboxConfigFlow } from './bbox.classes.configflow.js';
|
||||
import { createBboxDiscoveryDescriptor } from './bbox.discovery.js';
|
||||
import type { IBboxConfig } from './bbox.types.js';
|
||||
import { bboxDomain, bboxProfile } from './bbox.types.js';
|
||||
|
||||
export class BboxIntegration extends SimpleLocalIntegration<IBboxConfig> {
|
||||
public readonly domain = bboxDomain;
|
||||
public readonly discoveryDescriptor = createBboxDiscoveryDescriptor();
|
||||
public readonly configFlow = new BboxConfigFlow();
|
||||
|
||||
export class HomeAssistantBboxIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "bbox",
|
||||
displayName: "Bbox",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/bbox",
|
||||
"upstreamDomain": "bbox",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"pybbox==0.0.5-alpha"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": []
|
||||
},
|
||||
});
|
||||
super(bboxProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBboxIntegration extends BboxIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { bboxProfile } from './bbox.types.js';
|
||||
|
||||
export const createBboxDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(bboxProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBboxConfig } from './bbox.types.js';
|
||||
import { bboxProfile } from './bbox.types.js';
|
||||
|
||||
export class BboxMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBboxConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: bboxProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBboxConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: bboxProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(bboxProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(bboxProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,75 @@
|
||||
export interface IHomeAssistantBboxConfig {
|
||||
// TODO: replace with the TypeScript-native config for bbox.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const bboxDomain = "bbox";
|
||||
export const bboxDefaultName = "Bbox";
|
||||
|
||||
export type TBboxRawData = TSimpleLocalRawData;
|
||||
export interface IBboxSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBboxConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBboxConfig extends IBboxConfig {}
|
||||
|
||||
export const bboxProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "bbox",
|
||||
displayName: "Bbox",
|
||||
manufacturer: "Bouygues Telecom",
|
||||
model: "Bbox router",
|
||||
defaultName: "Bbox",
|
||||
defaultProtocol: "local",
|
||||
status: "read-only-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [],
|
||||
controlServices: [],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"bbox",
|
||||
"router"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/bbox",
|
||||
upstreamDomain: "bbox",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"pybbox==0.0.5-alpha"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [],
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './bbox.classes.client.js';
|
||||
export * from './bbox.classes.configflow.js';
|
||||
export * from './bbox.classes.integration.js';
|
||||
export * from './bbox.discovery.js';
|
||||
export * from './bbox.mapper.js';
|
||||
export * from './bbox.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBeewiSmartclimConfig } from './beewi_smartclim.types.js';
|
||||
import { beewiSmartclimProfile } from './beewi_smartclim.types.js';
|
||||
|
||||
export class BeewiSmartclimClient extends SimpleLocalClient<IBeewiSmartclimConfig> {
|
||||
constructor(configArg: IBeewiSmartclimConfig) {
|
||||
super(beewiSmartclimProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBeewiSmartclimConfig } from './beewi_smartclim.types.js';
|
||||
import { beewiSmartclimProfile } from './beewi_smartclim.types.js';
|
||||
|
||||
export class BeewiSmartclimConfigFlow extends SimpleLocalConfigFlow<IBeewiSmartclimConfig> {
|
||||
constructor() {
|
||||
super(beewiSmartclimProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BeewiSmartclimConfigFlow } from './beewi_smartclim.classes.configflow.js';
|
||||
import { createBeewiSmartclimDiscoveryDescriptor } from './beewi_smartclim.discovery.js';
|
||||
import type { IBeewiSmartclimConfig } from './beewi_smartclim.types.js';
|
||||
import { beewiSmartclimDomain, beewiSmartclimProfile } from './beewi_smartclim.types.js';
|
||||
|
||||
export class BeewiSmartclimIntegration extends SimpleLocalIntegration<IBeewiSmartclimConfig> {
|
||||
public readonly domain = beewiSmartclimDomain;
|
||||
public readonly discoveryDescriptor = createBeewiSmartclimDiscoveryDescriptor();
|
||||
public readonly configFlow = new BeewiSmartclimConfigFlow();
|
||||
|
||||
export class HomeAssistantBeewiSmartclimIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "beewi_smartclim",
|
||||
displayName: "BeeWi SmartClim BLE sensor",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/beewi_smartclim",
|
||||
"upstreamDomain": "beewi_smartclim",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"beewi-smartclim==0.0.10"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@alemuro"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(beewiSmartclimProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBeewiSmartclimIntegration extends BeewiSmartclimIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { beewiSmartclimProfile } from './beewi_smartclim.types.js';
|
||||
|
||||
export const createBeewiSmartclimDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(beewiSmartclimProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBeewiSmartclimConfig } from './beewi_smartclim.types.js';
|
||||
import { beewiSmartclimProfile } from './beewi_smartclim.types.js';
|
||||
|
||||
export class BeewiSmartclimMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBeewiSmartclimConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: beewiSmartclimProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBeewiSmartclimConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: beewiSmartclimProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(beewiSmartclimProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(beewiSmartclimProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,78 @@
|
||||
export interface IHomeAssistantBeewiSmartclimConfig {
|
||||
// TODO: replace with the TypeScript-native config for beewi_smartclim.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const beewiSmartclimDomain = "beewi_smartclim";
|
||||
export const beewiSmartclimDefaultName = "BeeWi SmartClim BLE sensor";
|
||||
|
||||
export type TBeewiSmartclimRawData = TSimpleLocalRawData;
|
||||
export interface IBeewiSmartclimSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBeewiSmartclimConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBeewiSmartclimConfig extends IBeewiSmartclimConfig {}
|
||||
|
||||
export const beewiSmartclimProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "beewi_smartclim",
|
||||
displayName: "BeeWi SmartClim BLE sensor",
|
||||
manufacturer: "BeeWi",
|
||||
model: "SmartClim",
|
||||
defaultName: "BeeWi SmartClim BLE sensor",
|
||||
defaultProtocol: "local",
|
||||
status: "read-only-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [],
|
||||
controlServices: [],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"beewi",
|
||||
"smartclim",
|
||||
"bluetooth"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/beewi_smartclim",
|
||||
upstreamDomain: "beewi_smartclim",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"beewi-smartclim==0.0.10"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@alemuro"
|
||||
],
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './beewi_smartclim.classes.client.js';
|
||||
export * from './beewi_smartclim.classes.configflow.js';
|
||||
export * from './beewi_smartclim.classes.integration.js';
|
||||
export * from './beewi_smartclim.discovery.js';
|
||||
export * from './beewi_smartclim.mapper.js';
|
||||
export * from './beewi_smartclim.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBlackbirdConfig } from './blackbird.types.js';
|
||||
import { blackbirdProfile } from './blackbird.types.js';
|
||||
|
||||
export class BlackbirdClient extends SimpleLocalClient<IBlackbirdConfig> {
|
||||
constructor(configArg: IBlackbirdConfig) {
|
||||
super(blackbirdProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBlackbirdConfig } from './blackbird.types.js';
|
||||
import { blackbirdProfile } from './blackbird.types.js';
|
||||
|
||||
export class BlackbirdConfigFlow extends SimpleLocalConfigFlow<IBlackbirdConfig> {
|
||||
constructor() {
|
||||
super(blackbirdProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BlackbirdConfigFlow } from './blackbird.classes.configflow.js';
|
||||
import { createBlackbirdDiscoveryDescriptor } from './blackbird.discovery.js';
|
||||
import type { IBlackbirdConfig } from './blackbird.types.js';
|
||||
import { blackbirdDomain, blackbirdProfile } from './blackbird.types.js';
|
||||
|
||||
export class BlackbirdIntegration extends SimpleLocalIntegration<IBlackbirdConfig> {
|
||||
public readonly domain = blackbirdDomain;
|
||||
public readonly discoveryDescriptor = createBlackbirdDiscoveryDescriptor();
|
||||
public readonly configFlow = new BlackbirdConfigFlow();
|
||||
|
||||
export class HomeAssistantBlackbirdIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "blackbird",
|
||||
displayName: "Monoprice Blackbird Matrix Switch",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/blackbird",
|
||||
"upstreamDomain": "blackbird",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"pyblackbird==0.6"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": []
|
||||
},
|
||||
});
|
||||
super(blackbirdProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBlackbirdIntegration extends BlackbirdIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { blackbirdProfile } from './blackbird.types.js';
|
||||
|
||||
export const createBlackbirdDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(blackbirdProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBlackbirdConfig } from './blackbird.types.js';
|
||||
import { blackbirdProfile } from './blackbird.types.js';
|
||||
|
||||
export class BlackbirdMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBlackbirdConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: blackbirdProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBlackbirdConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: blackbirdProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(blackbirdProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(blackbirdProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,98 @@
|
||||
export interface IHomeAssistantBlackbirdConfig {
|
||||
// TODO: replace with the TypeScript-native config for blackbird.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const blackbirdDomain = "blackbird";
|
||||
export const blackbirdDefaultName = "Monoprice Blackbird Matrix Switch";
|
||||
|
||||
export type TBlackbirdRawData = TSimpleLocalRawData;
|
||||
export interface IBlackbirdSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBlackbirdConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBlackbirdConfig extends IBlackbirdConfig {}
|
||||
|
||||
export const blackbirdSampleData: TBlackbirdRawData = {
|
||||
input: 'HDMI1',
|
||||
output: 'Zone1',
|
||||
powered: true,
|
||||
};
|
||||
|
||||
export const blackbirdProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "blackbird",
|
||||
displayName: "Monoprice Blackbird Matrix Switch",
|
||||
manufacturer: "Monoprice",
|
||||
model: "Blackbird matrix switch",
|
||||
defaultName: "Monoprice Blackbird Matrix Switch",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"switch",
|
||||
"sensor",
|
||||
"media_player"
|
||||
],
|
||||
serviceDomains: [
|
||||
"switch",
|
||||
"media_player"
|
||||
],
|
||||
controlServices: [
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"select_source"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"mdns",
|
||||
"ssdp",
|
||||
"http",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"blackbird",
|
||||
"monoprice",
|
||||
"matrix",
|
||||
"hdmi"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/blackbird",
|
||||
upstreamDomain: "blackbird",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"pyblackbird==0.6"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [],
|
||||
configFlow: true,
|
||||
sampleData: blackbirdSampleData,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"select_source"
|
||||
],
|
||||
platforms: [
|
||||
"switch",
|
||||
"sensor",
|
||||
"media_player"
|
||||
],
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './blackbird.classes.client.js';
|
||||
export * from './blackbird.classes.configflow.js';
|
||||
export * from './blackbird.classes.integration.js';
|
||||
export * from './blackbird.discovery.js';
|
||||
export * from './blackbird.mapper.js';
|
||||
export * from './blackbird.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBlinksticklightConfig } from './blinksticklight.types.js';
|
||||
import { blinksticklightProfile } from './blinksticklight.types.js';
|
||||
|
||||
export class BlinksticklightClient extends SimpleLocalClient<IBlinksticklightConfig> {
|
||||
constructor(configArg: IBlinksticklightConfig) {
|
||||
super(blinksticklightProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBlinksticklightConfig } from './blinksticklight.types.js';
|
||||
import { blinksticklightProfile } from './blinksticklight.types.js';
|
||||
|
||||
export class BlinksticklightConfigFlow extends SimpleLocalConfigFlow<IBlinksticklightConfig> {
|
||||
constructor() {
|
||||
super(blinksticklightProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BlinksticklightConfigFlow } from './blinksticklight.classes.configflow.js';
|
||||
import { createBlinksticklightDiscoveryDescriptor } from './blinksticklight.discovery.js';
|
||||
import type { IBlinksticklightConfig } from './blinksticklight.types.js';
|
||||
import { blinksticklightDomain, blinksticklightProfile } from './blinksticklight.types.js';
|
||||
|
||||
export class BlinksticklightIntegration extends SimpleLocalIntegration<IBlinksticklightConfig> {
|
||||
public readonly domain = blinksticklightDomain;
|
||||
public readonly discoveryDescriptor = createBlinksticklightDiscoveryDescriptor();
|
||||
public readonly configFlow = new BlinksticklightConfigFlow();
|
||||
|
||||
export class HomeAssistantBlinksticklightIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "blinksticklight",
|
||||
displayName: "BlinkStick",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/blinksticklight",
|
||||
"upstreamDomain": "blinksticklight",
|
||||
"iotClass": "local_polling",
|
||||
"qualityScale": "legacy",
|
||||
"requirements": [
|
||||
"BlinkStick==1.2.0"
|
||||
],
|
||||
"dependencies": [],
|
||||
"afterDependencies": [],
|
||||
"codeowners": []
|
||||
},
|
||||
});
|
||||
super(blinksticklightProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBlinksticklightIntegration extends BlinksticklightIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { blinksticklightProfile } from './blinksticklight.types.js';
|
||||
|
||||
export const createBlinksticklightDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(blinksticklightProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBlinksticklightConfig } from './blinksticklight.types.js';
|
||||
import { blinksticklightProfile } from './blinksticklight.types.js';
|
||||
|
||||
export class BlinksticklightMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBlinksticklightConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: blinksticklightProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBlinksticklightConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: blinksticklightProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(blinksticklightProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(blinksticklightProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,92 @@
|
||||
export interface IHomeAssistantBlinksticklightConfig {
|
||||
// TODO: replace with the TypeScript-native config for blinksticklight.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const blinksticklightDomain = "blinksticklight";
|
||||
export const blinksticklightDefaultName = "BlinkStick";
|
||||
|
||||
export type TBlinksticklightRawData = TSimpleLocalRawData;
|
||||
export interface IBlinksticklightSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBlinksticklightConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBlinksticklightConfig extends IBlinksticklightConfig {}
|
||||
|
||||
export const blinksticklightSampleData: TBlinksticklightRawData = {
|
||||
on: true,
|
||||
brightness: 200,
|
||||
color: 'blue',
|
||||
};
|
||||
|
||||
export const blinksticklightProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "blinksticklight",
|
||||
displayName: "BlinkStick",
|
||||
manufacturer: "BlinkStick",
|
||||
model: "USB light",
|
||||
defaultName: "BlinkStick",
|
||||
defaultProtocol: "local",
|
||||
status: "control-runtime",
|
||||
platforms: [
|
||||
"light",
|
||||
"sensor"
|
||||
],
|
||||
serviceDomains: [
|
||||
"light"
|
||||
],
|
||||
controlServices: [
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_level"
|
||||
],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"usb",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"blinkstick",
|
||||
"light",
|
||||
"usb"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/blinksticklight",
|
||||
upstreamDomain: "blinksticklight",
|
||||
iotClass: "local_polling",
|
||||
qualityScale: "legacy",
|
||||
requirements: [
|
||||
"BlinkStick==1.2.0"
|
||||
],
|
||||
dependencies: [],
|
||||
afterDependencies: [],
|
||||
codeowners: [],
|
||||
configFlow: true,
|
||||
sampleData: blinksticklightSampleData,
|
||||
runtime: {
|
||||
type: "control-runtime",
|
||||
services: [
|
||||
"snapshot",
|
||||
"status",
|
||||
"refresh",
|
||||
"turn_on",
|
||||
"turn_off",
|
||||
"toggle",
|
||||
"set_level"
|
||||
],
|
||||
platforms: [
|
||||
"light",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './blinksticklight.classes.client.js';
|
||||
export * from './blinksticklight.classes.configflow.js';
|
||||
export * from './blinksticklight.classes.integration.js';
|
||||
export * from './blinksticklight.discovery.js';
|
||||
export * from './blinksticklight.mapper.js';
|
||||
export * from './blinksticklight.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBluemaestroConfig } from './bluemaestro.types.js';
|
||||
import { bluemaestroProfile } from './bluemaestro.types.js';
|
||||
|
||||
export class BluemaestroClient extends SimpleLocalClient<IBluemaestroConfig> {
|
||||
constructor(configArg: IBluemaestroConfig) {
|
||||
super(bluemaestroProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBluemaestroConfig } from './bluemaestro.types.js';
|
||||
import { bluemaestroProfile } from './bluemaestro.types.js';
|
||||
|
||||
export class BluemaestroConfigFlow extends SimpleLocalConfigFlow<IBluemaestroConfig> {
|
||||
constructor() {
|
||||
super(bluemaestroProfile);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,17 @@
|
||||
import { DescriptorOnlyIntegration } from '../../core/classes.descriptoronlyintegration.js';
|
||||
import { SimpleLocalIntegration } from '../../core/index.js';
|
||||
import { BluemaestroConfigFlow } from './bluemaestro.classes.configflow.js';
|
||||
import { createBluemaestroDiscoveryDescriptor } from './bluemaestro.discovery.js';
|
||||
import type { IBluemaestroConfig } from './bluemaestro.types.js';
|
||||
import { bluemaestroDomain, bluemaestroProfile } from './bluemaestro.types.js';
|
||||
|
||||
export class BluemaestroIntegration extends SimpleLocalIntegration<IBluemaestroConfig> {
|
||||
public readonly domain = bluemaestroDomain;
|
||||
public readonly discoveryDescriptor = createBluemaestroDiscoveryDescriptor();
|
||||
public readonly configFlow = new BluemaestroConfigFlow();
|
||||
|
||||
export class HomeAssistantBluemaestroIntegration extends DescriptorOnlyIntegration {
|
||||
constructor() {
|
||||
super({
|
||||
domain: "bluemaestro",
|
||||
displayName: "BlueMaestro",
|
||||
status: 'descriptor-only',
|
||||
metadata: {
|
||||
"source": "home-assistant/core",
|
||||
"upstreamPath": "homeassistant/components/bluemaestro",
|
||||
"upstreamDomain": "bluemaestro",
|
||||
"integrationType": "device",
|
||||
"iotClass": "local_push",
|
||||
"requirements": [
|
||||
"bluemaestro-ble==0.4.1"
|
||||
],
|
||||
"dependencies": [
|
||||
"bluetooth_adapters"
|
||||
],
|
||||
"afterDependencies": [],
|
||||
"codeowners": [
|
||||
"@bdraco"
|
||||
]
|
||||
},
|
||||
});
|
||||
super(bluemaestroProfile);
|
||||
}
|
||||
}
|
||||
|
||||
export class HomeAssistantBluemaestroIntegration extends BluemaestroIntegration {}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createSimpleLocalDiscoveryDescriptor } from '../../core/index.js';
|
||||
import { bluemaestroProfile } from './bluemaestro.types.js';
|
||||
|
||||
export const createBluemaestroDiscoveryDescriptor = () => createSimpleLocalDiscoveryDescriptor(bluemaestroProfile);
|
||||
@@ -0,0 +1,26 @@
|
||||
import type * as shxInterfaces from '@smarthome.exchange/interfaces';
|
||||
import { SimpleLocalMapper, type IIntegrationEntity, type ISimpleLocalSnapshot, type ISimpleLocalSnapshotOptions, type TSimpleLocalRawData } from '../../core/index.js';
|
||||
import type { IBluemaestroConfig } from './bluemaestro.types.js';
|
||||
import { bluemaestroProfile } from './bluemaestro.types.js';
|
||||
|
||||
export class BluemaestroMapper {
|
||||
public static toSnapshot(optionsArg: Omit<ISimpleLocalSnapshotOptions<IBluemaestroConfig>, 'profile'>): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ ...optionsArg, profile: bluemaestroProfile });
|
||||
}
|
||||
|
||||
public static toSnapshotFromRaw(configArg: IBluemaestroConfig, rawDataArg: TSimpleLocalRawData): ISimpleLocalSnapshot {
|
||||
return SimpleLocalMapper.toSnapshot({ profile: bluemaestroProfile, config: configArg, rawData: rawDataArg, online: true, source: 'manual' });
|
||||
}
|
||||
|
||||
public static toDevices(snapshotArg: ISimpleLocalSnapshot): shxInterfaces.data.IDeviceDefinition[] {
|
||||
return SimpleLocalMapper.toDevices(bluemaestroProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static toEntities(snapshotArg: ISimpleLocalSnapshot): IIntegrationEntity[] {
|
||||
return SimpleLocalMapper.toEntities(bluemaestroProfile, snapshotArg);
|
||||
}
|
||||
|
||||
public static slug(valueArg: unknown): string {
|
||||
return SimpleLocalMapper.slug(valueArg);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,86 @@
|
||||
export interface IHomeAssistantBluemaestroConfig {
|
||||
// TODO: replace with the TypeScript-native config for bluemaestro.
|
||||
[key: string]: unknown;
|
||||
}
|
||||
import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';
|
||||
|
||||
export const bluemaestroDomain = "bluemaestro";
|
||||
export const bluemaestroDefaultName = "BlueMaestro";
|
||||
|
||||
export type TBluemaestroRawData = TSimpleLocalRawData;
|
||||
export interface IBluemaestroSnapshot extends ISimpleLocalSnapshot {}
|
||||
export interface IBluemaestroConfig extends ISimpleLocalConfig {}
|
||||
export interface IHomeAssistantBluemaestroConfig extends IBluemaestroConfig {}
|
||||
|
||||
export const bluemaestroSampleData: TBluemaestroRawData = {
|
||||
temperature: 21.2,
|
||||
humidity: 42,
|
||||
battery: 90,
|
||||
};
|
||||
|
||||
export const bluemaestroProfile: ISimpleLocalIntegrationProfile = {
|
||||
domain: "bluemaestro",
|
||||
displayName: "BlueMaestro",
|
||||
manufacturer: "BlueMaestro",
|
||||
model: "BLE sensor",
|
||||
defaultName: "BlueMaestro",
|
||||
defaultProtocol: "local",
|
||||
status: "read-only-runtime",
|
||||
platforms: [
|
||||
"sensor",
|
||||
"binary_sensor"
|
||||
],
|
||||
serviceDomains: [],
|
||||
controlServices: [],
|
||||
discoverySources: [
|
||||
"manual",
|
||||
"bluetooth",
|
||||
"custom"
|
||||
],
|
||||
discoveryKeywords: [
|
||||
"bluemaestro",
|
||||
"blue maestro",
|
||||
"ble",
|
||||
"sensor"
|
||||
],
|
||||
metadata: {
|
||||
source: "home-assistant/core",
|
||||
upstreamPath: "homeassistant/components/bluemaestro",
|
||||
upstreamDomain: "bluemaestro",
|
||||
integrationType: "device",
|
||||
iotClass: "local_push",
|
||||
requirements: [
|
||||
"bluemaestro-ble==0.4.1"
|
||||
],
|
||||
dependencies: [
|
||||
"bluetooth_adapters"
|
||||
],
|
||||
afterDependencies: [],
|
||||
codeowners: [
|
||||
"@bdraco"
|
||||
],
|
||||
configFlow: true,
|
||||
sampleData: bluemaestroSampleData,
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export * from './bluemaestro.classes.client.js';
|
||||
export * from './bluemaestro.classes.configflow.js';
|
||||
export * from './bluemaestro.classes.integration.js';
|
||||
export * from './bluemaestro.discovery.js';
|
||||
export * from './bluemaestro.mapper.js';
|
||||
export * from './bluemaestro.types.js';
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
This folder is generated from Home Assistant component metadata. Replace it with a handwritten TypeScript port when implementing runtime support.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalClient } from '../../core/index.js';
|
||||
import type { IBoschAlarmConfig } from './bosch_alarm.types.js';
|
||||
import { boschAlarmProfile } from './bosch_alarm.types.js';
|
||||
|
||||
export class BoschAlarmClient extends SimpleLocalClient<IBoschAlarmConfig> {
|
||||
constructor(configArg: IBoschAlarmConfig) {
|
||||
super(boschAlarmProfile, configArg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SimpleLocalConfigFlow } from '../../core/index.js';
|
||||
import type { IBoschAlarmConfig } from './bosch_alarm.types.js';
|
||||
import { boschAlarmProfile } from './bosch_alarm.types.js';
|
||||
|
||||
export class BoschAlarmConfigFlow extends SimpleLocalConfigFlow<IBoschAlarmConfig> {
|
||||
constructor() {
|
||||
super(boschAlarmProfile);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user