mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
59_Twilight: remove NOTIFYDEF when DEF changes, #123375
git-svn-id: https://svn.fhem.de/fhem/trunk@25067 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
622ccfa485
commit
640bcb03b0
@ -116,12 +116,13 @@ sub Twilight_Define {
|
|||||||
my $href = shift;
|
my $href = shift;
|
||||||
return if !defined $aref && !defined $href;
|
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>]'
|
return 'syntax: define <name> Twilight [<latitude> <longitude>] [indoorHorizon=... ] [weatherDevice=<device:reading>]'
|
||||||
if int(@$aref) < 2 || int(@$aref) > 6;
|
if int(@$aref) < 2 || int(@$aref) > 6;
|
||||||
|
|
||||||
my $DEFmayChange = int(@$aref) == 6 ? 1 : 0;
|
my $DEFmayChange = int(@$aref) == 6 ? 1 : 0;
|
||||||
|
notifyRegexpChanged( $hash, q{} );
|
||||||
|
|
||||||
my $weather = q{none};
|
my $weather = q{none};
|
||||||
$weather = pop @$aref if int(@$aref) == 6 || int(@$aref) == 4 && !looks_like_number($$aref[3]);
|
$weather = pop @$aref if int(@$aref) == 6 || int(@$aref) == 4 && !looks_like_number($$aref[3]);
|
||||||
@ -177,7 +178,7 @@ sub Twilight_Undef {
|
|||||||
|
|
||||||
deleteAllRegIntTimer($hash);
|
deleteAllRegIntTimer($hash);
|
||||||
|
|
||||||
notifyRegexpChanged( $hash, "" );
|
notifyRegexpChanged( $hash, q{} );
|
||||||
for my $key ( keys %{ $hash->{helper}{extWeather} } ) {
|
for my $key ( keys %{ $hash->{helper}{extWeather} } ) {
|
||||||
delete $hash->{helper}{extWeather}{$key};
|
delete $hash->{helper}{extWeather}{$key};
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,6 @@ attr DEVICE eventMap { usr=>{'dim.100'=>'dim 99' } }
|
|||||||
attr DEVICE webCmd dim
|
attr DEVICE webCmd dim
|
||||||
attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99
|
attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99
|
||||||
set DEVICE attrTemplate speechcontrol_type_light
|
set DEVICE attrTemplate speechcontrol_type_light
|
||||||
attr DEVICE model zigbee2mqtt_light_dimmer
|
|
||||||
setreading DEVICE attrTemplateVersion zwave_dimmer_20211011
|
setreading DEVICE attrTemplateVersion zwave_dimmer_20211011
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user