2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 07:56:03 +00:00

98_powerMap: fix HUE templates

git-svn-id: https://svn.fhem.de/fhem/trunk@13212 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-01-23 17:47:53 +00:00
parent e657340bbd
commit b96d35efbe

View File

@ -217,11 +217,14 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
100 => 8.5, 100 => 8.5,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -236,11 +239,14 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
100 => 10, 100 => 10,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -249,10 +255,13 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
pct => {
0 => 0.4,
100 => 8.5,
},
state => { state => {
unreachable => 0, unreachable => 0,
0 => 0.4, '*' => 'pct',
100 => 10,
}, },
}, },
}, },
@ -298,11 +307,14 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
100 => 12, 100 => 12,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -311,11 +323,14 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
100 => 20.5, 100 => 20.5,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -324,8 +339,7 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
10 => 1.2, 10 => 1.2,
20 => 1.7, 20 => 1.7,
@ -338,6 +352,10 @@ my %powerMap_tmpl = (
90 => 7.5, 90 => 7.5,
100 => 9.2, 100 => 9.2,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -346,8 +364,7 @@ my %powerMap_tmpl = (
rname_E => 'energy', rname_E => 'energy',
rname_P => 'consumption', rname_P => 'consumption',
map => { map => {
state => { pct => {
unreachable => 0,
0 => 0.4, 0 => 0.4,
10 => 1.2, 10 => 1.2,
20 => 1.7, 20 => 1.7,
@ -360,6 +377,10 @@ my %powerMap_tmpl = (
90 => 7.5, 90 => 7.5,
100 => 9.2, 100 => 9.2,
}, },
state => {
unreachable => 0,
'*' => 'pct',
},
}, },
}, },
@ -1707,8 +1728,7 @@ sub powerMap_update($;$) {
Example for HUE white light bulb: Example for HUE white light bulb:
<ul> <ul>
<code><pre> <code><pre>
'state' =&gt; { 'pct' =&gt; {
'unreachable' =&gt; 0,
'0' =&gt; 0.4, '0' =&gt; 0.4,
'10' =&gt; 1.2, '10' =&gt; 1.2,
'20' =&gt; 1.7, '20' =&gt; 1.7,
@ -1721,6 +1741,10 @@ sub powerMap_update($;$) {
'90' =&gt; 7.5, '90' =&gt; 7.5,
'100' =&gt; 9.2, '100' =&gt; 9.2,
}, },
'state' =&gt; {
'unreachable' =&gt; 0,
'*' =&gt; 'pct',
},
</pre></code><br> </pre></code><br>
</ul> </ul>
</li> </li>
@ -1880,8 +1904,7 @@ sub powerMap_update($;$) {
Beispiel f&uuml;r eine HUE white Gl&uuml;hlampe: Beispiel f&uuml;r eine HUE white Gl&uuml;hlampe:
<ul> <ul>
<code><pre> <code><pre>
'state' =&gt; { 'pct' =&gt; {
'unreachable' =&gt; 0,
'0' =&gt; 0.4, '0' =&gt; 0.4,
'10' =&gt; 1.2, '10' =&gt; 1.2,
'20' =&gt; 1.7, '20' =&gt; 1.7,
@ -1894,6 +1917,10 @@ sub powerMap_update($;$) {
'90' =&gt; 7.5, '90' =&gt; 7.5,
'100' =&gt; 9.2, '100' =&gt; 9.2,
}, },
'state' =&gt; {
'unreachable' =&gt; 0,
'*' =&gt; 'pct',
},
</pre></code><br> </pre></code><br>
</ul> </ul>
</li> </li>