-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Create homeassistant #7765
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
Create homeassistant #7765
Conversation
New plugin |
This plugin requires a review from a Plugin Hub maintainer. The reviewer will request any additional changes if needed. Internal use only: Reviewer details Maintainer details |
Use an injected OkHttpClient instead of manually handling the requests |
You can lean on the runelite farming plugin instead of cloning it all yourself by just reading config keys. Were you trying to do anything that wouldn't be covered by that? |
All I really want to do, is sync the farming timers/birdhouses/farming contract to home assistant. The reason I did it this way is because I copied this from a different plugin that also uses the farming timer classes directly. Specifically, I copied it from this plugin: https://runelite.net/plugin-hub/show/time-tracking-reminde I was trying to find a way to read it from the tracking plugin directly but I could not really figure out how to do that. How exactly can I read the config from the timers plugin? If you could point me to an example or something that would be great! I don't mind getting rid of those copied dependencies at all, that was my intention at the start anyway |
She is referencing using the config manager to read the values store in config. Eg, on config change you could be checking keys for If you enable debug mode for your client, you can see the config changes in your console. Or you can log them to console in config changed. |
@LlemonDuck, @raiyni I really tried to convert this to use the config. But it seems to me like the time tracking plugin does not save this information in the config. And uses it's internal classes to calculate the next completion time. What they save in the config is the starting time of patches. Which means I would still need to copy all of the logic for calculating completion times. Which are in the same classes. When looking at other plugins that also use the time tracking from the same plugin, they also copy the logic directly |
Updated some of the logic. - The plugin no longer checks anything in game ticks. Only when the timer config timer changes - Updated the Home assistant API calls. I created a custom integration to accompany this plugin. Which drastically reduces the amount of needed calls to HA (I can update all the timers in 1 single call) - Updated readme
Added functionality to update farming tick offset as well.
This is a home assistant integration to have farming patch information available in home assistant.
This allows you to send notifications to your phone if you're not playing the game to notify you of patches being ready etc.