BLE Client Text Sensor

The ble_client component is a text sensor platform that can query BLE devices for specific values of service characteristics.

For more information on BLE services and characteristics, see BLE Client.

esp32_ble_tracker:

ble_client:
  - mac_address: XX:XX:XX:XX:XX:XX
    id: itag_black

text_sensor:
  - platform: ble_client
    ble_client_id: itag_black
    name: "Sensor Location"
    service_uuid: '180d'
    characteristic_uuid: '2a38'

Configuration variables: Copy link to header

  • ble_client_id (Required, ID): ID of the associated BLE client.
  • service_uuid (Required, UUID): UUID of the service on the device.
  • characteristic_uuid (Required, UUID): UUID of the service’s characteristic to query.
  • descriptor_uuid (Optional, UUID): UUID of the characteristic’s descriptor to query.
  • notify (Optional, boolean): Instruct the server to send notifications for this characteristic. Defaults to false.
  • update_interval (Optional, Time): The interval to poll the device. Defaults to 60s.
  • All other options from Text Sensor.

Automations:

  • on_notify (Optional, Automation): An automation to perform when a notify message is received from the device. See on_notify.

BLE Sensor Automation Copy link to header

on_notify Copy link to header

This automation is triggered when the device/server sends a notify message for a characteristic. The config variable notify must be true or this will have no effect. A variable x of type std::string is passed to the automation for use in lambdas.

See Also Copy link to header

CURRENT