2
0
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:
nasseeder1 2022-05-20 12:37:19 +00:00
parent e9d3998722
commit 70577691e7

View File

@ -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");