Newer
Older
smart-home-server / automation / Scopes / OutdoorScope.php
<?php

namespace ControlScripts\Scopes;

use \SHServ\Middleware\ControlScripts;
use \SHServ\Implements\ControlScriptsInterface;

class OutdoorScope extends ControlScripts implements ControlScriptsInterface {
	use \ControlScripts\Common;

	public function register_sync_map(): void {
		$this -> register_global_device_sync_map();
	}

	public function register_events_handlers(): void {
		$this -> auto_button_bindings([
			"buttons_backdoor" => [],
			"master_door_btns" => [],
		]);
	}

	public function register_actions_scripts(): void {
		$this -> add_group_toggle_action("all_spotlights_toggle", "Все прожекторы", [
			"spotlight_main_back_1",
			"spotlight_main_back_2",
			"spotlight_main_front_1",
		]);

		$this -> add_on_action("front_spotlight_on", "Передний прожектор вкл", "spotlight_main_front_1");
		$this -> add_off_action("front_spotlight_off", "Передний прожектор выкл", "spotlight_main_front_1");

		$this -> add_group_toggle_action("back_spotlights_on", "Задние прожекторы вкл", [
			"spotlight_main_back_1",
			"spotlight_main_back_2",
		]);
	}

	public function register_regular_scripts(): void {}
}