diff --git a/fhem/CHANGED b/fhem/CHANGED index ee36387b5..d351e07ad 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 88_HMCCU: Keep eventMap when resetting attributes - bugfix: 88_HMCCU: Fixed attribute room bug - new: 58_RPI_1Wire: Raspberry Pi 1Wire interface replacing 58_GPIO4 - change: 73_AutoShuttersControl: change names of CommandTemplate variables, diff --git a/fhem/FHEM/88_HMCCU.pm b/fhem/FHEM/88_HMCCU.pm index de14e4568..c5e6e9b3f 100755 --- a/fhem/FHEM/88_HMCCU.pm +++ b/fhem/FHEM/88_HMCCU.pm @@ -57,7 +57,7 @@ my %HMCCU_CUST_CHN_DEFAULTS; my %HMCCU_CUST_DEV_DEFAULTS; # HMCCU version -my $HMCCU_VERSION = '5.0 213001927'; +my $HMCCU_VERSION = '5.0 213011850'; # Timeout for CCU requests (seconds) my $HMCCU_TIMEOUT_REQUEST = 4; @@ -6642,11 +6642,9 @@ sub HMCCU_SetDefaultAttributes ($;$) $parRef //= { mode => 'update', role => undef, roleChn => undef }; my $role; -# HMCCU_Log ($clHash, 2, HMCCU_RefToString($parRef)); - if ($parRef->{mode} eq 'reset') { # List of attributes to be removed - my @removeAttr = ('ccureadingname', 'ccuscaleval', 'eventMap', 'cmdIcon', + my @removeAttr = ('ccureadingname', 'ccuscaleval', 'cmdIcon', 'substitute', 'webCmd', 'widgetOverride' ); diff --git a/fhem/FHEM/88_HMCCUCHN.pm b/fhem/FHEM/88_HMCCUCHN.pm index 5219e4788..d067130fd 100644 --- a/fhem/FHEM/88_HMCCUCHN.pm +++ b/fhem/FHEM/88_HMCCUCHN.pm @@ -30,7 +30,7 @@ sub HMCCUCHN_Set ($@); sub HMCCUCHN_Get ($@); sub HMCCUCHN_Attr ($@); -my $HMCCUCHN_VERSION = '5.0 213001927'; +my $HMCCUCHN_VERSION = '5.0 213011850'; ###################################################################### # Initialize module @@ -360,12 +360,14 @@ sub HMCCUCHN_Set ($@) elsif ($lcopt eq 'defaults') { my $mode = shift @$a // 'update'; my $rc = 0; + my $retMsg = 'OK'; if ($mode ne 'old') { $rc = HMCCU_SetDefaultAttributes ($hash, { mode => $mode, role => undef, roleChn => undef }); + $retMsg = 'Please remove HMCCU 4.3 entries from attribute eventMap' if ($rc && $mode eq 'reset' && exists($attr{$name}{eventMap})); } $rc = HMCCU_SetDefaults ($hash) if (!$rc); HMCCU_RefreshReadings ($hash) if ($rc); - return HMCCU_SetError ($hash, $rc == 0 ? "No default attributes found" : "OK"); + return HMCCU_SetError ($hash, $rc == 0 ? 'No default attributes found' : $retMsg); } else { return "Unknown argument $opt choose one of $syntax"; diff --git a/fhem/FHEM/88_HMCCUDEV.pm b/fhem/FHEM/88_HMCCUDEV.pm index ae2bebb83..f5649777b 100644 --- a/fhem/FHEM/88_HMCCUDEV.pm +++ b/fhem/FHEM/88_HMCCUDEV.pm @@ -31,7 +31,7 @@ sub HMCCUDEV_Set ($@); sub HMCCUDEV_Get ($@); sub HMCCUDEV_Attr ($@); -my $HMCCUDEV_VERSION = '5.0 213001927'; +my $HMCCUDEV_VERSION = '5.0 213011850'; ###################################################################### # Initialize module @@ -448,12 +448,14 @@ sub HMCCUDEV_Set ($@) elsif ($lcopt eq 'defaults') { my $mode = shift @$a // 'update'; my $rc = 0; + my $retMsg = 'OK'; if ($mode ne 'old') { $rc = HMCCU_SetDefaultAttributes ($hash, { mode => $mode, role => undef, roleChn => undef }); + $retMsg = 'Please remove HMCCU 4.3 entries from attribute eventMap' if ($rc && $mode eq 'reset' && exists($attr{$name}{eventMap})); } $rc = HMCCU_SetDefaults ($hash) if (!$rc); HMCCU_RefreshReadings ($hash) if ($rc); - return HMCCU_SetError ($hash, $rc == 0 ? 'No default attributes found' : 'OK'); + return HMCCU_SetError ($hash, $rc == 0 ? 'No default attributes found' : $retMsg); } else { return "Unknown argument $opt choose one of $syntax";