Smart sensor with inbuilt DALI relay