Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(thermostat): Add refresh fetch attempts. #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebmerry
Copy link

@sebmerry sebmerry commented Feb 2, 2023

@grivkees This is my first time with TS so please feel free to nitpick. I'm adding support to the fetch operation to wait for current data from the thermostat before returning. I added configuration options so folks can tweak it how they desire. I've found it takes ~3 seconds for new data to show up in the API.

@@ -564,6 +608,21 @@ export class SystemConfigModel extends BaseSystemModel {
}
}

export class SystemModelSettings {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally had this as SystemModelConfig...but that seems to close to SystemConfigModel :)

@grivkees
Copy link
Owner

grivkees commented Feb 4, 2023

Hey! Thanks for putting up this PR! I'll take a look over the weekend. I do have a pretty significant refactor in progress to add the polling and pushing to homekit I mentioned, so I need to see how this will interact with those changes.

@grivkees
Copy link
Owner

grivkees commented Mar 6, 2023

Sorry for the delay here!

The retry logic here looks good, but I don't want to expose new settings right now, since I am hoping the push based version will make the refresh better so we don't need retries.

So for this PR, maybe lets hardcode the stale threshold and retry count?

(Alternatively, I just put a beta version of the push logic out. I'm not ready to push it to stable yet, but feel free to also give this a try and see if it refreshes better for you.)

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.

2 participants