Control your Bluetooth capable U-Tec locks locally and natively in Home Assistant.
This is a forked Home Assistant custom integration for Ultraloq / U-Tec / Xthings BLE locks.
I really wanted to have local control over my U-Bolt Pro locks, and the original integration wouldn't even start the config process. So I forked it and fixed the biggest bugs, then did extensive testing and iterating with the help of Codex. In addition to extending lock support, battery, door, and sound status are now first-class entities, along with full controls for auto-lock and lock mode. This integration should have all of the original features for non U-Bolt Pro locks, plus full support for the U-Bolt Pro locks and Ultraloq UL3-BT (SmartLockByBle) lever locks.
- Active (GATT) Bluetooth support in Home Assistant, whether through your host's built in Bluetooth, a local USB adapter, or an ESPHome Bluetooth proxy.
- Internet connection on initial setup to get lock info from the Xthings API - this will be user controlled in the future.
Entities currently exposed per lock (when supported by your lock):
lock.name_of_locksensor.battery_levelsensor.cloud_battery_level(optional, requires enabling cloud polling)sensor.autolock_timesensor.autolock_modesensor.last_successful_communicationsensor.modelsensor.firmware_versionbinary_sensor.doorbinary_sensor.soundselect.lock_modeswitch.mute(mdi:volume-mute; on means sounds are muted)button.rescanbutton.restart
Actions:
ultraloq_ble.refresh_locks: refreshes cached lock metadata from the cloud and reloads the integration.ultraloq_ble.get_device_information: queries all supported information from a selected lock over BLE.ultraloq_ble.set_device_time: sets a selected lock's clock from Home Assistant's local time or a supplied date and time.ultraloq_ble.set_device_autolock: configures auto-lock time, door-sensor mode, and enabled state, or sends a manual hex payload.
Important Bluetooth note:
- Passive advertisement-only proxies are not enough for lock control
- Shelly Bluetooth proxy sightings can help discovery, but active GATT connectivity is what actually matters for operating the lock
- If HA decides that the advertisement is not connectable, it will cause status updates and lock controls to fail
You can install using HACS:
Or manually:
- Open your Home Assistant config directory.
- Create
custom_componentsif it does not already exist. - Copy the
custom_components/ultraloq_ble/folder from this repository into your Home Assistant config directory. - Restart Home Assistant.
- API model
UL3-BTmaps toSmartLockByBle. - Unlock over BLE is momentary (same as the official app). Use Lock Mode → Passage for sustained unlock, then Normal to exit.
- Lock state starts unknown and is assumed after an acknowledged action. Battery and clock reads do not confirm whether the lock is locked.
- Restart and clock writes are unavailable on the original UL3-BT until support is verified. Battery and clock reads remain available.
- Battery level is byte 4 of the UL3
GET_BATTERYreply (no separate status byte). Optional read failures are counted; after repeated failures the sensor goes unknown and exposeslast_battery_read/battery_read_failures. - Unplug the official Ultraloq Wi‑Fi bridge while using this integration — it fights for the exclusive GATT session.
- Put an ESPHome Bluetooth proxy (active GATT) close to the lock; back-to-back commands can still fail with
ESP_GATT_ERRORif the previous session has not finished tearing down.
Known models select an explicit legacy, BT264, or UL3 protocol independently of their feature capabilities. Unrecognized models retain the historical BT264 fallback, but restart and clock writes require an explicitly supported model.
This integration relies on a direct, active BLE connection to the lock. Ultraloq locks are VERY stingy about BLE connections, even with the offical WiFi bridge. This means that updates may occasionally fail, and the update speed will be much lower than a normal Zigbee/WiFi lock.
This integration is designed so the cloud is used only when needed:
- first setup
- credential reauthentication
- manual lock metadata refresh
- optional Cloud Battery Level polling, only when explicitly enabled
Normal operation such as:
- lock
- unlock
- state updates
- reading battery/autolock/mode values
- setting the auto-lock timer
is intended to happen locally over BLE.
I am working on a local only version, but I am still exploring whether it's viable for normal users.
Each lock may expose:
sensor.battery_level: reports High, Medium, Low, or Critical.sensor.cloud_battery_level: optional cloud-reported battery percentage, named Cloud Battery Level.sensor.autolock_time: read-only auto-lock delay in whole seconds.sensor.autolock_mode: reports Immediate or Door Sensor mode.sensor.last_successful_communication: timestamp of the last valid, successful BLE response from the lock.sensor.model: diagnostic model identification from BLE when supported, otherwise the configured model. The original Pro firmware reports the family nameU-Bolt; this does not change the integration's model capability mapping.sensor.firmware_version: diagnostic firmware version, initially from cached cloud metadata when present. Models with model-read support attempt a BLE identification read once after the first successful status poll per integration load; Get device information can retry it. Unsupported or malformed responses retain the existing version.binary_sensor.door: reports open or closed on models with door-sensor support.binary_sensor.sound: reports whether lock sounds are enabled on models with mute-mode support.select.lock_mode: contains only the modes supported by that model.switch.mute: mutes sounds when on, using admin login followed by a write and confirmation read. It is created for models declaring mute support; the existing Sound binary sensor remains available.button.rescan: immediately requests fresh state over BLE.button.restart: reboots the lock over BLE.
Notes:
- Availability is shared across a lock's BLE entities, except the Rescan and Restart buttons, which remain available so recovery can be attempted. Model, Firmware Version, Last Successful Communication, and Cloud Battery Level remain visible independently of BLE availability.
- Capability-dependent entities are only created when the model mapping reports support.
- The work-mode framing and auto-lock field corrections apply to all models marked
bt264in the capability table, including the generic fallback for unknown models. Non-bt264models retain their existing layouts. The corrections were derived from official U-Bolt02.28.0020firmware; their application to the rest of thebt264family still needs hardware validation.
The auto-lock enabled binary sensor has been removed for all models because the response field was incorrectly interpreted as an enabled flag. Existing entity registry entries are removed on integration reload; automations referencing that sensor need updating.
In the integration's Configure options, enable Cloud Battery Level and choose a cloud poll interval of 6, 12, or 24 hours (default: 12). It is off by default. Enabling it adds a percentage sensor alongside each lock's existing Bluetooth battery-level sensor, with the mdi:battery-plus-variant icon.
Each refresh performs a U-tec cloud login and fetches the account's device metadata once for all locks. It does not reload the integration or change BLE polling. Cloud failures leave BLE control unaffected and retain the last successful reading. The sensor's last_successful_cloud_fetch and cloud_update_success attributes show whether that reading may be stale. With no successful reading, the state is unknown; missing values and invalid percentages (including -99) are also unknown. Zero percent is accepted unless the same cloud response's categorical battery level is Medium or High; some locks report 0 alongside a High level, so that contradictory zero is reported as unknown.
The first cloud fetch runs in the background so local sensors can load immediately. To request another fetch without reloading, call homeassistant.update_entity for a Cloud Battery Level sensor. Requests share the account's coordinator, which prevents simultaneous fetches and batches overlapping refresh requests.
The percentage is whatever the cloud reports; a successful fetch does not guarantee a recent measurement from the lock or bridge. The sensor remains available independently of Bluetooth. Cloud polling is unavailable for local-only installations.
If the sensor is unknown despite a successful fetch, its cloud_battery_status attribute distinguishes percentage_missing, percentage_invalid, percentage_zero_contradicted (0% reported alongside a Medium or High cloud level), and device_not_returned (no matching cloud device). A usable reading reports percentage_valid. After a failed fetch, this status describes the last successful response.
ultraloq_ble.set_device_autolock configures auto-lock locally over BLE. After a successful write, it reads the setting back from the lock and immediately updates sensor.autolock_time and sensor.autolock_mode.
device_id: lock to configure.duration: delay before automatically locking.door_sensor: when enabled, lock immediately after the door sensor reports closed; when disabled, use timer mode.enabled: turn auto-lock on or off.manual: optional raw hexadecimalSET_AUTOLOCKpayload. This overridesduration,door_sensor, andenabled.
- Bluetooth quality matters a lot. Weak or non-connectable advertisements will cause timeouts or unavailable entities. You will need active-capable Bluetooth nodes very close to each lock.
- Some lock models may still need extra command or capability tuning.
- State updates after a lock or unlock are very slow and dependent on refresh interval. Perhaps there is a way to subscribe to Ultraloq BLE pushes, but I do not have the tools to reverse engineer such a thing.
- Shelly Bluetooth proxies are incapable of starting an active GATT BLE connection, so you will need either a USB Bluetooth adapter or an ESPHome device with
active: trueenabled in the Bluetooth configuration. - There is a Bleak depreciation warning in the debug logs. I am aware of this but I'd like to get the rest of the implementation stable before attacking that.
- Some locks randomly go offline due to them not responding to
ADMIN_LOGIN. I am working on a fix, but it only happens occasionally.
Check:
- the lock is in Bluetooth range
- your Home Assistant Bluetooth adapter or ESPHome proxy can make active connections
- the lock is not only being seen as
connectable: false - Unsupported device, in which case you could try reporting an issue here
Full disclaimer: Most of the improvements from the original were by GPT 5.6 Sol and GPT 5.4 Codex. However, I personally use this integration and I am happy with it, so I am sharing it in case it could be useful to anyone else.