define <name> WeekdayTimer <device> [<language>] [weekdays] <profile> <command>|<condition>
set <device> <para>
The following parameter are defined:
Examples:
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 Weekdaytimer:
define wd Weekdaytimer device de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
define wd Weekdaytimer device de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
define wd Weekdaytimer device de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
define wd Weekdaytimer device de mo-so, $we|{sunrise_abs_dat($date)}|on mo-so, $we|{sunset_abs_dat($date)}|off
define wd Weekdaytimer device de mo-so,!$we|{sunrise_abs_dat($date)}|aus mo-so,!$we|{sunset_abs_dat($date)}|aus
define wd Weekdaytimer device de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
define wd Weekdaytimer device de 22:35|25 23:00|16
it is possible to construct the parameter as Perlcode:
define wd Weekdaytimer device de !$we 09:00|19 (function("Ein"))
define wd Weekdaytimer device de $we 09:00|19 (function("Ein"))
define wd Weekdaytimer device de 78 09:00|19 (function("exit"))
define wd Weekdaytimer device de 57 09:00|19 (function("exit"))
define wd Weekdaytimer device de fr,$we 09:00|19 (function("exit"))
A detailed examle can be found in Heating_Control
... 7|23:35|{getParameter(13,"this")} 7|23:36|{getParameter(14,"that")}
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) ; }