define <name> WeekdayTimer <device> [<language>] [weekdays] <profile> <command>|<condition>
set <device> <para>
The following parameter are defined:
on-till:06\:00
will be a valid parameter.set <device> weekprofile <weekprofile-device:topic:profile>
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 (e.g. after a temperature lowering phase holidays)
you can call the function WeekdayTimer_SetParm("WD-device") or WeekdayTimer_SetAllParms().
To limit the affected WeekdayTimer devices to a subset of all of your WeekdayTimers, use the WDT_Group attribute and WeekdayTimer_SetAllParms("
This offers the same functionality than set wd WDT_Params WDT_Group
This call can be automatically coupled to a dummy by a notify:
define dummyNotify notify Dummy:. * {WeekdayTimer_SetAllParms()}
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
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 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"))
set <name> <value>
value
is one of:disable # disables the WeekdayTimer enable # enables the WeekdayTimer, switching times will be recaltulated. WDT_Params [one of: single, WDT_Group or all] weekprofile <weekprofile-device:topic:profile>
set wd disable
set wd enable
set wd WDT_Params WDT_Group
set wd weekprofile myWeekprofiles:holiday:livingrooms
set wd weekprofile myWeekprofiles:holiday:livingrooms
set myWeekprofiles send_to_device holiday:livingrooms wd
attr wd delayedExecutionCond isDelayed("$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($wdt, $tim, $nam, $event ) = @_; my $theSunIsStillshining = ... return ($tim eq "16:30" && $theSunIsStillshining) ; }
set wd WDT_Params WDT_Group
.