Use the method Hallway_Heating.sendCommand(comfort) instead of sendCommand(Hallway_Heating, comfort) action, likewise all others.
Enable debug logging and insert logDebug(…) statements as explained in the tutorial.
Your first cron statement 0 0 7 * 1 ? reads as: At 07:00:00am, every day, in January
Your second one: 0 15 6 * 2,3,4,5 ? reads as : At 06:15:00am, every day, in February, March, April and May
rule “Zeitgesteuerte Heizung Aufstehen Mo.”
when
Time cron "0 0 7 ? * MON *"
then
Bathroom_Heating.sendCommand(comfort)
LivingRoom_Heating.sendCommand(comfort)
Bedroom_Heating.sendCommand(comfort)
Hallway_Heating.sendCommand(comfort)
Kitchen_Heating.sendCommand(comfort)
end
Even better, if you put these 5 items in a group (gHeating) then all you need to do is:
rule “Zeitgesteuerte Heizung Aufstehen Mo.”
when
Time cron "0 0 7 ? * MON *"
then
gHeating.sendCommand(comfort)
end
You can then combine the 2 rules:
rule “Zeitgesteuerte Heizung Aufstehen Mo-Fri”
when
Time cron "0 0 7 ? * MON *" or
Time cron "0 45 6 ? * TUE,WED,THU,FRI *"
then
gHeating.sendCommand(comfort)
end
Now i know how the Cron is used correctly and my final Solution looks like this:
//This is the rules file
//Variablen Heizung
var Number offen = 9.0
var Number eco = 16.0
var Number comfort = 22.0
//////////////////////////////////////////////////////////////////////
//Heizung Zeitsteuerung
//////////////////////////////////////////////////////////////////////
rule "Zeitgesteuerte Heizung Aufstehen Mo."
when
Time cron "0 0 7 ? * MON *"
then
Bathroom_Heating.sendCommand(comfort)
LivingRoom_Heating.sendCommand(comfort)
Bedroom_Heating.sendCommand(comfort)
Hallway_Heating.sendCommand(comfort)
Kitchen_Heating.sendCommand(comfort)
end
The Group idea is good but this Way i can change every item individually.
I got a new idea but could not find if it works the way i think, maybe you can tell my. My idea looks like this:
when
Time cron "0 0 7 ? * MON *"
then
if (item.state == ON) {
Bathroom_Heating.sendCommand(comfort)
LivingRoom_Heating.sendCommand(comfort)
Bedroom_Heating.sendCommand(comfort)
Hallway_Heating.sendCommand(comfort)
Kitchen_Heating.sendCommand(comfort)
}
end