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

io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithStatusLowBattery 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.battery.StatusLowBatteryEnum;
import java.util.concurrent.CompletableFuture;

/** This characteristic describes an accessoryʼs battery status. */
public interface AccessoryWithStatusLowBattery {

  /**
   * A status of 1 indicates that the battery level of the accessory is low. Value should return to
   * 0 when the battery charges to a level thats above the low threshold.
   *
   * @return a future with the value
   */
  CompletableFuture getStatusLowBattery();

  /**
   * Subscribes to changes in status low battery.
   *
   * @param callback the function when the status low batter changes
   */
  void subscribeStatusLowBattery(HomekitCharacteristicChangeCallback callback);

  /** Unsubscribes from changes */
  void unsubscribeStatusLowBattery();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy