diff --git a/fhem/FHEM/98_powerMap.pm b/fhem/FHEM/98_powerMap.pm index eefebf92a..fd8ce7de4 100644 --- a/fhem/FHEM/98_powerMap.pm +++ b/fhem/FHEM/98_powerMap.pm @@ -217,10 +217,13 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 100 => 8.5, + }, state => { unreachable => 0, - 0 => 0.4, - 100 => 8.5, + '*' => 'pct', }, }, }, @@ -236,10 +239,13 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 100 => 10, + }, state => { unreachable => 0, - 0 => 0.4, - 100 => 10, + '*' => 'pct', }, }, }, @@ -249,10 +255,13 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 100 => 8.5, + }, state => { unreachable => 0, - 0 => 0.4, - 100 => 10, + '*' => 'pct', }, }, }, @@ -298,10 +307,13 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 100 => 12, + }, state => { unreachable => 0, - 0 => 0.4, - 100 => 12, + '*' => 'pct', }, }, }, @@ -311,10 +323,13 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 100 => 20.5, + }, state => { unreachable => 0, - 0 => 0.4, - 100 => 20.5, + '*' => 'pct', }, }, }, @@ -324,19 +339,22 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 10 => 1.2, + 20 => 1.7, + 30 => 1.9, + 40 => 2.3, + 50 => 2.7, + 60 => 3.4, + 70 => 4.7, + 80 => 5.9, + 90 => 7.5, + 100 => 9.2, + }, state => { unreachable => 0, - 0 => 0.4, - 10 => 1.2, - 20 => 1.7, - 30 => 1.9, - 40 => 2.3, - 50 => 2.7, - 60 => 3.4, - 70 => 4.7, - 80 => 5.9, - 90 => 7.5, - 100 => 9.2, + '*' => 'pct', }, }, }, @@ -346,19 +364,22 @@ my %powerMap_tmpl = ( rname_E => 'energy', rname_P => 'consumption', map => { + pct => { + 0 => 0.4, + 10 => 1.2, + 20 => 1.7, + 30 => 1.9, + 40 => 2.3, + 50 => 2.7, + 60 => 3.4, + 70 => 4.7, + 80 => 5.9, + 90 => 7.5, + 100 => 9.2, + }, state => { unreachable => 0, - 0 => 0.4, - 10 => 1.2, - 20 => 1.7, - 30 => 1.9, - 40 => 2.3, - 50 => 2.7, - 60 => 3.4, - 70 => 4.7, - 80 => 5.9, - 90 => 7.5, - 100 => 9.2, + '*' => 'pct', }, }, }, @@ -1707,8 +1728,7 @@ sub powerMap_update($;$) { Example for HUE white light bulb:
- 'state' => {
- 'unreachable' => 0,
+ 'pct' => {
'0' => 0.4,
'10' => 1.2,
'20' => 1.7,
@@ -1721,6 +1741,10 @@ sub powerMap_update($;$) {
'90' => 7.5,
'100' => 9.2,
},
+ 'state' => {
+ 'unreachable' => 0,
+ '*' => 'pct',
+ },
- 'state' => {
- 'unreachable' => 0,
+ 'pct' => {
'0' => 0.4,
'10' => 1.2,
'20' => 1.7,
@@ -1894,6 +1917,10 @@ sub powerMap_update($;$) {
'90' => 7.5,
'100' => 9.2,
},
+ 'state' => {
+ 'unreachable' => 0,
+ '*' => 'pct',
+ },