How to use the Nature Remo local API for enhanced latency and reliability on Home Assistant

In this post, I'll delve into how to use the local RESTful API for reduced latency and enhanced reliability when controlling lights in Home Assistant with Nature Remo. Background IR-controlled lights are ubiquitous in Japan, even with the emergence of newer "smart" models that often rely on proprietary protocols and apps. Home Assistant offers various ways to control IR lights, with Broadlink transmitters and the SmartIR integration being a popular choice. While this setup worked well for lights, controlling AC was less reliable due to the IR code complexity. Commercial AC controllers, such as those from Sensibo and Nature Remo, offered superior AC control reliability. However, Sensibo's focus on climate control and the limitations of the Nature Remo integration at the time meant that controlling both lights and AC required two IR blasters per room—a redundancy I wanted to eliminate. Nature Remo integration (cloud polling) My initial attempt inv...