10_ZWave.pm: remove duplicate code

git-svn-id: https://svn.fhem.de/fhem/trunk@22771 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2020-09-14 17:49:00 +00:00
parent 88a4c51a83
commit 923aa5b9a6

View File

@@ -1772,6 +1772,7 @@ my %zwm_unit = (
heating => ["kWh" ], heating => ["kWh" ],
cooling => ["kWh" ] cooling => ["kWh" ]
); );
my @meter_type_text = ("undef", "energy", "gas", "water", "heating", "cooling");
sub sub
ZWave_meterParse($$) ZWave_meterParse($$)
@@ -1789,7 +1790,6 @@ ZWave_meterParse($$)
"undef" : $rate_type_text[$rate_type]); "undef" : $rate_type_text[$rate_type]);
my $meter_type = ($v1 & 0x1f); my $meter_type = ($v1 & 0x1f);
my @meter_type_text =("undef", "energy", "gas", "water", "heating","cooling");
my $meter_type_text = ($meter_type > $#meter_type_text ? my $meter_type_text = ($meter_type > $#meter_type_text ?
"undef" : $meter_type_text[$meter_type]); "undef" : $meter_type_text[$meter_type]);
@@ -1843,7 +1843,6 @@ ZWave_meterParse($$)
} }
} }
my @meter_type_text =("undef", "energy", "gas", "water", "undef");
sub sub
ZWave_meterSet($$) ZWave_meterSet($$)
@@ -6236,7 +6235,7 @@ ZWave_firmwareUpdateParse($$$)
The command will reset ALL accumulated values, it is not possible to The command will reset ALL accumulated values, it is not possible to
choose a single value.</li> choose a single value.</li>
<li>meterResetToValue type value<br> <li>meterResetToValue type value<br>
Reset type (one of energy, gas or water) to the value specified. Reset type (one of energy,gas,water,heating,cooling) to the value specified.
Only supported by METER version 6.</li> Only supported by METER version 6.</li>
<br><br><b>Class MULTI_CHANNEL</b> <br><br><b>Class MULTI_CHANNEL</b>