@ Override public SensorState getState ( ) { if ( pin . isState ( openState ) ) return SensorState . OPEN ; else return SensorState . CLOSED ; }
Return the current sensor state based on the GPIO digital output pin state .