All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithSwingMode Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
package io.github.hapjava.accessories.optionalcharacteristic;

import io.github.hapjava.characteristics.HomekitCharacteristicChangeCallback;
import io.github.hapjava.characteristics.impl.fan.SwingModeEnum;
import java.util.concurrent.CompletableFuture;

/** Accessory with Swing Mode characteristics. */
public interface AccessoryWithSwingMode {

  /**
   * Retrieves the swing mode.
   *
   * @return a future that will contain the swing mode
   */
  CompletableFuture getSwingMode();

  /**
   * Set the swing mode (DISABLED, ENABLED).
   *
   * @param swingMode swing mode
   * @return a future that completes when the change is made
   */
  CompletableFuture setSwingMode(SwingModeEnum swingMode);

  /**
   * Subscribes to changes in the swing mode.
   *
   * @param callback the function to call when the swing mode changes.
   */
  void subscribeSwingMode(HomekitCharacteristicChangeCallback callback);

  /** Unsubscribes from changes in the swing mode. */
  void unsubscribeSwingMode();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy