Skip to content

About

Tessera plugin: AI subscription limits, API credits and costs from Home Assistant sensors

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AI limits

A tile that shows how much of your AI plans and credits is used: the 5-hour and weekly limits of a Claude subscription, the credit left on an API account, or what an API cost this month. Each limit in percent gets a bar that turns amber and red as it fills, and says when it resets. A credit or a cost shows its value with a line of its last week.

Set up

  1. Make sensors for your limits in Home Assistant (below, "Where the values come from").
  2. Add the plugin to a screen in Tessera. The screen builds once.
  3. In Layout, place the AI limits tile from the library's Plugins group.
  4. In the inspector, choose up to six sensors under Limit 1 to Limit 6. Under each, Display name replaces the sensor's name on the tile ("Pro week" instead of "Claude Usage (Jonas - Pro) Weekly All Models Limit Usage"); leave it empty for the sensor's own name.
  5. Optional: set from which share used a bar turns amber (Amber from, 75 % by default) and red (Red from, 90 %).

Where the values come from

The plugin reads Home Assistant entities only. It talks to no AI service itself and never sees a key: the accounts and their keys stay in Home Assistant.

  • A sensor in % gets a bar. If it has an attribute resets_at (a time), the tile says when the limit resets.
  • Any other sensor (a credit, a cost) shows its value and unit; USD and $ are written as $12.34. Under it, a line shows its last week, from Home Assistant's hourly statistics. Home Assistant keeps those only for a sensor with a state_class (total for money, measurement otherwise), and only from the day it got one, so a new sensor's line starts short. The tile asks for it once an hour.

Sensors that work well:

  • Claude Pro or Max limits (5-hour session, week, week per model) and Anthropic API cost: the HACS integration ha-claude-usage. Its usage sensors are in % and carry resets_at. It uses an endpoint Anthropic does not document, which may change.
  • OpenRouter credit, DeepSeek balance, OpenAI API cost this month: REST sensors of Home Assistant, with the keys in secrets.yaml. Give them state_class: total for their line.

Sizes

  • One sensor, one cell, or a tile with room for one row: the limit closest to its end, large, with its bar and reset time; a credit or a cost large, with its week's line under it.
  • Larger: one row per limit, as many as fit, in the order you chose them.

Good to know

  • The tile counts down to the reset on the screen's own clock; the values change when the sensors do.
  • A sensor that is unavailable shows --.
  • Everything stands in the middle of the tile; a row with nothing under its value stands in the middle of its room.

About

Tessera plugin: AI subscription limits, API credits and costs from Home Assistant sensors

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages