Skip to content

Commit

Permalink
fix(fhempy): create fhempy_log only if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
fhempy committed Jan 2, 2023
1 parent edba7e9 commit 781adc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FHEM/10_fhempyServer.pm
Expand Up @@ -195,7 +195,7 @@ sub fhempyServer_Attr($$$)

if( $attrName eq 'logfile' ) {
if( $cmd eq "set" && $attrVal && $attrVal ne 'FHEM' ) {
fhem( "defmod fhempy_log FileLog $attrVal Logfile" );
fhem( "defmod fhempy_log FileLog $attrVal Logfile" ) if( !exists($defs{"fhempy_log"}) );
CommandAttr( undef, 'fhempy_log room hidden' ) if( !AttrVal($name, 'room', undef ) );
CommandAttr( undef, 'fhempy_log group fhempy' ) if( !AttrVal($name, 'group', undef ) );
CommandAttr( undef, 'fhempy_log icon file_unknown' ) if( !AttrVal($name, 'icon', undef ) );
Expand Down

0 comments on commit 781adc1

Please sign in to comment.