little bugfix

This commit is contained in:
Marko Oldenburg 2021-04-20 21:55:26 +02:00
parent df3c1e66db
commit 0c937e252e
2 changed files with 7 additions and 5 deletions

View File

@ -1,2 +1,2 @@
UPD 2021-04-20_21:40:31 6866 FHEM/46_TeslaPowerwall2AC.pm
UPD 2021-04-20_21:50:19 30167 lib/FHEM/Tesla/Powerwall.pm
UPD 2021-04-20_21:55:17 30201 lib/FHEM/Tesla/Powerwall.pm

View File

@ -1028,17 +1028,19 @@ sub DeletePassword {
sub Rename {
my $new = shift;
my $old = shift;
my $hash = $::defs{$new};
my ($passResp,$passErr);
($passResp,$passErr) = $hash->{helper}->{passObj}->setRename($new,$old);
::Log3($name, 1,
qq(TeslaPowerwall2AC \(${name}\) - error while change the password hash after rename - $passErr)
::Log3($new, 1,
qq(TeslaPowerwall2AC \(${new}\) - error while change the password hash after rename - $passErr)
if ( !defined($passResp)
and defined($passErr) );
::Log3($name, 1,
qq(TeslaPowerwall2AC \(${name}\) - change password hash after rename successfully)
::Log3($new, 1,
qq(TeslaPowerwall2AC \(${new}\) - change password hash after rename successfully)
if ( defined($passResp)
and !defined($passErr) );