Interface KobotHAEntity

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract JSONObject discovery() Generate the MQTT discovery message for this device.
      abstract String currentState() Generate the MQTT state message for this device.
      Integer compareTo(KobotHAEntity other)
      abstract String getUniqueId() The unique ID of the device.
      abstract String getName() The friendly name of the device.
      abstract String getComponent() The Home Assistant classification of the device (e.g.
      abstract DeviceIdentifier getDeviceIdentifier() More detailed information about the device.
      abstract String getIcon() The icon HA will use to display this entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • discovery

         abstract JSONObject discovery()

        Generate the MQTT discovery message for this device.

        NOTE This should be modified by each entity for its special cases.

      • currentState

         abstract String currentState()

        Generate the MQTT state message for this device.

      • getUniqueId

         abstract String getUniqueId()

        The unique ID of the device. NOTE If this is not unique across all devices, then HomeAssistant will throw an error on discovery, but it wont be seen here.

      • getName

         abstract String getName()

        The friendly name of the device. This may be renamed in the HomeAssistant UI.

      • getComponent

         abstract String getComponent()

        The Home Assistant classification of the device (e.g. light, switch, etc.)

      • getIcon

         abstract String getIcon()

        The icon HA will use to display this entity.