Lock an entity state

I would like a way to lock an entity state. So for example a light stays off even if the group the light is in is being turned on. Or an led strip only changes with a scene change if it was already on, and stays off if it’s not turned on.