mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-09 20:57:11 +00:00
30_HUEBridge, 31_HUEDevice: support for Hue tap dial switch
git-svn-id: https://svn.fhem.de/fhem/trunk@26204 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4af598d1d5
commit
5b8dfcb14e
@ -1,5 +1,6 @@
|
||||
# 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.
|
||||
- feature: 30_HUEBridge, 31_HUEDevice: support for Hue tap dial switch
|
||||
- change: 96_Snapcast: PBP code restructured (part I)
|
||||
- bugfix: 49_SSCam: fix noQuotesForSID using in streaming devices type mjpeg
|
||||
- feature: 74_GardenaSmartDevice: add lona readings, [fix] - setter procedure
|
||||
|
@ -2673,6 +2673,18 @@ HUEBridge_dispatch($$$;$)
|
||||
$obj->{state}{eventtype} = $eventtype;
|
||||
$obj->{state}{buttonevent} = $buttonevent;
|
||||
|
||||
} elsif( $data->{type} eq 'relative_rotary' ) {
|
||||
$obj->{eventtype} = $data->{type};
|
||||
|
||||
if( my $last_event = $data->{relative_rotary}{last_event} ) {
|
||||
$obj->{state}{action} = $last_event->{action};
|
||||
|
||||
if( my $rotation = $last_event->{rotation} ) {
|
||||
$obj->{state}{steps} = $rotation->{steps};
|
||||
$obj->{state}{direction} = $rotation->{direction};
|
||||
}
|
||||
}
|
||||
|
||||
} elsif( $data->{type} eq 'temperature' ) {
|
||||
$obj->{state}{temperature} = int($data->{temperature}{temperature}*100) if( defined($data->{temperature})
|
||||
&& $data->{temperature}{temperature_valid} );
|
||||
|
@ -950,7 +950,7 @@ HUEDevice_Set($@)
|
||||
|
||||
} elsif( $cmd eq 'json' ) {
|
||||
return "usage: json [setsensor|configsensor] <json>" if( !@args );
|
||||
my $type = 'setsensor';
|
||||
my $type = 'updatesensor';
|
||||
if( $args[0] eq 'setsensor' || $args[0] eq 'configsensor' ) {
|
||||
$type = shift @args;
|
||||
}
|
||||
@ -1899,6 +1899,10 @@ HUEDevice_Parse($$)
|
||||
$readings{eventtype} = $state->{eventtype} if( defined($state->{eventtype}) );
|
||||
$readings{eventduration} = $state->{eventduration} if( defined($state->{eventduration}) );
|
||||
|
||||
$readings{action} = $state->{action} if( defined($state->{action}) );
|
||||
$readings{steps} = $state->{steps} if( defined($state->{steps}) );
|
||||
$readings{direction} = $state->{direction} if( defined($state->{direction}) );
|
||||
|
||||
$readings{dark} = $state->{dark}?'1':'0' if( defined($state->{dark}) );
|
||||
$readings{humidity} = $state->{humidity} * 0.01 if( defined($state->{humidity}) );
|
||||
$readings{daylight} = $state->{daylight}?'1':'0' if( defined($state->{daylight}) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user