I gave Codex two GitHub repos and it fixed my smart home problem ...
If you can write an Excel formula, you can build your own function.