Nil latest_sensor_data after updating relay states each time