HomeKit Battery Status Shows 0% for Motion Sensor Exported from Hubitat

I am experiencing a bug where a motion sensor that I exported from Hubitat to HomeKit through the HomeKit Bridge is displaying an incorrect battery status of 0% in the Home app. This is causing persistent low battery warnings despite the device having adequate battery power.

Device Details:

  • Device Name: Anyone Motion
    • Device Type: Generic Component Motion Sensor (C-7 model)
    • Device ID: HUBITAT559
    • HomeKit Export Status: Enabled
    • Firmware Version: 2.4.3
    • Device Model: C-7
      Problem Description:
      The motion sensor is properly paired and functioning in Hubitat, showing correct motion detection and other attributes. However, when synced to HomeKit via the HomeKit Bridge, the battery level displays as 0%, triggering continuous low battery alerts in the Home app on iOS devices.

Expected Behavior:
The battery percentage displayed in HomeKit should accurately reflect the actual battery level from the Hubitat device, or if battery data is not available from the device driver, it should display as "Unknown" rather than 0%.

Actual Behavior:

  • HomeKit shows battery status: 0%
    • Home app displays persistent "Battery Low" warning
    • The warning does not disappear despite the device functioning normally
    • Hubitat correctly recognizes the device status (device works properly in the hub)
      Steps Taken:
  1. Verified the motion sensor is properly added to Hubitat
    1. Confirmed HomeKit Bridge is enabled for this device
    1. Removed and re-added the device to HomeKit
    1. Rebooted the hub
    1. The battery status in HomeKit still shows 0%
      Additional Information:
      This is a Generic Component Motion Sensor, and the battery attribute may not be properly mapped during HomeKit export. I have multiple other devices exported to HomeKit that are working correctly. This issue appears to be specific to how battery information is being handled during the HomeKit export process for this particular motion sensor model.

Could this be a bug in how the HomeKit Bridge handles battery status attributes for motion sensors? Any guidance on resolving this issue would be appreciated.

You can fix your problem by turning on the option to show accessory classes and characteristics in the HomeKit Bridge app (if you didn't already), then using the "-" (minus) icon next to the battery attribute underneath your device, which will customize what gets exposed to HomeKit, in this case, removing the battery attribute. This makes sense to do if your device doesn't have one.

Just curious, what parent device or app created this device, and what is the actual device? There may be a better driver it could have used.

1 Like

Resolved.
Thank you.

Glad to hear that! Still curious about this if you feel like sharing -- there could be something else that could stop this sooner:

Otherwise, this workaround certainly works for any device and any similar situation or need in HomeKit.

It's a custom virtual presence driver I wrote myself. It determines home presence based on WiFi connection and GPS location data.

I've been using this driver for quite a while without any issues. The 0% battery status only started appearing in the Home app a few months ago — it wasn't there initially. My guess is that a recent iOS update changed how HomeKit handles or displays battery status for virtual devices that don't actually have a battery capability.