"CES191" humidity sensor [solved]

UKHeliBob:
You need to save the current state to last state each time through loop() before you read it again so that your program can detect when it has changed.

since the state is not changed i think i can just put: (lstate = state;) in the : ( if (state != lstate)) loop.
i tried changing the laststate to just before the end of loop() and i got the same result