Hey everyone, I’m diving into the world of Node-RED and Home Assistant, and I’m trying to build a dashboard to control my smart lights. I’ve managed to get one bulb working with an on/off switch and a slider for brightness, but there’s a little hiccup I’m trying to fix—getting the slider and switch to stay in sync. Let me walk you through my journey so far and maybe you can help me crack this!So, here’s the deal: if I set the brightness to zero, the switch stays on, which is a bit confusing. And if I turn the light off using the switch, the brightness slider doesn’t reset to zero. It’s like they’re living in separate worlds, and I want to bridge that gap.I’ve shared a screenshot of my current setup, and the flow looks a bit like this: I have a slider that adjusts the brightness and a switch that toggles the light on and off. The slider sends the brightness percentage to the light, and the switch toggles it. But they don’t update each other’s states, which is the problem.I’ve tried tweaking the functions and even looked into using some state variables, but I’m not quite there yet. Maybe I need to ensure that when the switch is toggled, it also updates the slider’s position, and vice versa. It feels like it should be straightforward, but I’m missing a piece of the puzzle.If anyone has tackled something similar or knows a trick to get these two entities in sync, I’d be thrilled to hear it! I’m really enjoying the flexibility of Node-RED, and solving this would make my dashboard much more user-friendly. Let’s see if we can make these two play nice together!