diff --git a/automation/Scopes/BathroomScope.php b/automation/Scopes/BathroomScope.php
index b218e91..cb16591 100644
--- a/automation/Scopes/BathroomScope.php
+++ b/automation/Scopes/BathroomScope.php
@@ -20,6 +20,9 @@
$this -> add_toggle_action("bathroom_light_switch", "Ванная", "bathroom_2_light", 0, [
"description" => "Вкл/Выкл. свет в ванной",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("bathroom_2_light", 0);
+ },
]);
}
diff --git a/automation/Scopes/OfficeScope.php b/automation/Scopes/OfficeScope.php
index 87b22b7..6d8b3f0 100644
--- a/automation/Scopes/OfficeScope.php
+++ b/automation/Scopes/OfficeScope.php
@@ -23,12 +23,18 @@
"icon" => '',
"description" => "Вкл/Выкл. настольную компьютерную лампу",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("computer_table_lamp", 0);
+ },
]);
$this -> add_toggle_action("craft_table_lamp_switch", "Мастерская лампа", "craft_table_lamp", 0, [
"icon" => '',
"description" => "Вкл/Выкл. лампу в мастерской",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("craft_table_lamp", 0);
+ },
]);
}
diff --git a/automation/Scopes/PlantsRoomScope.php b/automation/Scopes/PlantsRoomScope.php
index 7faf259..88d4e4d 100644
--- a/automation/Scopes/PlantsRoomScope.php
+++ b/automation/Scopes/PlantsRoomScope.php
@@ -22,16 +22,25 @@
$this -> add_toggle_action("plants_room_light_switch", "Свет в комнате растений", "plants_room_light", 0, [
"description" => "Вкл/Выкл. свет в комнате растений",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("plants_room_light", 0);
+ },
]);
$this -> add_toggle_action("italy_lamp_switch", "Italy лампа", "italy_lamp_relay", 0, [
"description" => "Вкл/Выкл. Italy лампу",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("italy_lamp_relay", 0);
+ },
]);
$this -> add_toggle_action("floor_lamp_switch", "Торшер", "floor_lamp_relay", 0, [
"description" => "Вкл/Выкл. торшер",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("floor_lamp_relay", 0);
+ },
]);
}
diff --git a/automation/Scopes/ServerRoomScope.php b/automation/Scopes/ServerRoomScope.php
index 48e4e18..947e24c 100644
--- a/automation/Scopes/ServerRoomScope.php
+++ b/automation/Scopes/ServerRoomScope.php
@@ -20,6 +20,9 @@
$this -> add_toggle_action("server_room_light_switch", "Серверная", "server_room_light", 0, [
"description" => "Вкл/Выкл. свет в серверной",
"author" => "Eugene Sukhodolskiy",
+ "state_callback" => function() {
+ return $this -> helper() -> make_relay_indicator("server_room_light", 0);
+ },
]);
}