Interface CarbonDioxideSensorAccessory

  • All Superinterfaces:
    HomekitAccessory

    public interface CarbonDioxideSensorAccessory
    extends HomekitAccessory
    A carbon dioxide sensor reports carbon dioxide level.
    • Method Detail

      • getCarbonDioxideDetectedState

        java.util.concurrent.CompletableFuture<CarbonDioxideDetectedEnum> getCarbonDioxideDetectedState()
        Retrieves the state of the sensor that indicates if carbon dioxide has been detected.
        Returns:
        a future that will contain the carbon dioxide sensor's state
      • subscribeCarbonDioxideDetectedState

        void subscribeCarbonDioxideDetectedState​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the carbon dioxide's state.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeCarbonDioxideDetectedState

        void unsubscribeCarbonDioxideDetectedState()
        Unsubscribes from changes in the carbon dioxide's state.
      • 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.