59_Twilight: remove NOTIFYDEF when DEF changes, #123375

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25067 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2021-10-13 04:26:30 +00:00
parent f8a0f223e8
commit 1c0ece6d80
2 changed files with 3 additions and 3 deletions

View File

@ -116,12 +116,13 @@ sub Twilight_Define {
my $href = shift;
return if !defined $aref && !defined $href;
return $@ unless ( FHEM::Meta::SetInternals($hash) );
return $@ if !FHEM::Meta::SetInternals($hash);
return 'syntax: define <name> Twilight [<latitude> <longitude>] [indoorHorizon=... ] [weatherDevice=<device:reading>]'
if int(@$aref) < 2 || int(@$aref) > 6;
my $DEFmayChange = int(@$aref) == 6 ? 1 : 0;
notifyRegexpChanged( $hash, q{} );
my $weather = q{none};
$weather = pop @$aref if int(@$aref) == 6 || int(@$aref) == 4 && !looks_like_number($$aref[3]);
@ -177,7 +178,7 @@ sub Twilight_Undef {
deleteAllRegIntTimer($hash);
notifyRegexpChanged( $hash, "" );
notifyRegexpChanged( $hash, q{} );
for my $key ( keys %{ $hash->{helper}{extWeather} } ) {
delete $hash->{helper}{extWeather}{$key};
}

View File

@ -66,7 +66,6 @@ attr DEVICE eventMap { usr=>{'dim.100'=>'dim 99' } }
attr DEVICE webCmd dim
attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99
set DEVICE attrTemplate speechcontrol_type_light
attr DEVICE model zigbee2mqtt_light_dimmer
setreading DEVICE attrTemplateVersion zwave_dimmer_20211011