Sending click to Xiaomi Button?

Hi im new to all this.
Is it possible to send a short click command to the round button/switch?

I have a yee light in my hallway and have set up an alarm panel on open hab.
I have the button set up to turn the light red when its shortpressed.

im trying to write a rule along the lines off#

//red light
rule “alarm light”
Item XiaomiDoorWindowSensor_Openstatus changed to OPEN
if (Alarm.state == ON){
--------------Short press command here?--------------

i have no idea if this is remotely right or if its even possible.

Any help is appreceiated.

You can’t do this. (simulating a key press or click of a button or a window open event)

But you can create an unbound Switch item to acomplish this. Extend your trigger of the red light to this switch additionally and set this switch to on in your alarm rule.

thanks for the reply i felt it wasn’t possible.
im not sure i understand what you mean.
The reason i want the button press is because the mi home hub controls the yeelight. The idea behind the simulated button press is i could set up the rule for the yeelight in the mi home app.
I can probably achieve this with a wireless light switch but just hopeing to use up a spare button i have lying about.
Yeelights are not supported by the binding are they?

Place it in /usr/share/openhab2/addons then restart openhab.

thanks. how to i move it from a windows pc to a raspberry pi. sorry completely new can this be done via putty

Do you have samba share set up and working?

How did you install openhab onto the RPI? Samba share is automatically set up on some installs like openhabian. You only need (recommended) to change your password. Set up samba on your windows (cant help you on this one…all linux here).

Other option is an FileZilla or something similar to transfer files. I use FileZilla and it works well, not sure what all options windows will have.

Found a Youtube video that may help (if needed) with setting up windows to share files. The windows sharing part starts around the 3:20 minuet mark. You can later install VSCode as it’s a great tool but for now follow the windows set up and then you can drag the jar file over to RPI.

never thought to try typing the ip into file explorer.
have found the light but now its asking for a token?
how do i find this?