Resolve chaching bug with sensor class
Make sensor example more user friendly and complete