mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 12:46:03 +00:00
76_SolarForecast.pm: contrib 0.63.1
git-svn-id: https://svn.fhem.de/fhem/trunk@26064 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e9d3998722
commit
70577691e7
@ -7208,8 +7208,15 @@ return;
|
||||
sub isConsumerOn {
|
||||
my $hash = shift;
|
||||
my $c = shift;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
my $cname = ConsumerVal ($hash, $c, "name", ""); # Devicename Customer
|
||||
|
||||
if(!$defs{$cname}) {
|
||||
Log3($name, 1, qq{$name - the consumer device "$cname" is invalid, the "on" state can't be identified});
|
||||
return;
|
||||
}
|
||||
|
||||
my $reg = ConsumerVal ($hash, $c, "onreg", "on");
|
||||
my $rswstate = ConsumerVal ($hash, $c, "rswstate", "state"); # Reading mit Schaltstatus
|
||||
my $swstate = ReadingsVal ($cname, $rswstate, "undef");
|
||||
@ -7227,8 +7234,15 @@ return;
|
||||
sub isConsumerOff {
|
||||
my $hash = shift;
|
||||
my $c = shift;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
my $cname = ConsumerVal ($hash, $c, "name", ""); # Devicename Customer
|
||||
|
||||
if(!$defs{$cname}) {
|
||||
Log3($name, 1, qq{$name - the consumer device "$cname" is invalid, the "off" state can't be identified});
|
||||
return;
|
||||
}
|
||||
|
||||
my $reg = ConsumerVal ($hash, $c, "offreg", "off");
|
||||
my $rswstate = ConsumerVal ($hash, $c, "rswstate", "state"); # Reading mit Schaltstatus
|
||||
my $swstate = ReadingsVal ($cname, $rswstate, "undef");
|
||||
|
Loading…
x
Reference in New Issue
Block a user