Commit graph

5 commits

Author SHA1 Message Date
e01c0b92e3 debug: add console.log at every step to trace execution 2026-08-21 00:14:41 +01:00
aa05c9c8d4 fix: await Notification.schedule() so notification fires before script exits 2026-08-21 00:10:45 +01:00
2b5751d50e fix: remove Script.done() — not a function in Scriptable 2026-08-21 00:08:31 +01:00
c65affc66c fix: use Scriptable Health API (new Health with string units) 2026-08-21 00:05:56 +01:00
191f5f473b fix: rewrite health-sync.js for current Scripting API
Old script used deprecated Health.read() with Health.Types.* and .quantity
— every read silently failed in try/catch, so no samples were ever collected.

Rewrote to use Health.queryQuantitySamples() with string type identifiers
and .quantityValue(unit) per current Scripting app docs. Added proper units
(kg, mmHg, count/min, count, percent) for each metric type.

Also adds /scriptable/health-sync.js endpoint to serve the script directly.
2026-08-20 23:54:08 +01:00