change cron to numbers
This commit is contained in:
6
dist/Export.js
vendored
6
dist/Export.js
vendored
@ -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]"}`;
|
||||
}
|
||||
|
14
dist/main.js
vendored
14
dist/main.js
vendored
@ -41,6 +41,20 @@ allLabeledItems.push(annaBedLight);
|
||||
let windowContactAnna1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Anna', 'WindowContact', 'Fenster Anna', 20);
|
||||
windowContactAnna1st.start();
|
||||
allLabeledItems.push(windowContactAnna1st);
|
||||
let thermostatAnna1st = new MaxThermostat_1.MaxThermostat('1st', 'Anna', 'Thermostat', 'Thermostat Anna', 21, [windowContactAnna1st]);
|
||||
thermostatAnna1st.start();
|
||||
allLabeledItems.push(thermostatAnna1st);
|
||||
let thermostatAnna1stCron = new Cron_1.Cron('thermostatAnna1stCron', thermostatAnna1st, [
|
||||
{ cronTime: '00 05 06 * * *', output: '23.0' },
|
||||
{ cronTime: '00 05 08 * * mon-fri', output: '5.0' },
|
||||
{ cronTime: '00 05 16 * * mon', output: '23.0' },
|
||||
{ cronTime: '00 05 14 * * tue', output: '23.0' },
|
||||
{ cronTime: '00 05 14 * * wed', output: '23.0' },
|
||||
{ cronTime: '00 05 16 * * thu', output: '23.0' },
|
||||
{ cronTime: '00 05 14 * * fri', output: '23.0' },
|
||||
{ cronTime: '00 58 23 * * *', output: '5.0' }
|
||||
]);
|
||||
thermostatAnna1stCron.start();
|
||||
// Matthias -------------------------------------------------------------------------------------------------
|
||||
// Matthias Stehlampen 7 24 1 6 24 1
|
||||
let matthiasStandLights = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'StandLight', 'Stehlampen Matthias', '7 24 1', '6 24 1');
|
||||
|
Reference in New Issue
Block a user