mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-10-11 06:52:07 -06:00
18 lines
571 B
TypeScript
18 lines
571 B
TypeScript
|
import { InclusionReportService } from "../fimp/inclusion_report";
|
||
|
import { VinculumPd7Device } from "../fimp/vinculum_pd7_device";
|
||
|
import { CMP } from "../ha/publish_device";
|
||
|
|
||
|
export function cmps_sensor_temp(vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): { [key: string]: CMP } {
|
||
|
if (!svc.address) { return {}; }
|
||
|
|
||
|
return {
|
||
|
[svc.address]: {
|
||
|
p: "sensor",
|
||
|
device_class: "temperature",
|
||
|
unit_of_measurement: "°C",
|
||
|
value_template: `{{ value_json['${svc.address}'].sensor }}`,
|
||
|
unique_id: svc.address,
|
||
|
},
|
||
|
};
|
||
|
}
|