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

io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithWaterLevel 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 java.util.concurrent.CompletableFuture;

/** Accessory with water level. */
public interface AccessoryWithWaterLevel {

  /**
   * Retrieves the water level in percent.
   *
   * @return a future that will contain the water level, expressed as an double between 0 and 100.
   */
  CompletableFuture getWaterLevel();

  /**
   * Subscribes to changes in the water level.
   *
   * @param callback the function to call when the state changes.
   */
  void subscribeWaterLevel(HomekitCharacteristicChangeCallback callback);

  /** Unsubscribes from changes in the water level. */
  void unsubscribeWaterLevel();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy