Interface Sensor

All Known Subinterfaces:
AmbientLightSensor, DaylightSensor, PresenceSensor, Switch, TemperatureSensor
All Known Implementing Classes:
AmbientLightSensorImpl

public interface Sensor
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getId()
    Returns the id of the sensor, as assigned by the Bridge.
    java.time.ZonedDateTime getLastUpdated()
    Returns the last time the sensor status has been updated, or null if it has not been updated.
    java.lang.String getName()
    Returns the human readable name of the sensor as set by the user, e.g.
    java.lang.String getProductName()
    Returns the human readable name of the sensor product, e.g.
    SensorType getType()
    Returns the type of the sensor.
  • Method Details

    • getName

      java.lang.String getName()
      Returns the human readable name of the sensor as set by the user, e.g. "Living room switch".
      Returns:
      Name of the sensor.
    • getProductName

      java.lang.String getProductName()
      Returns the human readable name of the sensor product, e.g. "Hue motion sensor" or "Hue tap switch".
      Returns:
      Name of the sensor product. May be null.
    • getId

      java.lang.String getId()
      Returns the id of the sensor, as assigned by the Bridge.
      Returns:
      The sensor id.
    • getType

      SensorType getType()
      Returns the type of the sensor.
      Returns:
      The type of the sensor as a SensorType enumeration value.
    • getLastUpdated

      java.time.ZonedDateTime getLastUpdated()
      Returns the last time the sensor status has been updated, or null if it has not been updated.
      Returns:
      The time when the sensor status was last updated, or null.