Skip to content
Permalink
Browse files

Накопительное обновление

  • Loading branch information...
Alexandr-logrus committed Sep 10, 2019
1 parent faf7aba commit 80f079843db284f3e8f72748e02aab434c8cb76c
@@ -2,7 +2,9 @@
if ($this->getProperty('bright') > 0) {
$this->setProperty('saved_bright', $this->getProperty('bright'));
$this->setProperty('cct', $this->getProperty('cct'));
if ($params['SOURCE'] != 'cctUpdated') {
$this->setProperty('cct', $this->getProperty('cct'), '', 'brightUpdated');
}
if ($this->getProperty('status') == 0) {
$this->setProperty('status', 1);
}
@@ -3,3 +3,12 @@
if ($this->getProperty('status') == 0) {
$this->setProperty('status', 1);
}
if ($this->getProperty('saved_bright') == 0) {
if ($params['SOURCE'] != 'brightUpdated') {
$this->setProperty('bright', 100, '', 'cctUpdated');
}
} else {
if ($params['SOURCE'] != 'brightUpdated') {
$this->setProperty('bright', $this->getProperty('saved_bright'), '', 'cctUpdated');
}
}

This file was deleted.

@@ -1,6 +1,12 @@
<?php
//if ($this->getProperty('bright') == 0) {
$this->setProperty('cct', $this->getProperty('cct'));
$this->setProperty('bright', $this->getProperty('saved_bright'));
//}
if ($this->getProperty('saved_bright') == 0) {
$this->setProperty('bright', 100);
} else {
$this->setProperty('bright', $this->getProperty('saved_bright'));
}
if ($this->getProperty('cct') == 0) {
$this->setProperty('cct', 100);
} else {
$this->setProperty('cct', $this->getProperty('cct'));
}
@@ -12,8 +12,8 @@
),
'METHODS'=>array(
'brightUpdated'=>array('DESCRIPTION'=>'Bright Updated'),
'cctUpdated'=>array('DESCRIPTION'=>'Bright Updated'),
'snmUpdated'=>array('DESCRIPTION'=>''),
'cctUpdated'=>array('DESCRIPTION'=>'cct Updated'),
'snmUpdated'=>array('DESCRIPTION'=>'snm Updated'),
'turnOn'=>array('DESCRIPTION'=>'Dimmer turnOn'),
'turnOff'=>array('DESCRIPTION'=>'Dimmer turnOff')
)
@@ -65,7 +65,7 @@
<!--#
<a href="#" onclick="return dimmerChangeLevel%.object_id%('-');" style="font-weight:bold;text-decoration:none">[-]</a>
#-->
<select id="dimmerSelect%.object_id%" onchange="dimmerSetLevel%.object_id%(this.value);">
<select id="dimmerSelect%.object_id%" onchange="dimmerSetLevel%.object_id%(this.value);" style="color:black">
<option value=""><#LANG_SET#></option>
<option value="1">1%</option>
<option value="10">10%</option>
@@ -88,7 +88,7 @@
<!--#
<a href="#" onclick="return dimmerChangeCCT%.object_id%('-');" style="font-weight:bold;text-decoration:none">[-]</a>
#-->
<select id="dimmerSelect%.object_id%" onchange="dimmerSetCCT%.object_id%(this.value);">
<select id="dimmerSelect%.object_id%" onchange="dimmerSetCCT%.object_id%(this.value);" style="color:black">
<option value=""><#LANG_SET#></option>
<option value="1">1%</option>
<option value="10">10%</option>

0 comments on commit 80f0798

Please sign in to comment.
You can’t perform that action at this time.