Need Help: HowTo start to programm a first app: "Pause" (break or "face down") for Xperia 10 III

More restrictive configurations should be tested.
Now I’d like to save more energy by diabling some cpus and Android app support.

I tried to use the hints given by @wetab73 and @miau here: High battery drainage Xperia 10 III - #251 by Speedy-10

  1. I saved these commands in the file situations-sleep:
# energy saving cpus
echo 0 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu3/online
echo 0 > /sys/devices/system/cpu/cpu4/online
echo 0 > /sys/devices/system/cpu/cpu5/online
echo 0 > /sys/devices/system/cpu/cpu6/online
echo 0 > /sys/devices/system/cpu/cpu7/online

# energy saving android app-support
# Stop Android App Support
dbus-send --system --dest=com.jolla.apkd.control --print-reply /com/jolla/apkd com.jolla.apkd.control.controlService boolean:false
  1. I saved these commands in the file situations-wake-up:
# energy saving cpus
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo 1 > /sys/devices/system/cpu/cpu4/online
echo 1 > /sys/devices/system/cpu/cpu5/online
echo 1 > /sys/devices/system/cpu/cpu6/online
echo 1 > /sys/devices/system/cpu/cpu7/online

# energy saving android app-support
# Start Android App Support
dbus-send --system --dest=com.jolla.apkd.control --print-reply /com/jolla/apkd com.jolla.apkd.control.controlService boolean:true

If I test in terminal with sudo bash situations-sleep, 6 cores are off afterwards and android app support is disabled.
sudo bash situations-wake-up starts the cores and android app support again.

  1. Now I tried to fit this into Situations by (edited):

  2. Last step, edit the sudoers file:
    [defaultuser@Xperia10III ~]$ devel-su
    [root@Xperia10III defaultuser]# visudo /etc/sudoers

Here I tried:
ALL ALL=(root) NOPASSWD: /home/defaultuser/situations-*
which didn’t work
Uncomment %sudo ALL=(ALL) ALL didn’t help, too.

If I lay down and wake up the phone, the cores weren’t down and android app support wasn’t disabled; I can see an Android app starting promptly …

Can someone help me to get both sudo-commands get working in Situations?
That saves me perhaps more battery (disabling Android app support every time will maybe no fun to use in this way).

EDIT: It worked only once.
I. I start situations via terminal (over ssh) with harbour-situations2application
II. Edit only the single sudo-command sudo bash situations-sleep
III. Put the phone “display down” on the table. I hear the confirmation sound.
IV. Wait some seconds, take the phone again. Checked: android support was disabled and cores 2-7 were offline. So far so good.

Then tried a second time, but android app support wasn’t deactivated neither the cores.
systemctl status situations-sonar
Showed now:

● situations-sonar.service - Situations Companion Service
   Loaded: loaded (/etc/systemd/system/situations-sonar.service; disabled; ven
dor preset: enabled)
   Active: active (running) since Thu 2023-03-30 13:54:02 CEST; 1 d
ay 18h ago
 Main PID: 32112 (situations-sona)
   Memory: 2.5M
   CGroup: /system.slice/situations-sonar.service
           └─32112 /usr/bin/situations-sonar

Apr 01 07:59:57 Xperia10III situations-sonar[32112]: Connection accepted
Apr 01 08:00:10 Xperia10III situations-sonar[32112]: Connection accepted
Apr 01 08:01:04 Xperia10III situations-sonar[32112]: C
onnection refused: client not accepted!
Apr 01 08:01:48 Xperia10III situations-sonar[32112]: Connection accepted

IMHO, I would like to emphasize that it was necessary to start stitautions by terminal (sailjail?) to add the sudo command.
It seems, Situations does not execute the commands reliable.