Do pull requests have to be associated with something?

A few weeks ago I bought a radiothermostat CT50 which is an available component in HA, but I discovered it was missing some features that I wanted and I also discovered what I think is a bug. So, I copied the code from radiotherm.py, made some quick and dirty changes and ran it as a custom component.

Since 0.27 depreciates the thermostat component and replaces it with climate and I’m going to have to do a bit of rework anyway, it occurs to me the right thing to do is clean up my code and contribute it back to HA’s codebase and the community at large. I’ve never contributed to HA or any other open source project before though, so I have a question about the contribution methodology.

I’ve since taken a look at the github issue tracker to see if an open issue exists for the bug I found, and there isn’t one. When I’m done and I submit a pull request, does that request need to be associated with an issue? In other words, do I need to file a bug, assign it to myself, and fix it, or can I just fix it and that’s that?

For the small features I’ve added (nothing major, but I’ve implemented fan control where this wasn’t previously available on the radiotherm platform), I get that this would need to be a separate pull request to my bugfix from above, but does it need to be associated with a feature request, or can I just add the feature and submit my code?

Thanks!

1 Like

The main reason to file an issue in this case would be to communicate the bugs you’ve found. I think it’s a pretty good to file issues when you find them, even if you intend to fix it yourself. You never know if someone else ran into it and described it in a different, or if someone has another approach, or if someone might find it much later.

That said, if you have a PR ready to go already, I would just file it.

1 Like

That makes sense, thanks @technicalpickles.

Frankly, I need to go back and confirm the bug. I found a symptom of a bug, spotted two possible causes in the code, and just changed them both without bothering to figure out what was actually happening.

I will do better this time around, I promise :pensive: