diff --git a/server/ControlScripts/LightHubScope.php b/server/ControlScripts/LightHubScope.php index 6ad4c2d..73e57be 100644 --- a/server/ControlScripts/LightHubScope.php +++ b/server/ControlScripts/LightHubScope.php @@ -81,7 +81,7 @@ } protected function on_online($alias, Array $muted = []) { - $this -> add_event_handler("button@{$alias}.online", function(Device $btns_block, Array $data) { + $this -> add_event_handler("button@{$alias}.online", function(Device $btns_block, Array $data) use ($muted) { $btns_block_api = $btns_block -> device_api(); if($btns_block_api instanceof \SHServ\Tools\DeviceAPI\Button) { foreach($muted as $ch) {