mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
46_TeslaPowerwall2AC: Powerwall overview
git-svn-id: https://svn.fhem.de/fhem/trunk@15976 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3ad04b57c9
commit
affbcf1f4d
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 74_XiaomiBTLESens: fix error messages
|
||||||
|
- feature: 46_TeslaPowerwall2AC: Powerwalls overwiev
|
||||||
- feature: 73_PRESENCE: new set commands overrideInterval and clearOverride
|
- feature: 73_PRESENCE: new set commands overrideInterval and clearOverride
|
||||||
to temporary override the check interval.
|
to temporary override the check interval.
|
||||||
new attributes retryCount and retryInterval
|
new attributes retryCount and retryInterval
|
||||||
|
@ -66,7 +66,7 @@ use HttpUtils;
|
|||||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||||
|
|
||||||
|
|
||||||
my $version = "0.2.3";
|
my $version = "0.4.0";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -231,6 +231,7 @@ sub TeslaPowerwall2AC_Notify($$) {
|
|||||||
|
|
||||||
TeslaPowerwall2AC_Timer_GetData($hash) if( grep /^INITIALIZED$/,@{$events}
|
TeslaPowerwall2AC_Timer_GetData($hash) if( grep /^INITIALIZED$/,@{$events}
|
||||||
or grep /^DELETEATTR.$name.disable$/,@{$events}
|
or grep /^DELETEATTR.$name.disable$/,@{$events}
|
||||||
|
or grep /^DELETEATTR.$name.interval$/,@{$events}
|
||||||
or (grep /^DEFINED.$name$/,@{$events} and $init_done) );
|
or (grep /^DEFINED.$name$/,@{$events} and $init_done) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -489,16 +490,21 @@ sub TeslaPowerwall2AC_ReadingsProcessing_Powerwalls($$) {
|
|||||||
|
|
||||||
|
|
||||||
if( ref($decode_json->{powerwalls}) eq "ARRAY" and scalar(@{$decode_json->{powerwalls}}) > 0 ) {
|
if( ref($decode_json->{powerwalls}) eq "ARRAY" and scalar(@{$decode_json->{powerwalls}}) > 0 ) {
|
||||||
|
my $i = 0;
|
||||||
|
|
||||||
foreach my $powerwall (@{$decode_json->{powerwalls}}) {
|
foreach my $powerwall (@{$decode_json->{powerwalls}}) {
|
||||||
if( ref($powerwall) eq "HASH" ) {
|
if( ref($powerwall) eq "HASH" ) {
|
||||||
|
|
||||||
while( my ($r,$v) = each %{$powerwall} ) {
|
while( my ($r,$v) = each %{$powerwall} ) {
|
||||||
$readings{$r} = $v;
|
$readings{'wall_'.$i.'_'.$r} = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$readings{'numberOfWalls'} = $i;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$readings{'error'} = 'aggregates response is not a Array';
|
$readings{'error'} = 'aggregates response is not a Array';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user