I need help integrating the ifan03 in an Automation.
I have tried changing the state of the light or fan by using an Action automation and trying to change the state. I was trying on / off for the light. I was trying 1/2/3/4 for the fan.
Code is below of the device as it appears in config.yaml
using âonâ/âoffâ for the light should work because those are the valid states for a light entity.
for the fan it gets a little bit trickier because it has both a state ("on/âoffâ) and a speed attribute (in your case the speeds are âlowâ, âmediumâ and âhighâ - not â1â, â2â, â3â).
The valid states for the fan are still only "on/âoffâ - not â0â or â4â. those are only for use in the template from Tasmota to get the correct state.
So you can âturn_onâ/âturn_offâ the fan via those services. turn_on will turn the fan on to the last speed it was set to according to the âspeed:â attribute.
or you can set the speed directly by using the âset_speedâ service which will both turn on the fan and set its speed to the desired value.
OK- got the light working by choosing Action Type - Call Service âŚ
Tried the same with the fan ⌠Action Type - Call Service - no luck no matter what I put in there. âfan.turn_onâ, or âfan.turn_offâ . I canât even get the âfan.set_speedâ to work as it wonât allow me to save the automation when I enter the âspeed: lowâ even when editing in YAML âŚ
My bad ⌠yes I am working in the automation UI editor.
Whilst there is no error being thrown up ⌠it will not allow me to save the automation(the floppy dick icon at bottom right will not disappear when pressed).
I also tried calling the service via the Script UI ⌠then I get this message
âMessage malformed: extra keys not allowed @ data[âsequenceâ][0][âspeedâ]â
I think something is screwy with my build ⌠Iâm going to do a clean rebuild and try again âŚ
Thanks again for your efforts in trying Finity âŚIâll tackle it again tonight with the new build
âspeed : fastâ ?? Is it a typo, since you declared speed : high everywhere?
speed:fast is not defined in your config yaml.
Also i think both entity_id and speed should reside inside data{} section in YAML.
Thank you again Finity - you have helped enormously with the formatting ! It works !
One more clarification âŚon another sonoff ifan03 thread you mentioned that you revcently updated your config.yaml file because of 0 and 4 state settings etc ⌠Can you please share your current fan settings so I can learn from that please?
the other config works with the iFan02 and it also works with my entity row (I thinkâŚ) but it didnât work for the standard pop-up window control. At least I think thatâs how it was failingâŚI canât find the posts to verify that for some reason.
Either way the code I posted above should work fineâŚI think