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

namespace ControlScripts\Scopes;

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

class PlantsRoomScope 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([
			"plants_room_btns" => [],
		]);
	}

	public function register_actions_scripts(): void {
		$this -> add_toggle_action("plants_room_light_switch", "Свет в комнате растений", "plants_room_light", 0, [
			"description" => "Вкл/Выкл. свет в комнате растений",
			"author" => "Eugene Sukhodolskiy",
		]);

		$this -> add_toggle_action("italy_lamp_switch", "Italy лампа", "italy_lamp_relay", 0, [
			"description" => "Вкл/Выкл. Italy лампу",
			"author" => "Eugene Sukhodolskiy",
		]);

		$this -> add_toggle_action("floor_lamp_switch", "Торшер", "floor_lamp_relay", 0, [
			"description" => "Вкл/Выкл. торшер",
			"author" => "Eugene Sukhodolskiy",
		]);
	}

	public function register_regular_scripts(): void {}
}