define <name> WeekdayTimer <device> [<language>] [weekdays] <profile> <command>|<condition>
set <device> <para>
The following parameter are defined:
Example:
define shutter WeekdayTimer bath 12345|05:20|up 12345|20:30|down
define heatingBath WeekdayTimer bath 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|eco
{fhem("set dummy on"); fhem("set $NAME desired-temp $EVENT");}
At the given times and weekdays only(!) the command will be executed.
define dimmer WeekdayTimer livingRoom Sa-Su,We|07:00|dim30% Sa-Su,We|21:00|dim90% (ReadingsVal("WeAreThere", "state", "no") eq "yes")
The dimmer is only set to dimXX% if the dummy variable WeAreThere is "yes"(not a real live example).
If you want to have set all WeekdayTimer their current value (after a temperature lowering phase holidays)
you can call the function WeekdayTimer_SetParm(<"WD-device">) or WeekdayTimer_SetAllParms().
This call can be automatically coupled to a dummy by a notify:
define dummyNotify notify Dummy:. * {WeekdayTimer_SetAllTemps()}
Some definitions without comment:
The daylist can be given globaly for the whole Heating_Control:
define hc Heating_Control HeizungKueche de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
define hc Heating_Control HeizungKueche de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
define hc Heating_Control HeizungKueche de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
define hw Heating_Control HeizungKueche de mo-so, $we|{sunrise_abs_dat($date)}|18 mo-so, $we|{sunset_abs_dat($date)}|22
define ht Heating_Control HeizungKueche de mo-so,!$we|{sunrise_abs_dat($date)}|18 mo-so,!$we|{sunset_abs_dat($date)}|22
define hh Heating_Control HeizungKueche de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
define hx Heating_Control HeizungKueche de 22:35|25 23:00|16
define HeizungWohnen_an_wt Heating_Control HeizungWohnen de !$we 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de $we 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de 78 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de 57 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de fr,$we 09:00|19 (heizungAnAus("Ein"))
set <name> <value>
value
is one of:disable # disables the Weekday_Timer enable # enables the Weekday_TimerExamples:
set wd disable
set wd enable
attr wd delayedExecutionCond isDelayed("$HEATING_CONTROL","$WEEKDAYTIMER","$TIME","$NAME","$EVENT")the parameter $WEEKDAYTIMER(timer name) $TIME $NAME(device name) $EVENT are replaced at runtime by the correct value.
sub isDelayed($$$$$) { my($hc, $wdt, $tim, $nam, $event ) = @_; my $theSunIsStillshining = ... return ($tim eq "16:30" && $theSunIsStillshining) ; }