[SOLVED] Ifan 2 light has 3 different light intensity , how to use in OpenHAB

Hi Guys.
a quick question .I have a Sonoff ifan 2 flashed with Tasmota.installed in my fan in my master bedroom. and it is fully functional.
sort off? the led driver on the light actually has 3 light intensities.

  1. cold white.
  2. warm white.
  3. and then a combination of the two.

to switch the light you would turn the light off and on. ind it changes between the lights.
but now how my system works. as required by our electrical installation rules.
I have a light switch (Sonoff T1 us) that turns the ifan on and off. the ifan is set so that the light comes on after power on.

is there a way that I can do the same with openHAB. with a selection
between the colours. ?

I did search the forum but could not see anything in this manner ?

https://www.itead.cc/sonoff-ifan02-wifi-smart-ceiling-fan-with-light.html

The ifan02 controller has 4 relays.
1 for the light and 3 for the fan

Therefore with the ifan02 you can only switch the light on or off.
If you need to select a light intensity by switching the bulb on and off several times, there are several ways you can achieve that.

  1. In openhab with rules. sendCommand(ON), sendCommand(OFF).....
  2. In Tasmota with rules: https://github.com/arendst/Sonoff-Tasmota/wiki/Rulesand https://github.com/arendst/Sonoff-Tasmota/wiki/Rule-Cookbook