bstuff/haier-ac-remote ? reverse-engineered prompt
Reverse engineered prompt
Build me a small TypeScript project that acts like a Haier air conditioner remote.
I want a simple, reusable API where someone can create the current AC state and change the usual things like power, mode, target temperature, fan speed, and swing. If Haier remotes commonly support extras like sleep, turbo, or timer settings, include those too, but only if you can confirm them. The main goal is to make it easy to generate the command data a real remote or IR setup would need, and if possible also parse that data back into a readable state.
Please keep it clean and practical, with sensible defaults, validation, and a couple of example usages that show turning the unit on, changing temperature, and switching modes. Add tests for the main behaviors so it feels reliable. If the protocol details are unclear, look up current docs or examples online and follow the most common Haier remote behavior.
Have a live product UI? Try website reverse