Hey all, just created a sensor for LightwaveRF Energy
(https://github.com/asantaga/lightwaverf_HA_EnergySensor-) and it works fine. The implementation listens for the UDP messages from the LightwaveRF hub and then updates HA.
- The code to listen to the hub is trivial like 10 lines or so, do I still need to create a library for PyPi?
- The code is currently a “sync” code, and the UDP messages can take up to 10 seconds to appear so the code is blocking till then… Is this ok in “sync” mode? or should I really be looking at “async”? Does HA poll its sensors in separate threads or will this slow HA down?
- If i need to go “async” does anyone have a tutorial on this? Im assuming i need to run a thread within my sensor right?