puuu/ESPiLight

Allow protocol lookup from API?

ligius- opened this issue · 1 comments

Currently the callback receives the device id and protocol name from ESPiLight. However, it would be useful to know what kind of device it was, available under protocol_t - devtype and hwtype. This would allow some automated processing by the callback, such as creating an MQTT discovery topic for a temperature sensor. It's not a perfect approach but it could allow for a bit more flexibility.

puuu commented

If you are interested in devtype, you are welcome to submit a pull request. hwtype is always RF433 and does not need to be exposed.

If I look at the definition of devtype_t, I wonder if this is useful for your use case. There is no type temperature sensor, olny WEATHER.