Rule for Gree AC

Hello people,

I need your help please, I got openHAB 2.5.11 (Release Build), FIBARO FGMS-001 Motion Sensor and a Gree AC, I made the bindings , added the items, it works fine, I am very happy about it but I don’t know how to make a rule for AC the to start when the temperature of Motion sensor is eqaul or below 22C to start the heat of the AC and stop at 25C. Can you please help me ? Thanks is advance. Here are my items :

Group MotionSensor
Number FGMS_001_Lux “Luminance [%.0f Lux]” (MotionSensor) { channel=“zwave:device:e7dd98e9:node2:sensor_luminance” }
Number FGMS_001_Battery “Battery Level [%d %%]” (MotionSensor) { channel=“zwave:device:e7dd98e9:node2:battery-level” }
Number FGMS_001_Temp “Temperature [%.1f °C]” (MotionSensor) { channel=“zwave:device:e7dd98e9:node2:sensor_temperature” }
Switch FGMS_001_Motion “Binary Sensor Motion [%s]” (MotionSensor) { channel=“zwave:device:e7dd98e9:node2:alarm_motion” }
Switch FGMS_001_Alarm “Motion Sensor Alarm [%s]” (MotionSensor) { channel=“zwave:device:e7dd98e9:node2:alarm_tamper” }

Group GreeAirConditioner
Switch AC_Power “Power ON/OFF” { channel=“gree:airconditioner:f4911ec06a2d:power” }
//String AC_Unit_Mode “Unit Mode” { channel=“gree:airconditioner:f4911ec06a2d:power” }
Number AC_Target_Temperature “Target Temperature [%.1f °C]” { channel=“gree:airconditioner:f4911ec06a2d:temperature” }
Number AC_Current_Temperature “Current Temperature [%.1f °C]” {channel=“gree:airconditioner:f4911ec06a2d:currentTemperature” }
Switch AC_Air_Mode “Air Mode” { channel=“gree:airconditioner:f4911ec06a2d:air” }
Switch AC_Dry_Mode “Dry Mode” { channel=“gree:airconditioner:f4911ec06a2d:dry” }
Switch AC_Turbo_Mode “Turbo Mode” { channel=“gree:airconditioner:f4911ec06a2d:turbo” }
Number AC_Wind_Speed “Wind Speed” { channel=“gree:airconditioner:f4911ec06a2d:windspeed” }
String AC_Quiet_Mode “Quiet Mode” { channel=“gree:airconditioner:f4911ec06a2d:quiet” }
Number AC_Vertical_Swing_Mode “Vertical Swing Mode” { channel=“gree:airconditioner:f4911ec06a2d:swingUpDown” }
Number AC_Horizontal_Swing_Mode “Horizontal Swing Mode” { channel=“gree:airconditioner:f4911ec06a2d:swingLeftRight” }
Switch AC_Power_Save “Power Save” { channel=“gree:airconditioner:f4911ec06a2d:powersave” }
Switch AC_Light “Light” { channel=“gree:airconditioner:f4911ec06a2d:light” }
Switch AC_Health_Mode “Health Mode” { channel=“gree:airconditioner:f4911ec06a2d:health” }

I made a simple rule using Alexa’s Echo Dot input voice and it works, and now I have this rule which is working for warming the room, but I was thinking about a rule that can cool the room, and use the AC_power.state == “cool” and “warm” , can someone plase help me? :

rule “AC Climatronic”
Item FGMS_001_Temp changed
var Number curent_temp = FGMS_001_Temp.state as Number
if (curent_temp < 22) {
sendBroadcastNotification(“Temperature is below 22 degrees, GREE AC is ON!”)
else if (curent_temp > 24) {
sendBroadcastNotification(“Temperature is over 24 degrees, GREE AC is OFF!”)