mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
73_GasCalculator: bugfix: get/set list corrected for CounterDevice
git-svn-id: https://svn.fhem.de/fhem/trunk@12123 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
55da5723e8
commit
4278b8ca86
@ -769,15 +769,34 @@ sub GasCalculator_Notify($$)
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator End_________________________________________________________________________________________________________________________________";
|
||||
}
|
||||
|
||||
### If readings exist already, update list of available readings
|
||||
if($GasCalcDev->{READINGS})
|
||||
if ($attr{$GasCalcName}{ReadingDestination} eq "CalculatorDevice")
|
||||
{
|
||||
### Copy readings in list of available "gets" and "sets"
|
||||
%GasCalculator_gets = %{$GasCalcDev->{READINGS}};
|
||||
%GasCalculator_sets = %{$GasCalcDev->{READINGS}};
|
||||
### If readings exist, update list of available readings
|
||||
if($GasCalcDev->{READINGS})
|
||||
{
|
||||
### Copy readings in list of available "gets" and "sets"
|
||||
%GasCalculator_gets = %{$GasCalcDev->{READINGS}};
|
||||
%GasCalculator_sets = %{$GasCalcDev->{READINGS}};
|
||||
|
||||
### Create Log entries for debugging
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator - notify x_sets list: " . join(" ", (keys %GasCalculator_sets));
|
||||
### Create Log entries for debugging
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator - notify x_sets list: " . join(" ", (keys %GasCalculator_sets));
|
||||
}
|
||||
}
|
||||
elsif ($attr{$GasCalcName}{ReadingDestination} eq "CounterDevice")
|
||||
{
|
||||
### If readings exist, update list of available readings
|
||||
if($GasCountDev->{READINGS})
|
||||
{
|
||||
### Copy readings in list of available "gets" and "sets"
|
||||
%GasCalculator_gets = %{$GasCountDev->{READINGS}};
|
||||
%GasCalculator_sets = %{$GasCountDev->{READINGS}};
|
||||
|
||||
### Create Log entries for debugging
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator - notify x_sets list: " . join(" ", (keys %GasCalculator_sets));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
return undef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user