Aircoookie/Espalexa

Question not issue: Espalexa works very well as a light - do you have a switch version:

Opened this issue · 1 comments

After going through several projects that are supposed to work with Alexa "as-is", yours is the first the worked right from the start. Some others don't even compile. Older ones won't get discovered.

Do you happen to have a "switch" version or is there a setting that will make Alexa think this is a switch instead of a light?

Thank you for your project!

Hi, as Espalexa emulates a Philips Hue lamp/bridge, it is a bit difficult to make Alexa think it is a different type of device.
I did add EspalexaDeviceType::onoff at one point, but it caused problems, so it is no longer supported.
If you want a simple on/off controllable device, you can just treat the brightness returned by the callback function as a boolean value:
bool isOn = brightness.

If you want the ESP to act like a switch in the sense that it could e.g. trigger Alexa routines, that is unfortunately not possible with the approach used in this library