mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
30_HUEBridge.pm: added readings for current bridge resources usage
git-svn-id: https://svn.fhem.de/fhem/trunk@25568 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
76be4991dd
commit
2abc6ece1b
@ -2637,6 +2637,16 @@ HUEBridge_dispatch($$$;$)
|
|||||||
#return ($json->[0]);
|
#return ($json->[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( $hash == $param->{chash} ) {
|
||||||
|
readingsBeginUpdate($hash);
|
||||||
|
foreach my $resource (qw(lights groups sensors scenes rules schedules)) {
|
||||||
|
next if( !defined($json->{$resource}) );
|
||||||
|
|
||||||
|
readingsBulkUpdateIfChanged($hash, $resource, scalar %{$json->{$resource}}, 1);
|
||||||
|
}
|
||||||
|
readingsEndUpdate($hash,1);
|
||||||
|
}
|
||||||
|
|
||||||
if( $hash == $param->{chash} ) {
|
if( $hash == $param->{chash} ) {
|
||||||
if( !defined($type) ) {
|
if( !defined($type) ) {
|
||||||
HUEBridge_Parse($hash,$json);
|
HUEBridge_Parse($hash,$json);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user