Interface TemperatureSensorAccessory

  • All Superinterfaces:
    HomekitAccessory

    public interface TemperatureSensorAccessory
    extends HomekitAccessory
    A temperature sensor that reports the current temperature
    Author:
    Andy Lintner
    • Method Detail

      • getCurrentTemperature

        java.util.concurrent.CompletableFuture<java.lang.Double> getCurrentTemperature()
        Retrieves the current temperature, in celsius degrees.
        Returns:
        a future that will contain the temperature.
      • getMinCurrentTemperature

        default double getMinCurrentTemperature()
        return the min value for current temperature. overwrite if you want to change the default value.
        Returns:
        min current temperature
      • getMaxCurrentTemperature

        default double getMaxCurrentTemperature()
        return the max value for current temperature. overwrite if you want to change the default value.
        Returns:
        max current temperature
      • getMinStepCurrentTemperature

        default double getMinStepCurrentTemperature()
        return the min step value for current temperature. overwrite if you want to change the default value.
        Returns:
        min step current temperature
      • subscribeCurrentTemperature

        void subscribeCurrentTemperature​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the current temperature.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeCurrentTemperature

        void unsubscribeCurrentTemperature()
        Unsubscribes from changes in the current temperature.
      • 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.