diff --git a/fhem/FHEM/98_WeekdayTimer.pm b/fhem/FHEM/98_WeekdayTimer.pm index 4cc1c64bf..fb5720fcf 100644 --- a/fhem/FHEM/98_WeekdayTimer.pm +++ b/fhem/FHEM/98_WeekdayTimer.pm @@ -1214,7 +1214,7 @@ sub Switch_Device { $attr{$name}{commandTemplate} = 'set $NAME ' . $setModifier . '$EVENT' if !defined $attr{$name}{commandTemplate}; - $command = AttrVal($hash->{NAME}, 'commandTemplate', 'commandTemplate not found'); + $command = AttrVal($name, 'commandTemplate', 'commandTemplate not found'); $command = 'set $NAME $EVENT' if defined $hash->{WDT_EVENTMAP} && defined $hash->{WDT_EVENTMAP}{$newParam}; $command = $hash->{COMMAND} if defined $hash->{COMMAND} && $hash->{COMMAND} ne ''; @@ -1506,16 +1506,13 @@ __END__
-

+ set wd weekprofile myWeekprofiles:holiday:livingrooms +
@@ -1626,35 +1622,29 @@ __END__
  • delayedExecutionCond
    defines a delay Function. When returning true, the switching of the device is delayed until the function returns a false value. The behavior is the same as if one of the WDT_delayedExecutionDevices returns "open". - -

    +
    Example: -
    -    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. -

    Note: If the function returns "1" or "true", state of the WeekdayTimer will be "open window", other return values will be used as values for state.
    +
    attr wd delayedExecutionCond isDelayed("$WEEKDAYTIMER","$TIME","$NAME","$EVENT")
    + The parameters $WEEKDAYTIMER (timer name), $TIME, $NAME (device name) and $EVENT will be replaced at runtime by the correct value. +
    Note: If the function returns "1" or "true", state of the WeekdayTimer will be "open window", other return values will be used as values for state.
    Example of a function: -
    -    sub isDelayed($$$$) {
    +    
    sub isDelayed($$$$) {
            my($wdt, $tim, $nam, $event ) = @_;
    -
            my $theSunIsStillshining = ...
    -
            return ($tim eq "16:30" && $theSunIsStillshining) ;
    -    }
    -    
    -
  • + } + +
  • + commandTemplate
    + If no explicit command is provided, you may change change the indicated defaults here (see also WDT_eventMap for even more options on how to modify command or $EVENT).

  • WDT_delayedExecutionDevices
    May contain a space separated list of devices (atm. only window sensors are supported). When one of them states to be open (typical reading names and values are known) the aktual switch is delayed, until either the window is closed or the next switching time is reached (this one will also be delayed). This is especially intended to prevent heating commands while windows are opened.

  • -
    +
  • WDT_Group
    Used to generate groups of WeekdayTimer devices to be switched together in case one of them is set to WDT_Params with the WDT_Group modifier, e.g. set wd WDT_Params WDT_Group.
    This originally was intended to allow Heating_Control devices to be migrated to WeekdayTimer by offering an alternative to the former Heating_Control_SetAllTemps() functionality.

  • -
    -
  • WDT_sendDelay
    This will add some seconds to each of the switching timers to avoid collissions in RF traffic, especially, when weekprofile option is used and e.g. a topic change may affect not only a single target device but many or a single profile is used for many devices.
    @@ -1669,16 +1659,17 @@ __END__ attr wd WDT_eventMap 22.0:dtp20+01 12.0:dtp20+02 18.0:dtp20+03
    Notes:
  • +
  • switchInThePast
    defines that the depending device will be switched in the past in definition and startup phase when the device is not recognized as a heating. Heatings are always switched in the past.
  • - +
  • disable
  • loglevel
  • event-on-update-reading