ESPiLight icon indicating copy to clipboard operation
ESPiLight copied to clipboard

Allow protocol lookup from API?

Open ligius- opened this issue 4 years ago • 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.

ligius- avatar Sep 29 '19 23:09 ligius-

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.

puuu avatar Sep 30 '19 07:09 puuu