Class PlayerChannelHandler

java.lang.Object
org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
org.openhab.core.thing.binding.generic.converter.PlayerChannelHandler
All Implemented Interfaces:
ChannelHandler

@NonNullByDefault public class PlayerChannelHandler extends org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
The PlayerChannelHandler implements RollershutterItem conversions
Author:
Jan N. Klug - Initial contribution
  • Constructor Details

  • Method Details

    • toString

      public String toString(Command command)
      Description copied from class: org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      convert a command to a string
      Specified by:
      toString in class org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      Parameters:
      command - the command
      Returns:
      the string representation of the command
    • toCommand

      protected @Nullable Command toCommand(String string)
      Description copied from class: org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      check if this converter received a value that needs to be sent as command
      Specified by:
      toCommand in class org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      Parameters:
      string - the value
      Returns:
      the command or null
    • toState

      public Optional<State> toState(String string)
      Description copied from class: org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      convert the received value to a state
      Specified by:
      toState in class org.openhab.core.thing.internal.binding.generic.converter.AbstractTransformingChannelHandler
      Parameters:
      string - the value
      Returns:
      the state that represents the value of UNDEF if conversion failed