sliwma/mysmarthome

iFan03 - new esphome uses int speeds

Closed this issue · 6 comments

Hi

Newer versions of esphome don't use LOW/MEDIUM/HIGH speeds anymore, instead you have to specify the number of speeds in the fan component. The change on the yaml side should be easy, but I can't figure out the changes needed to ifan03.h (they're probably trivial, but I can't compare the old docs to the current ones, because they're unavailable anymore). Could you take a look?

Hey,
sure.
BR

Done.

Wait, there's no need to touch ifan03.h?

Well... Yeah.

I wasn't sure, cause I was looking at https://esphome.io/api/classesphome_1_1fan_1_1_fan_state.html and I can't for the life of me understand where it gets the float from

I assume it gets int (1, 2, 3) and passes it to ifan03.h as float, and then operates on float? I don't know - I based the config on the iFAN02, didn't develop it by myself.