Web -> Sort devices correctly.
Light -> Handle when the source is not a statedevice.