mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-31 04:01:59 +01:00
The previous commit fixed battery_mv in the STATS_TYPE_CORE frame, but that is not the path companion apps use to display battery. CMD_GET_BATT_AND_STORAGE goes through `CompanionFrameServer._get_batt_and_storage()`, an openhop_core extension hook documented as "Default: all zeros" that the repeater never overrode — so apps showed 0% regardless of what any sensor reported. Override it in the repeater's frame server: battery from the same sensor lookup added for core stats, storage from the filesystem holding the configured storage_dir. Both are wired in from main.py alongside stats_getter. Found by deploying the previous fix and observing that Home Assistant showed the modem battery correctly while the phone app still showed 0% — two different paths, only one of which had been fixed.