Interface AirQualityAccessory

  • All Superinterfaces:
    HomekitAccessory

    public interface AirQualityAccessory
    extends HomekitAccessory
    An air quality accessory which can include several sensors.
    • Method Detail

      • getAirQuality

        java.util.concurrent.CompletableFuture<AirQualityEnum> getAirQuality()
        Retrieves the state of the air quality
        Returns:
        a future that will contain the state
      • subscribeAirQuality

        void subscribeAirQuality​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the air quality
        Parameters:
        callback - the function to call when the air quality changes.
      • unsubscribeAirQuality

        void unsubscribeAirQuality()
        Unsubscribes from changes in the air quality.
      • getServices

        default java.util.Collection<Service> getServices()
        Description copied from interface: HomekitAccessory
        The collection of Services this accessory supports. Services are the primary way to interact with the accessory via HomeKit. Besides the Services offered here, the accessory will automatically include the required information service.

        This method will only be useful if you're implementing your own accessory type. For the standard accessories, use the default implementation provided by the interfaces in io.github.hapjava.accessories.

        Specified by:
        getServices in interface HomekitAccessory
        Returns:
        the collection of services.