Converted ProximitySensor to PeriodicPollingSensor pattern