github trickv/hass-claude-usage v9

latest release: 10
one month ago

What's new in v9

Dynamic per-model / per-bucket limit sensors from limits[]

Anthropic's /oauth/usage payload now expresses rate limits as a top-level limits[] array, and this is where the live per-model data actually lives. This release parses that array and creates one sensor per limit bucket, automatically:

  • e.g. Session Limit Usage, Weekly All Models Limit Usage, Weekly Fable Limit Usage — created on the fly as buckets appear in your payload.
  • State is the bucket's percent; resets_at, severity, is_active, kind, model, and surface ride along as attributes.
  • New models or surfaces show up as new sensors with no integration update. Buckets that disappear from the payload read unavailable (recorder history is preserved).
  • Note: Anthropic exposes no stable model id (display_name is the only identifier), so a model rename creates a new sensor.

This supersedes the earlier approach of reading the flat seven_day_opus / seven_day_cowork keys, which return null on every account tested — the limits[] array is the source that actually populates.

Contributed by @t0mr0zier (#11). Validated against live Max-plan payloads. Thank you!

Full changelog: v8...v9

Don't miss a new hass-claude-usage release

NewReleases is sending notifications on new releases.