2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-27 10:37:13 +00:00

10_EnOcean: subType roomCtrlPanel.01 changed

git-svn-id: https://svn.fhem.de/fhem/trunk@29068 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus.schauer 2024-08-15 11:59:08 +00:00
parent aede7609da
commit f7db06ce51

View File

@ -6491,7 +6491,8 @@ sub EnOcean_Set($@) {
$cooling = $cooling eq 'on' ? 0x20 : 0;
$window = $window eq 'open' ? 0x10 : 0;
#$setpointShift = int(($setpointShift + $setpointShiftMax) * 255 / ($setpointShiftMax * 2));
$setpointShift = int(128 + 127.5 * $setpointShift / $setpointShiftMax);
my $offset = int(($setpointShiftMax - abs($setpointShift)) * 127.5 / $setpointShiftMax);
$setpointShift = ($setpointShift < 0) ? $offset : (255 - $offset);
my %fanSpeed = ('auto' => 0, 'off' => 1, 1 => 2, 2 => 3, 3 => 4);
$occupancy = $occupancy eq 'occupied' ? 1 : 0;
$data = sprintf "%02X%02X%02X%02X", $setpointType | $heating | $cooling | $window | 1,