mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
73_ElectricityCalculator.pm: NotifyDev trigger fixed: notifyRegexpChanged
git-svn-id: https://svn.fhem.de/fhem/trunk@21326 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f3fef84bee
commit
92f91d97ae
@ -121,8 +121,11 @@ sub ElectricityCalculator_Define($$$)
|
||||
$hash->{system}{DecimalPlace} = "%.3f";
|
||||
}
|
||||
|
||||
### For debugging purpose only
|
||||
Log3 $name, 5, $name. " : ElectricityCalculator - RegEx : " . $RegEx;
|
||||
|
||||
### Defining notify trigger
|
||||
$hash->{NOTIFYDEV} = $RegEx;
|
||||
notifyRegexpChanged($hash, $RegEx);
|
||||
|
||||
### Writing log entry
|
||||
Log3 $name, 5, $name. " : ElectricityCalculator - Starting to define module";
|
||||
@ -347,6 +350,9 @@ sub ElectricityCalculator_Notify($$)
|
||||
my $NumberOfChangedEvents = int(@{$ElectricityCountNameEvents});
|
||||
my $RegEx = $ElectricityCalcDev->{REGEXP};
|
||||
|
||||
### For debugging purpose only
|
||||
Log3 $ElectricityCalcName, 5, $ElectricityCalcName. " : ElectricityCalculator_Notify - Trigger Dev Name : " . $ElectricityCountDev->{NAME};
|
||||
|
||||
### Check whether the Electricity calculator has been disabled
|
||||
if(IsDisabled($ElectricityCalcName))
|
||||
{
|
||||
@ -447,7 +453,6 @@ sub ElectricityCalculator_Notify($$)
|
||||
Log3 $ElectricityCalcName, 3, $ElectricityCalcName. " : ElectricityCalculator - The attribute room was missing and has been set to Electric Energy Counter";
|
||||
}
|
||||
}
|
||||
|
||||
if(!defined($attr{$ElectricityCalcName}{DecimalPlace}))
|
||||
{
|
||||
### Set attribute with standard value since it is not available
|
||||
|
Loading…
x
Reference in New Issue
Block a user