Skip to content

Let callers skip the monthly summary on update - #160

Open
theSiegs wants to merge 1 commit into
pantherale0:mainfrom
theSiegs:pr/skip-monthly-summary
Open

theSiegs wants to merge 1 commit into
pantherale0:mainfrom
theSiegs:pr/skip-monthly-summary

Conversation

@theSiegs

Copy link
Copy Markdown

Device.update() fetches the monthly summary on every call. That's two extra requests per console per poll, for data that changes once a month.

  • update() on Device and NintendoParental takes a keyword-only monthly_summary argument. It defaults to True, so existing callers see no change; with False the last summary is kept.
  • NintendoParental.update(monthly_summary=False) still fetches it for a device that doesn't have one yet.
  • README updated. Tests cover the skip, the default and the per-device fallback.

This would let the Home Assistant integration fetch the monthly summary hourly instead of on every poll.

Suggested label: enhancement

Put together with AI assistance; tested with the suite, and on my own install with the default (monthly_summary=True).

Device.update() fetched the monthly summary on every call, which costs
two extra requests per console per poll for data that changes at most
once a month. update() on Device and NintendoParental now take a
keyword-only monthly_summary (default True, so existing callers see no
change). NintendoParental.update() still fetches it for a device that
has no monthly summary yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant