2025-07-22 23:21:34 +02:00
|
|
|
import { InclusionReportService } from "../fimp/inclusion_report";
|
|
|
|
import { VinculumPd7Device } from "../fimp/vinculum_pd7_device";
|
2025-07-23 15:34:22 +02:00
|
|
|
import { ServiceComponentsCreationResult } from "../ha/publish_device";
|
2025-07-22 23:21:34 +02:00
|
|
|
|
2025-07-23 15:34:22 +02:00
|
|
|
export function out_lvl_switch__components(topicPrefix: string, vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): ServiceComponentsCreationResult {
|
|
|
|
if (!svc.address) { return {components: {}}; }
|
2025-07-22 23:21:34 +02:00
|
|
|
|
|
|
|
return {
|
2025-07-23 15:34:22 +02:00
|
|
|
components: {
|
2025-07-22 23:21:34 +02:00
|
|
|
// [svc.address]: {
|
2025-07-23 15:34:22 +02:00
|
|
|
// p: 'sensor',
|
|
|
|
// device_class: 'temperature",
|
2025-07-22 23:21:34 +02:00
|
|
|
// unit_of_measurement: "°C",
|
|
|
|
// value_template: `{{ value_json['${svc.address}'].sensor }}`,
|
|
|
|
// },
|
2025-07-23 15:34:22 +02:00
|
|
|
},};
|
2025-07-22 23:21:34 +02:00
|
|
|
}
|