Updated sensor.py