11_OWDevice: replaced deprecated smartmatch
git-svn-id: https://svn.fhem.de/fhem/trunk@30415 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it
|
# Do not insert empty lines here, update check depends on it
|
||||||
|
- change: 11_OWDevice: replaced deprecated smartmatch
|
||||||
- feature: 76_SolarForecast: Version 1.59.5
|
- feature: 76_SolarForecast: Version 1.59.5
|
||||||
- bugfix: 73_NUKIBridge: Refactor command handler return logic for clarity
|
- bugfix: 73_NUKIBridge: Refactor command handler return logic for clarity
|
||||||
- bugfix: 59_Weather: This commit addresses several issues with conditionals
|
- bugfix: 59_Weather: This commit addresses several issues with conditionals
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ package main;
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|
||||||
|
|
||||||
use vars qw(%owdevice);
|
use vars qw(%owdevice);
|
||||||
|
|
||||||
@@ -598,7 +597,7 @@ OWDevice_Get($@)
|
|||||||
return "get $name needs one argument" if(int(@a) != 2);
|
return "get $name needs one argument" if(int(@a) != 2);
|
||||||
my $cmdname= $a[1];
|
my $cmdname= $a[1];
|
||||||
my @getters= @{$hash->{fhem}{getters}};
|
my @getters= @{$hash->{fhem}{getters}};
|
||||||
if($cmdname ~~ @getters) {
|
if(main::contains_string($cmdname, @getters)) {
|
||||||
my $value= OWDevice_ReadValue($hash, $cmdname);
|
my $value= OWDevice_ReadValue($hash, $cmdname);
|
||||||
readingsSingleUpdate($hash,$cmdname,$value,1);
|
readingsSingleUpdate($hash,$cmdname,$value,1);
|
||||||
return $value;
|
return $value;
|
||||||
@@ -617,7 +616,7 @@ OWDevice_Set($@)
|
|||||||
my $cmdname= $a[1];
|
my $cmdname= $a[1];
|
||||||
my $value= $a[2];
|
my $value= $a[2];
|
||||||
my @setters= @{$hash->{fhem}{setters}};
|
my @setters= @{$hash->{fhem}{setters}};
|
||||||
if($cmdname ~~ @setters) {
|
if(main::contains_string($cmdname, @setters)) {
|
||||||
# LCD Display need more than two arguments, to display text
|
# LCD Display need more than two arguments, to display text
|
||||||
# added by m.fischer
|
# added by m.fischer
|
||||||
if($cmdname =~ /(line16.0|line16.1|line16.2|line16.3|screen16)/ ||
|
if($cmdname =~ /(line16.0|line16.1|line16.2|line16.3|screen16)/ ||
|
||||||
|
|||||||
Reference in New Issue
Block a user