Skip to content

Commit

Permalink
Dimmer (RGBW) in CuX2801 eingepflegt.
Browse files Browse the repository at this point in the history
Dimmer (RGBW) in CuX2801 eingepflegt.
  • Loading branch information
christian1180 committed Dec 19, 2024
1 parent 6d17b2c commit c8f06f3
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions components/CUX2801.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,72 @@ function CUX2801($component) {
. '</div>'
. '</div>';
}

// RGBW
if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['RGBW'])) {
$modalId = mt_rand();

if (!isset($component['color'])) $component['color'] = '#595959';
// ShowTime - Uhrzeit der letzten Änderung anzeigen
if(isset($component['showtime']))
{
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span>&nbsp;&nbsp;' ; }
else { $ShowTime = ''; }
}
else { $ShowTime = ''; }
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>'
. '<div data-toggle="collapse" data-target="#' . $modalId . '">'
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>'
. '<div class="pull-right">'
. $ShowTime
. '<span class="info" data-id="' . $component['LEVEL'] . '" data-component="' . $component['component'] . '" data-datapoint="DIMMER_LEVEL"></span>'
. '</div>'
. '<div class="clearfix"></div>'
. '</div>'
. '<div class="hh2 collapse" id="' . $modalId . '">'
. '<div class="row text-center">'
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.0">'
. '<img src="icon/light_light_dim_00.png" />'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.2">'
. '<img src="icon/light_light_dim_20.png" />'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.4">'
. '<img src="icon/light_light_dim_40.png" />'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.6">'
. '<img src="icon/light_light_dim_60.png" />'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.8">'
. '<img src="icon/light_light_dim_80.png" />'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="1.0">'
. '<img src="icon/light_light_dim_100.png" />'
. '</button>'
. '</div>'
. '</div>'
. '<div class="row text-center top15">'
. '<div class="row text-center">'
. '<div class="form-inline">'
. '<div class="input-group">'
. '<input type="number" name="' . $component['LEVEL'] . '" min="0" max="100" class="form-control" placeholder="Zahl eingeben">'
. '<span class="input-group-btn">'
. '<button class="btn btn-primary set" data-datapoint="4" data-set-id="' . $component['LEVEL'] . '" data-set-value="">OK</button>'
. '</span>'
. '</div>'
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="1.0">'
. 'An'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.0">'
. 'Aus'
. '</button>'
. '</div>'
. '</div>'
. '</div>'
. '</div>'
. '</div>'
. '</div>';
}
}

0 comments on commit c8f06f3

Please sign in to comment.