Skip to content
Permalink
Browse files

Dimmers update

* Simple devices: Dimmers option to set maximum level when turning on
  • Loading branch information...
sergejey committed Apr 26, 2019
1 parent 4eb776e commit e4d0f939e100d6278465a0c88e8eda652421ab7d
@@ -1291,6 +1291,10 @@
'DEVICES_ALL_BY_ROOM' => 'List all by rooms',
'DEVICES_LOAD_TIMEOUT' => 'Load status timeout',
'DEVICES_DIMMER_MIN_WORK' => 'Min level (work)',
'DEVICES_DIMMER_MAX_WORK' => 'Max level (work)',
'DEVICES_DIMMER_SET_MAX' => 'Set maximum level when turning on',
'GROUPS' => 'Groups',
'APPLIES_TO' => 'Applies to',
@@ -1289,6 +1289,10 @@
'GROUPS' => 'Группы',
'APPLIES_TO' => 'Применительно к',
'DEVICES_DIMMER_MIN_WORK' => 'Мин. уровень (рабочий)',
'DEVICES_DIMMER_MAX_WORK' => 'Макс. уровень (рабочий)',
'DEVICES_DIMMER_SET_MAX' => 'Устанавливать максимальную яркость при включении',
'AUTO_LINK' => 'Автоматический запуск сценария',
'FAVORITE_DEVICE' => 'В списке быстрого доступа',
@@ -3,6 +3,9 @@
$status = $this->getProperty('status');
$level=$this->getProperty('level');
$levelSaved=$this->getProperty('levelSaved');
if ($this->getProperty('setMaxTurnOn')) {
$levelSaved=100;
}
if ($status>0 && !$level && $levelSaved) {
$this->setProperty('level',$levelSaved);
} else {
@@ -122,8 +122,9 @@
'level'=>array('DESCRIPTION'=>'Current brightness level','ONCHANGE'=>'levelUpdated','DATA_KEY'=>1),
'levelSaved'=>array('DESCRIPTION'=>'Latest level saved'),
'levelWork'=>array('DESCRIPTION'=>'Brightness level (work)','ONCHANGE'=>'levelWorkUpdated'),
'minWork'=>array('DESCRIPTION'=>'Min level (work)','_CONFIG_TYPE'=>'num','_CONFIG_HELP'=>'SdDimmerMinMax'),
'maxWork'=>array('DESCRIPTION'=>'Max level (work)','_CONFIG_TYPE'=>'num','_CONFIG_HELP'=>'SdDimmerMinMax'),
'minWork'=>array('DESCRIPTION'=>LANG_DEVICES_DIMMER_MIN_WORK,'_CONFIG_TYPE'=>'num','_CONFIG_HELP'=>'SdDimmerMinMax'),
'maxWork'=>array('DESCRIPTION'=>LANG_DEVICES_DIMMER_MAX_WORK,'_CONFIG_TYPE'=>'num','_CONFIG_HELP'=>'SdDimmerMinMax'),
'setMaxTurnOn'=>array('DESCRIPTION'=>LANG_DEVICES_DIMMER_SET_MAX,'_CONFIG_TYPE'=>'yesno','_CONFIG_HELP'=>'SdDimmerSetMax'),
),
'METHODS'=>array(
'statusUpdated'=>array('DESCRIPTION'=>'Status Updated'),

0 comments on commit e4d0f93

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