Update Mixin+sensor.c

adding  some if  conditions for sensor state