-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FHEMBUIENRADAR-46] support IsDisabled()
- Loading branch information
Christoph Morrison
committed
Apr 12, 2020
1 parent
8b7b54d
commit ad7f769
Showing
4 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Last Buienradar updates (12.04.2020) | ||
Last Buienradar updates (13.04.2020) | ||
8b7b54d 12.04.2020 23:43 [FHEMBUIENRADAR-45] removed testVal() | ||
3278350 12.04.2020 21:56 [FHEMBUIENRADAR-44] followed perlcritics guidelines in severity 5 | ||
183e202 08.01.2020 22:06 [FHEMBUIENRADAR-43] recalculate RainAmount as mm/h (Issue #9) | ||
0019217 08.01.2020 21:45 [FHEMBUIENRADAR-39] update meta.json (Issue #11) | ||
9883361 08.01.2020 21:43 [FHEMBUIENRADAR-39] added ColourBarChart | ||
13b073b 08.01.2020 20:29 [FHEMBUIENRADAR-39] added bar chart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ use GPUtils qw(GP_Import GP_Export); | |
use experimental qw( switch ); | ||
|
||
our $device; | ||
our $version = '2.3.1'; | ||
our $version = '2.3.2'; | ||
our $default_interval = ONE_MINUTE * 2; | ||
our @errors; | ||
|
||
|
@@ -303,11 +303,18 @@ sub Attr { | |
if ($attribute_value =~ /(on|1)/) { | ||
::RemoveInternalTimer( $hash, "FHEM::Buienradar::Timer" ); | ||
$hash->{NEXTUPDATE} = undef; | ||
$hash->{STATE} = "inactive"; | ||
# this is a workaround: ::IsDisabled checks only for "disable", but not for "disabled" | ||
# so manually set $::attr{$device_name}{"disable"} without calling Buienradar::Attr | ||
$::attr{$device_name}{"disable"} = 1; | ||
return undef; | ||
} | ||
|
||
if ($attribute_value =~ /(off|0)/) { | ||
Timer($hash); | ||
# this is a workaround: ::IsDisabled checks only for "disable", but not for "disabled" | ||
# so manually set $::attr{$device_name}{"disable"} without calling Buienradar::Attr | ||
delete $::attr{$device_name}{"disable"}; | ||
return undef; | ||
} | ||
} | ||
|
@@ -1170,7 +1177,7 @@ sub Debugging { | |
], | ||
"release_status": "development", | ||
"license": "Unlicense", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"author": [ | ||
"Christoph Morrison <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
DEL ./FHEM/59_Buienradar.pm | ||
UPD 2020-04-12_23:41:22 41679 FHEM/59_Buienradar.pm | ||
UPD 2020-04-13_00:23:49 42317 FHEM/59_Buienradar.pm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
], | ||
"release_status": "development", | ||
"license": "Unlicense", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"author": [ | ||
"Christoph Morrison <[email protected]>" | ||
], | ||
|