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

io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithLockCurrentState 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.lock.LockCurrentStateEnum;
import java.util.concurrent.CompletableFuture;

/** Accessory with current lock state. */
public interface AccessoryWithLockCurrentState {

  /**
   * Retrieves the lock states. The current state of the physical security mechanism (e.g. deadbolt)
   *
   * @return a future with the value
   */
  CompletableFuture getLockCurrentState();

  /**
   * Subscribes to changes in lock current state.
   *
   * @param callback the function when the lock current state changes
   */
  void subscribeLockCurrentState(HomekitCharacteristicChangeCallback callback);

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy