mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
57_Calendar, 59_Weather: moved NOTIFYDEV from _Initialize do _Define
git-svn-id: https://svn.fhem.de/fhem/trunk@11136 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6d6575d3fb
commit
057f146345
@ -1461,7 +1461,6 @@ sub Calendar_Initialize($) {
|
||||
$hash->{GetFn} = "Calendar_Get";
|
||||
$hash->{SetFn} = "Calendar_Set";
|
||||
$hash->{AttrFn} = "Calendar_Attr";
|
||||
$hash->{NOTIFYDEV} = "global";
|
||||
$hash->{NotifyFn}= "Calendar_Notify";
|
||||
$hash->{AttrList}= "hideOlderThan hideLaterThan onCreateEvent $readingFnAttributes";
|
||||
}
|
||||
@ -1480,6 +1479,7 @@ sub Calendar_Define($$) {
|
||||
" define <name> Calendar ical file <FILENAME> [interval]"
|
||||
if(($#a < 4 && $#a > 5) || ($a[2] ne 'ical') || (($a[3] ne 'url') && ($a[3] ne 'file')));
|
||||
|
||||
$hash->{NOTIFYDEV} = "global";
|
||||
readingsSingleUpdate($hash, "state", "initialized", 1);
|
||||
|
||||
my $name = $a[0];
|
||||
|
@ -87,7 +87,6 @@ sub Weather_Initialize($) {
|
||||
$hash->{GetFn} = "Weather_Get";
|
||||
$hash->{SetFn} = "Weather_Set";
|
||||
$hash->{AttrList}= $readingFnAttributes;
|
||||
$hash->{NOTIFYDEV} = "global";
|
||||
$hash->{NotifyFn}= "Weather_Notify";
|
||||
|
||||
#Weather_DebugCodes('de');
|
||||
@ -419,6 +418,7 @@ sub Weather_Define($$) {
|
||||
return "syntax: define <name> Weather <location> [interval [en|de|nl]]"
|
||||
if(int(@a) < 3 && int(@a) > 5);
|
||||
|
||||
$hash->{NOTIFYDEV} = "global";
|
||||
$hash->{STATE} = "Initialized";
|
||||
$hash->{fhem}{interfaces}= "temperature;humidity;wind";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user