Set Switch Entity State? (Node-RED Companion Integration)

Is there a way to manually set an entity switch’s state (node-red-contrib-home-assistant-websocket : ha-entity)? I use the switch throughout the day to turn the lights on and off, but in the morning, I have a ‘sunrise’ routine that gradually turns the lights on.

After the sunrise routine, the lights are on, but the switch appears off in HA. I have to toggle it twice to get the lights to turn off.

I’m using this switch to ensure the bedroom lights are always turned off the same way. First they are dimmed (rgb_color: [255,0,0], brightness: 25), then shut off. That way my sunrise routine doesn’t flash max whiteness at the start.

The switch is not real, it’s not connected to the light so it has no idea whats happening. It needs to be told to go to the on position.

You’ll need a boolean between the switch and full white. Before the function you will turn on the boolean. When the boolean is on the switch will do nothing. Then call bedroom lights switch on then start the sunrise function. After the function turn off the boolean blocking full white.