Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
* Eco-mode activation when nobody's home
* Connect data sync optimizing
  • Loading branch information
sergejey committed Mar 15, 2019
1 parent fd93edf commit 48a9e6d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion modules/devices/nobodyhomemode_activate.php
Expand Up @@ -2,4 +2,8 @@

if (defined('DISABLE_SIMPLE_DEVICES') && DISABLE_SIMPLE_DEVICES==1) return;

require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php');
require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php');

if (!gg('EconomMode.active')) {
callMethod('EconomMode.activate');
}
3 changes: 3 additions & 0 deletions modules/devices/nobodyhomemode_deactivate.php
Expand Up @@ -4,3 +4,6 @@

require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php');

if (gg('EconomMode.active')) {
callMethod('EconomMode.deactivate');
}
4 changes: 2 additions & 2 deletions modules/objects/objects.class.php
Expand Up @@ -852,10 +852,10 @@ function setProperty($property, $value, $no_linked=0, $source='') {

saveToCache($cached_name, $value);

$p_lower=strtolower($property);
if (!defined('DISABLE_SIMPLE_DEVICES') &&
$this->device_id &&
$property!='updated' &&
$property!='updatedText'
($p_lower=='value' || $p_lower=='status')
) {
addToOperationsQueue('connect_device_data',$this->object_title.'.'.$property,$value,true);
}
Expand Down

0 comments on commit 48a9e6d

Please sign in to comment.