Skip to content

Conversation

@SolusCado
Copy link

Summary

This PR adds first-class credit card support to the YNAB Home Assistant integration.

✨ New Features

  • Per-credit-card configuration entities:
    • Credit Limit
    • APR
  • New per-card sensors:
    • Credit Utilization (%)
    • Available Credit
  • Aggregate sensors across all credit cards:
    • Total Credit Limit
    • Total Available Credit
    • Total Credit Utilization
  • Credit card entities are grouped under a dedicated “Credit Card” device per account

🧠 Design Notes

  • Credit limits and APRs are user-provided, as YNAB does not expose these via the API
  • Calculations correctly handle positive balances (e.g., overpayments)
  • Aggregate values reuse the same logic as per-card sensors for consistency
  • No breaking changes to existing sensors, entities, or configuration

🚧 Out of Scope / Follow-ups

  • Credit card due dates exposed via a Home Assistant calendar entity
  • Optional payment reminder automations

These can be addressed in a follow-up PR if desired.


Happy to make adjustments based on feedback.

@DeLuca21
Copy link
Owner

Hey @SolusCado,

Thanks for putting this together. The credit card enhancements themselves look useful.

At the moment, this PR is adding a new copy of the integration at the repo root rather than modifying the existing files under custom_components/ynab_custom/.

Because of that, GitHub treats every file as new and Home Assistant and HACS will not load these files.
For HACS, all integration code must live under:

custom_components/ynab_custom/

Could you move the changes into that folder and rebase onto the latest main so we get a proper diff against the existing integration. Once it is structured correctly, I am happy to review the changes.

It would also help if you could explain how the credit card enhancements are implemented and how they are intended to be tested. I do not personally use credit cards, so knowing which new sensors are added, where they appear, and how they are expected to behave would help me validate the changes properly.

Thanks again for the contribution.

@DeLuca21 DeLuca21 self-assigned this Dec 16, 2025
@github-actions
Copy link

This pull request has been marked as stale due to inactivity. It will be closed in 7 days unless there is activity.

@github-actions github-actions bot added the stale label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants