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