Add support for 'barrier_ctrl' service

This commit is contained in:
Adrian Jagielak
2025-07-24 23:14:34 +02:00
parent dcab7a7112
commit 58e4ea228c
8 changed files with 237 additions and 8 deletions

View File

@@ -1 +1,14 @@
export type EntityCategory = undefined | 'config' | 'diagnostic';
export type CoverDeviceClass =
| 'awning'
| 'blind'
| 'curtain'
| 'damper'
| 'door'
| 'garage'
| 'gate'
| 'shade'
| 'shutter'
| 'window'
| null;

View File

@@ -1,3 +1,5 @@
import { CoverDeviceClass } from './_enums';
/**
* Represents a MQTT Cover component for Home Assistant MQTT Discovery.
*
@@ -38,9 +40,9 @@ export interface CoverComponent {
/**
* Sets the [class of the device](https://www.home-assistant.io/integrations/cover/#device_class),
* changing the device state and icon that is displayed on the frontend.
* The `device_class` can be `null`.
* The `device_class` can be `null` (generic cover).
*/
device_class?: string | null;
device_class?: CoverDeviceClass;
/**
* Flag which defines if the entity should be enabled when first added.

View File

@@ -4,6 +4,7 @@ import {
VinculumPd7Service,
} from '../fimp/vinculum_pd7_device';
import { log } from '../logger';
import { barrier_ctrl__components } from '../services/barrier_ctrl';
import { basic__components } from '../services/basic';
import { battery__components } from '../services/battery';
import { color_ctrl__components } from '../services/color_ctrl';
@@ -158,6 +159,7 @@ const serviceHandlers: {
svc: VinculumPd7Service,
) => ServiceComponentsCreationResult | undefined;
} = {
barrier_ctrl: barrier_ctrl__components,
basic: basic__components,
battery: battery__components,
color_ctrl: color_ctrl__components,