From 995eb989d23a3c6b8ca20d5b6fcaed78874be506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi?= <remi.van-boxem@student.junia.com>
Date: Thu, 23 May 2024 10:00:17 +0200
Subject: [PATCH] test: Update Philips Hue automation scripts

This commit updates the automation scripts for controlling Philips Hue lights. The changes include:
- Improved navigation flow in the `alexa.yml` file
- Added new actions in the `flow.yml` file for switching Wi-Fi networks
- Added a new script, `hue.yml`, for controlling the Hue lights directly
- Updated the existing script, `hueEssentials.yml`, for editing the lights using Hue Essentials
---
 eval/latency/philips-hue/alexa.yml | 56 +++++++++++++++---------------
 eval/latency/philips-hue/flow.yml  | 30 +++++++++++++---
 eval/latency/philips-hue/hue.yml   | 29 ++++++++++++++++
 3 files changed, 83 insertions(+), 32 deletions(-)
 create mode 100644 eval/latency/philips-hue/hue.yml

diff --git a/eval/latency/philips-hue/alexa.yml b/eval/latency/philips-hue/alexa.yml
index 3af658e..2a5246d 100644
--- a/eval/latency/philips-hue/alexa.yml
+++ b/eval/latency/philips-hue/alexa.yml
@@ -2,42 +2,42 @@ appId: com.amazon.dee.app
 name: "Power-on/off TP-Link plug using Alexa"
 ---
 - launchApp:
-    clearState: false
-    stopApp: true
-    label: "Open the Amazon Alexa app"
+      clearState: false
+      stopApp: true
+      label: "Open the Amazon Alexa app"
 - tapOn:
-    id: "com.amazon.dee.app:id/tab_channels_device"
-    label: "Open the Devices tab"
+      id: "com.amazon.dee.app:id/tab_channels_device"
+      label: "Open the Devices tab"
 - tapOn:
-    id: "DevicePageSearchButton"
-    label: "Open the search menu"
+      id: "DevicePageSearchButton"
+      label: "Open the search menu"
 - tapOn:
-    id: "DeviceSearchPageSearchInput_SearchInput"
-    label: "Open the search bar"
+      id: "DeviceSearchPageSearchInput_SearchInput"
+      label: "Open the search bar"
 - inputText:
-    text: "Lamp"
-    label: "Type 'Lamp' in the search bar"
+      text: "Lamp"
+      label: "Type 'Lamp' in the search bar"
 - doubleTapOn:
-    text: "Lamp"
-    index: 1
-    label: "Select the Philips Hue lamp"
+      text: "Lamp"
+      index: 1
+      label: "Select the Philips Hue lamp"
 - tapOn:
-    point: "50%,23%"
-    label: "Turn on the lamp"
+      point: "50%,23%"
+      label: "Turn on the lamp"
 - tapOn:
-    id: "ColorControl::Color=Custom-primary"
-    label: "Open the color picker"
+      id: "ColorControl::Color=Custom-primary"
+      label: "Open the color picker"
 - scroll:
-    label: "Scroll down the color picker"
-- tapOn: 
-    text: "Orange"
-    label: "Set the color to orange"
+      label: "Scroll down the color picker"
 - tapOn:
-    id: "header-back-button"
-    label: "Close the color picker"
+      text: "Orange"
+      label: "Set the color to orange"
 - tapOn:
-    point: "85%,55%"
-    label: "Set the power to 100%"
+      id: "header-back-button"
+      label: "Close the color picker"
 - tapOn:
-    point: "50%,23%"
-    label: "Turn off the lamp"
\ No newline at end of file
+      point: "85%,55%"
+      label: "Set the power to 100%"
+- tapOn:
+      point: "50%,23%"
+      label: "Turn off the lamp"
diff --git a/eval/latency/philips-hue/flow.yml b/eval/latency/philips-hue/flow.yml
index 972622c..edcabe0 100644
--- a/eval/latency/philips-hue/flow.yml
+++ b/eval/latency/philips-hue/flow.yml
@@ -1,8 +1,30 @@
 appId: com.tplink.kasa_android
 ---
 - runFlow:
-    file: hueEssentials.yml
-    label: "Edit the light using Hue Essentials"
+      file: hue.yml
+      label: "Edit the light using Hue"
 - runFlow:
-    file: alexa.yml
-    label: "Edit the light using Alexa"
\ No newline at end of file
+      file: hueEssentials.yml
+      label: "Edit the light using Hue Essentials"
+- runFlow:
+      file: alexa.yml
+      label: "Edit the light using Alexa"
+- runFlow:
+      file: wifi.yml
+      label: "Switch Wi-Fi to UCLouvain"
+      env:
+          WIFI: UCLouvain
+- runFlow:
+      file: hue.yml
+      label: "Edit the light using Hue"
+- runFlow:
+      file: hueEssentials.yml
+      label: "Edit the light using Hue Essentials"
+- runFlow:
+      file: alexa.yml
+      label: "Edit the light using Alexa"
+- runFlow:
+      file: wifi.yml
+      label: "Switch Wi-Fi to OpenWrt-5GHz"
+      env:
+          WIFI: OpenWrt-5GHz
diff --git a/eval/latency/philips-hue/hue.yml b/eval/latency/philips-hue/hue.yml
new file mode 100644
index 0000000..9aa1e94
--- /dev/null
+++ b/eval/latency/philips-hue/hue.yml
@@ -0,0 +1,29 @@
+appId: com.philips.lighting.hue2
+name: Hue
+---
+- launchApp:
+      appId: "com.philips.lighting.hue2"
+      clearState: false
+      stopApp: true
+      label: "Open the Hue app"
+- tapOn:
+      text: "Office"
+      label: "Turn on the light"
+- tapOn:
+      point: "50%,31%"
+      label: "Select the room"
+- tapOn:
+      point: "19%,64%"
+      label: "Select the light"
+- tapOn: "Effects"
+- "scroll"
+- tapOn:
+      point: "39%,49%"
+      label: "Switch color to `Opal`"
+- "back"
+- tapOn:
+      point: "15%,14%"
+      label: "Change the brightness"
+- tapOn:
+      point: "19%,71%"
+      label: "Turn off the light"
-- 
GitLab