add condition for setter
This commit is contained in:
		| @@ -1,2 +1,2 @@ | |||||||
| UPD 2020-10-20_15:51:15 6126 FHEM/98_backupToStorage.pm | UPD 2020-10-20_15:51:15 6126 FHEM/98_backupToStorage.pm | ||||||
| UPD 2020-10-24_09:56:25 16492 lib/FHEM/backupToStorage.pm | UPD 2020-10-24_09:59:52 16828 lib/FHEM/backupToStorage.pm | ||||||
|   | |||||||
| @@ -294,6 +294,16 @@ sub Set { | |||||||
|  |  | ||||||
|         DeletePassword($hash); |         DeletePassword($hash); | ||||||
|     } |     } | ||||||
|  |     elsif ( lc $cmd eq 'active' ) { | ||||||
|  |         return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); | ||||||
|  |      | ||||||
|  |         readingsSingleUpdate( $hash, 'state', $cmd, 1 ); | ||||||
|  |     } | ||||||
|  |     elsif ( lc $cmd eq 'inactive' ) { | ||||||
|  |         return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); | ||||||
|  |          | ||||||
|  |         readingsSingleUpdate( $hash, 'state', $cmd, 1 ); | ||||||
|  |     } | ||||||
|     else { |     else { | ||||||
|         my $list    = 'active:noArg inactive:noArg'; |         my $list    = 'active:noArg inactive:noArg'; | ||||||
|         $list       .= ( |         $list       .= ( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user