mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 15:47:08 +00:00
17 lines
592 B
TypeScript
17 lines
592 B
TypeScript
import { InclusionReportService } from "../fimp/inclusion_report";
|
|
import { VinculumPd7Device } from "../fimp/vinculum_pd7_device";
|
|
import { HaComponent } from "../ha/publish_device";
|
|
|
|
export function sensor_airflow__components(vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): { [key: string]: HaComponent } {
|
|
if (!svc.address) { return {}; }
|
|
|
|
return {
|
|
[svc.address]: {
|
|
unique_id: svc.address,
|
|
p: 'sensor',
|
|
unit_of_measurement: svc.props?.sup_units?.[0] ?? 'm3/h',
|
|
value_template: `{{ value_json['${svc.address}'].sensor }}`,
|
|
},
|
|
};
|
|
}
|