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

Use a unique user-agent #14

Open
jstaro opened this issue Sep 25, 2024 · 1 comment
Open

Use a unique user-agent #14

jstaro opened this issue Sep 25, 2024 · 1 comment

Comments

@jstaro
Copy link

jstaro commented Sep 25, 2024

Hi,

We at Tibber noticed that you are using the user-agent REST.

This user-agent seems to have somewhat originated on the HA forums and survived via copy/paste :). The risk with having a nondescript user-agent like this is that bunching too many integrations under the same umbrella, if you will, will make it harder for us to contact you and help improving your sensor in case we can see on our end that your users encounter issues, or if we do bigger changes/improvements to the API that we might want to inform you about. After all, if all we can see is "this is something that calls itself REST" it can become a bit hard (it wasn't easy to find this repo, for instance).

So, it would be great if you could follow the client requirements described in our developer guidelines and set a descriptive user-agent so we can more easily identify things and ensure we don't accidentally block behaving users: minimize the blast radius, as it were.

It's a bit tricky with version-less things, but I'm thinking something like:

  • HomeAssistant/<actual HA version> edwardtfn/HomeAssistant-Config, but I am not sure a RESTful header value can be templated so you could retrieve the HA version, so maybe that is hard; you probably know this better than I
  • github.com/edwardtfn/HomeAssistant-Config
  • edwardtfn/HomeAssistant-Config
  • HomeAssistant-Config (github.com/edwardtfn/HomeAssistant-Config)
  • HomeAssistant-Config/sensors/tibber

If you can add a version, even if it's just a static dummy one, why not.

As long it's says something about HomeAssistant and identifies this component, it's an improvement, I feel.

That should take care of future users of this config. Now, it's a little bit harder to update this on all the HA installs out there, but that's more our problem.

edwardtfn added a commit that referenced this issue Sep 27, 2024
@edwardtfn
Copy link
Owner

I've already changed the user-agent as you suggested.

I believe it is possible to template that, but getting Home Assistant version in a consistent way across multiple implementation may be challenging. I will look at that.

This was not originally created by me. I was one copying from someone else and customizing, and as my entire HA configuration is shared, I believe more people could be using this (and I can go to the forum and suggest the updates).

I will play a bit more with the HA version on the user-agent and update you here.

edwardtfn added a commit that referenced this issue Sep 27, 2024
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

No branches or pull requests

2 participants