export stuff

This commit is contained in:
Wolfgang Hottgenroth
2018-04-02 23:03:10 +02:00
parent d586ab6860
commit e883c9a791
6 changed files with 81 additions and 63 deletions

6
dist/Export.js vendored
View File

@ -106,14 +106,14 @@ function ContactHomekitExport(id, label, status) {
}
function SwitchOpenHABExport(id, label, setOn, statusOn) {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Switch ${id} {mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`;
return `Switch ${id} "${label}"{mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`;
}
function ContactOpenHABExport(id, label, status) {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Switch ${id} {mqtt="<[localbroker:${status}:state:default]"}`;
return `Contact ${id} "${label}" {mqtt="<[localbroker:${status}:state:default]"}`;
}
function ThermostatOpenHAPExport(id, label, setTemperature, statusTemperature) {
return `Number ${id} {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`;
return `Number ${id} "${label}" {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`;
}
function HueColorLightHomekitExport(id, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
let o = {