Skip to content

Should hs.battery.otherBatteryInfo() provide battery info for connected AirPods? #1608

@jasonrudolph

Description

@jasonrudolph

I see that the recently-added hs.battery.otherBatteryInfo() function can be used to get battery info for attached bluetooth devices:

/// hs.battery.otherBatteryInfo() -> table
/// Function
/// Returns information about non-PSU batteries (e.g. bluetooth accessories)
///
/// Parameters:
/// * None
///
/// Returns:
/// * A table containing information about other batteries known to the system, or an empty table if no devices were found

Should Apple AirPods be included in the battery info returned by hs.battery.otherBatteryInfo()? I ask, because I can see the battery info for Apple AirPods in System Preferences, but I don't see any battery info reported by hs.battery.otherBatteryInfo().

bluetooth

> hs.inspect(hs.battery.otherBatteryInfo())
{}

Is there a way to fetch the battery info for AirPods via Hammerspoon?


Refs: 590ea51
Refs: #939

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions