Examples of YamahaReceiverState


Examples of org.openhab.binding.yamahareceiver.internal.hardware.YamahaReceiverState

    // Get all item configurations belonging to this proxy
    Collection<YamahaReceiverBindingConfig> configs = getDeviceConfigs(deviceUid);
    try {
      for (Zone zone : Zone.values()) {
        // Poll the state from the device
        YamahaReceiverState state = receiverProxy.getState(zone);
 
        // Create state updates
        State powerUpdate = state.isPower() ? OnOffType.ON : OnOffType.OFF;
        State muteUpdate = state.isMute() ? OnOffType.ON : OnOffType.OFF;
        State inputUpdate = new StringType(state.getInput());
        State surroundUpdate = new StringType(state.getSurroundProgram());
        State updateVolumeDb = new DecimalType(state.getVolume());
        State updateVolumePercent = new PercentType(
            (int) dbToPercent(state.getVolume()));
 
        // Send updates
        sendUpdate(configs, zone, BindingType.power, powerUpdate);
        sendUpdate(configs, zone, BindingType.mute, muteUpdate);
        sendUpdate(configs, zone, BindingType.input, inputUpdate);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.