Integrating Custom Attributes and Devices in Rule Machine

I’ve been diving into the Rule Machine lately and came across a challenge that I thought might be interesting to share. I wanted to compare two different custom attributes—specifically, the inside and outside temperatures—but I noticed that the Rule Machine only allows comparing an attribute to a static value. I had to think creatively about how to approach this! :brain:

After some research and trial and error, I realized that while the Rule Machine doesn’t support direct comparisons between two attributes, there are workarounds. For instance, using templates or scripts to calculate the difference between the two values and then triggering actions based on that result. It’s a bit more involved, but it gets the job done! :bulb:

I’d love to hear how others have tackled similar scenarios. Have you found a more streamlined method or any tips to make this process smoother? Let’s brainstorm together! :rocket: