2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

10_SOMFY: FIX: hex value warning for rollcode / empty ioTypes

git-svn-id: https://svn.fhem.de/fhem/trunk@21792 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2020-04-28 10:19:13 +00:00
parent 36f5c6cc04
commit 4fc08d0805

View File

@ -76,6 +76,10 @@
# - new attr autoStoreRollingCode - store rc in uniqueID
# - store rolling code in uniqueid based on addr
# - ensure largest rollingcode (either reading or unqieid is used)
# - FIX: hex value warning for rollcode
# - FIX: allow empty ioTypes for testing
#
#
#
###############################################################################
#
@ -1068,7 +1072,10 @@ sub SOMFY_getRollCode($)
if ( AttrVal( $name, "autoStoreRollingCode", 0 ) ) {
my $storeRC = uc( SOMFY_readRollCode( $hash ) );
$storeRC = "0000" if ( $storeRC !~ /[0-9a-f]{4}/ );
if ( $storeRC > $rollingcode ) {
my $storeDec = hex( $storeRC );
my $rollDec = hex( $rollingcode );
if ( $storeDec > $rollDec ) {
$rollingcode = $storeRC;
}
}
@ -1591,6 +1598,7 @@ sub SOMFY_SendCommand($@)
my $io = $hash->{IODev};
my $ioType = $io->{TYPE};
$ioType = "" if ( ! defined( $ioType ) );
return $ret if(IsIgnored($name));
return $ret if(IsDisabled($name));