I have just moved one of my sensors over to using the above code from this code
All working fine here. So the other 2 will be changed today.