home-assistant-garmin_connect
home-assistant-garmin_connect copied to clipboard
Add user in sensor name
Add the name of the user in sensor entity id to know wath sensor fit with user
Exemple: sensor.weight
If the email of the account is [email protected] The sensor will be sensor.name_weight
To name or rename all sensor, it's a big work, I think it's more userfriendly if we have the name at start
Thanks
Completely agree. And then it will be useful if pulling several users 👥
Thought about this earlier too, it's easy to implement, but current users have a big task ahead. Will implement this soon.
Thought about this earlier too, it's easy to implement, but current users have a big task ahead. Will implement this soon.
Fantastic, thanks 👍😀 Perhaps it could be an option in the configuration flow, so existing users could add another integration, get promoted to include user name in sensor name, then update existing dashboards, automations etc. when convenient?
Of course, hardliners could go ahead and update entity names manually anyway.
Thanks! I think it's a good move for the futur. :)
thanks alot. It is amazing plugin. I was surprised to find, it exist. thank you. It would be perfect to be able to integrate stats from family at home...
Thought about this earlier too, it's easy to implement, but current users have a big task ahead. Will implement this soon.
@cyberjunky Any news regarding that? I can try to help with a PR if it wasn't started and there's a direction on how to solve it
Hi @ronlut it's a rather simple change, but I don't want to mess up all people's sensors, so looking into a way to do it without much disturbance.
@cyberjunky I'll hopefully open a PR in the following days once I have a free hour 🙏 I'll handle #119 as well
@cyberjunky I thought of adding two checkboxes when configuring the integration:
- Prepend domain name to sensor names
- Prepend username to sensor names
They will both be disabled default, but if the user checks them it will create all sensors with either domain/username prepended or both.
Started looking into it yesterday but I need to set up a proper debugging environment otherwise it's too much of a hassle to check each change. Are you using devcontainers
when developing?
@ronlut I do for newer integration, but didn't include the config in this one, will have a look. Maybe we just add those prepends by default, it's onetime stress/work but then we are treating it like all other home assistant integrations.
@cyberjunky see this https://github.com/cyberjunky/home-assistant-garmin_connect/pull/120 I went with taking the username part of emails as full email felt too much in sensor names and entity ids..
I can add the config options to disable this behaviour to make it backward compatible LMKWYT
@cyberjunky see this https://github.com/cyberjunky/home-assistant-garmin_connect/pull/120 I went with taking the username part of emails as full email felt too much in sensor names and entity ids..
I can add the config options to disable this behaviour to make it backward compatible LMKWYT
Would be great for me ❤️
@cyberjunky see this #120 I went with taking the username part of emails as full email felt too much in sensor names and entity ids..
I can add the config options to disable this behaviour to make it backward compatible LMKWYT
Maybe this is better, or even have a entry field where people can fill in the name they want to prepend (this requires an extra data[] field to be stored, but yeah...)