change cron to numbers

This commit is contained in:
Wolfgang Hottgenroth
2018-03-06 12:20:01 +01:00
parent 9b4853501d
commit e6a12e4215
5 changed files with 70 additions and 24 deletions

6
dist/Export.js vendored
View File

@ -21,7 +21,7 @@ function ThermostatExport(itemId, label, temperatureTopic, temperatureFeedbackTo
}
exports.ThermostatExport = ThermostatExport;
function ContactExport(itemId, label, status) {
return { 'homekit': ContactHomekitExport(itemId, label, status), 'openhab': '' };
return { 'homekit': ContactHomekitExport(itemId, label, status), 'openhab': ContactOpenHABExport(itemId, label, status) };
}
exports.ContactExport = ContactExport;
function HueColorLightExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
@ -97,6 +97,10 @@ 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]"}`;
}
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]"}`;
}
function ThermostatOpenHAPExport(id, label, setTemperature, statusTemperature) {
return `Number ${id} {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`;
}