Hallo allerseits,
99_Utils.pm enthält ab sofort auch folgende Routinen aus zwei
Wiki-Einträgen:
trim()
rtrim()
ltrim()
UntoggleDirect() (vormals Untoggle() )
UntoggleIndirect() (vormals UntoggleNotify() )
Vielen Dank an die Authoren!
Die Wiki-Einträge sind mit dem Verweis auf 99_Utils.pm aktualisiert.
Enjoy,
Uli
######## trim #####################################################
# What : cuts blankspaces from the beginning and end of a string
# Call : { trim(" Hello ") }
# Source: http://www.somacon.com/p114.php ,
#
http://www.fhemwiki.de/wiki/TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen
######## ltrim ####################################################
# What : cuts blankspaces from the beginning of a string
# Call : { ltrim(" Hello") }
# Source: http://www.somacon.com/p114.php ,
#
http://www.fhemwiki.de/wiki/TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernensub
ltrim($)
######## rtrim ####################################################
# What : cuts blankspaces from the end of a string
# Call : { rtrim("Hello ") }
# Source: http://www.somacon.com/p114.php ,
#
http://www.fhemwiki.de/wiki/TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernensub
ltrim($)
######## UntoggleDirect ###########################################
# What : For devices paired directly, converts state 'toggle' into 'on' or
'off'
# Call : { UntoggleDirect("myDevice") }
# define untoggle_myDevice notify myDevice { UntoggleDirect("@") }
# Source: http://www.fhemwiki.de/wiki/FS20_Toggle_Events_auf_On/Off_umsetzen
######## UntoggleIndirect #########################################
# What : For devices paired indirectly, switches the target device 'on' or
'off' also when a 'toggle' was sent from the source device
# Call : { UntoggleIndirect("mySensorDevice","myActorDevice","50%") }
# define untoggle_mySensorDevice_myActorDevice notify
mySensorDevice { UntoggleIndirect("mySensorDevice","myActorDevice","50%%") }
# Source: http://www.fhemwiki.de/wiki/FS20_Toggle_Events_auf_On/Off_umsetzen
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com