Package org.openhab.binding.neohub.internal.InfoResponse

Examples of org.openhab.binding.neohub.internal.InfoResponse.Device


  }

  private State mapResponseToState(final InfoResponse infoResponse,
      final String deviceName, final NeoStatProperty property) {
    final Device deviceInfo = infoResponse.getDevice(deviceName);
    switch (property) {
    case CurrentTemperature:
      return new DecimalType(deviceInfo.getCurrentTemperature());
    case CurrentFloorTemperature:
      return new DecimalType(deviceInfo.getCurrentFloorTemperature());
    case CurrentSetTemperature:
      return new DecimalType(deviceInfo.getCurrentSetTemperature());
    case DeviceName:
      return new StringType(deviceInfo.getDeviceName());
    case Away:
      return deviceInfo.isAway() ? OnOffType.ON : OnOffType.OFF;
    case Standby:
      return deviceInfo.isStandby() ? OnOffType.ON : OnOffType.OFF;
    case Heating:
      return deviceInfo.isHeating() ? OnOffType.ON : OnOffType.OFF;
    default:
      throw new IllegalStateException(
          String.format(
              "No result mapping configured for this neo stat property: %s",
              property));
View Full Code Here

TOP

Related Classes of org.openhab.binding.neohub.internal.InfoResponse.Device

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.