change cron to numbers
This commit is contained in:
44
src/main.ts
44
src/main.ts
@ -34,8 +34,8 @@ aquariumLight.start()
|
||||
allLabeledItems.push(aquariumLight)
|
||||
|
||||
let aquariumLightCron = new Cron('aquariumLightCron', aquariumLight, [
|
||||
{cronTime: '00 00 07 * * mon-fri', output: 'ON'},
|
||||
{cronTime: '00 00 09 * * sat-sun', output: 'ON'},
|
||||
{cronTime: '00 00 07 * * 1-5', output: 'ON'},
|
||||
{cronTime: '00 00 09 * * 6,0', output: 'ON'},
|
||||
{cronTime: '00 00 13 * * *', output: 'OFF'},
|
||||
{cronTime: '00 00 14 * * *', output: 'ON'},
|
||||
{cronTime: '00 00 22 * * *', output: 'OFF'}
|
||||
@ -53,6 +53,22 @@ let windowContactAnna1st = new MaxWindowContact('1st', 'Anna', 'WindowContact',
|
||||
windowContactAnna1st.start()
|
||||
allLabeledItems.push(windowContactAnna1st)
|
||||
|
||||
let thermostatAnna1st = new MaxThermostat('1st', 'Anna', 'Thermostat', 'Thermostat Anna', 21, [windowContactAnna1st])
|
||||
thermostatAnna1st.start()
|
||||
allLabeledItems.push(thermostatAnna1st)
|
||||
|
||||
let thermostatAnna1stCron = new Cron('thermostatAnna1stCron', thermostatAnna1st, [
|
||||
{cronTime: '00 05 06 * * *', output: '23.0'},
|
||||
{cronTime: '00 05 08 * * 1-5', output: '5.0'},
|
||||
{cronTime: '00 05 16 * * 1', output: '23.0'},
|
||||
{cronTime: '00 05 14 * * 2', output: '23.0'},
|
||||
{cronTime: '00 05 14 * * 3', output: '23.0'},
|
||||
{cronTime: '00 05 16 * * 4', output: '23.0'},
|
||||
{cronTime: '00 05 14 * * 5', 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('1st', 'Matthias', 'StandLight', 'Stehlampen Matthias', '7 24 1', '6 24 1')
|
||||
@ -186,10 +202,10 @@ thermostatBedroom1st.start()
|
||||
allLabeledItems.push(thermostatBedroom1st)
|
||||
|
||||
let thermostatBedroom1stCron = new Cron('thermostatBedroom1stCron', thermostatBedroom1st, [
|
||||
{cronTime: '00 01 06 * * mon-fri', output: '21.0'},
|
||||
{cronTime: '00 01 09 * * mon-fri', output: '5.0'},
|
||||
{cronTime: '00 01 08 * * sat-sun', output: '21.0'},
|
||||
{cronTime: '00 01 11 * * sat-sun', output: '5.0'},
|
||||
{cronTime: '00 01 06 * * 1-5', output: '21.0'},
|
||||
{cronTime: '00 01 09 * * 1-5', output: '5.0'},
|
||||
{cronTime: '00 01 08 * * 6,0', output: '21.0'},
|
||||
{cronTime: '00 01 11 * * 6,0', output: '5.0'},
|
||||
{cronTime: '00 00 17 * * *', output: '23.0'},
|
||||
{cronTime: '00 59 23 * * *', output: '5.0'}
|
||||
])
|
||||
@ -248,8 +264,8 @@ thermostatBathroomGnd.start()
|
||||
allLabeledItems.push(thermostatBathroomGnd)
|
||||
|
||||
let thermostatBathroomGndCron = new Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [
|
||||
{cronTime: '00 02 06 * * mon-fri', output: '21.0'},
|
||||
{cronTime: '00 02 08 * * sat-sun', output: '21.0'},
|
||||
{cronTime: '00 02 06 * * 1-5', output: '21.0'},
|
||||
{cronTime: '00 02 08 * * 6,0', output: '21.0'},
|
||||
{cronTime: '00 02 11 * * *', output: '5.0'},
|
||||
{cronTime: '00 02 19 * * *', output: '21.0'},
|
||||
{cronTime: '00 00 23 * * *', output: '5.0'}
|
||||
@ -266,8 +282,8 @@ thermostatBathroom1st.start()
|
||||
allLabeledItems.push(thermostatBathroom1st)
|
||||
|
||||
let thermostatBathroom1stCron = new Cron('thermostatBathroom1stCron', thermostatBathroom1st, [
|
||||
{cronTime: '00 00 06 * * mon-fri', output: '21.0'},
|
||||
{cronTime: '00 00 08 * * sat-sun', output: '21.0'},
|
||||
{cronTime: '00 00 06 * * 1-5', output: '21.0'},
|
||||
{cronTime: '00 00 08 * * 6,0', output: '21.0'},
|
||||
{cronTime: '00 00 11 * * *', output: '5.0'},
|
||||
{cronTime: '00 00 19 * * *', output: '21.0'},
|
||||
{cronTime: '00 00 23 * * *', output: '5.0'}
|
||||
@ -295,10 +311,10 @@ thermostatKitchen.start()
|
||||
allLabeledItems.push(thermostatKitchen)
|
||||
|
||||
let thermostatKitchenCron = new Cron('thermostatKitchenCron', thermostatKitchen, [
|
||||
{cronTime: '00 00 06 * * mon-fri', output: '19.0'},
|
||||
{cronTime: '00 00 08 * * sat-sun', output: '19.0'},
|
||||
{cronTime: '00 00 10 * * mon-wed', output: '5.0'},
|
||||
{cronTime: '00 30 13 * * mon-wed', output: '19.0'},
|
||||
{cronTime: '00 00 06 * * 1-5', output: '19.0'},
|
||||
{cronTime: '00 00 08 * * 6,0', output: '19.0'},
|
||||
{cronTime: '00 00 10 * * 1-3', output: '5.0'},
|
||||
{cronTime: '00 30 13 * * 1-3', output: '19.0'},
|
||||
{cronTime: '00 00 23 * * *', output: '5.0'}
|
||||
])
|
||||
thermostatKitchenCron.start()
|
||||
|
Reference in New Issue
Block a user