sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
613 stars 54 forks source link

Ability to specify namespace name #98

Closed ImaBadCoder closed 2 years ago

ImaBadCoder commented 3 years ago

I just came across your app and love it. I would like to run this on multiple computers, so it would be super beneficial if we could create a custom namespace. So instead of sensor.cpuloadsensor, something like sensor.computername_cpuloadsensor with the ability to be customized in the gui would be awesome.

thanks!

jbstep commented 3 years ago

Definitely need this in my classroom.

manju-rn commented 3 years ago

isn't this already there? When you create the sensor, you could provide a name of your choice, like this image

ImaBadCoder commented 3 years ago

manju,

Thanks for the tip. That does indeed meet the requirement. The one downside that I see is that it changes the friendly name to the same as the newly correctly named entity. So, my new ask is to have a way to leave the default "FriendlyName", and only change the entity. I could also see a need to have a Prepend option, which is really what I am looking for.

manju-rn commented 3 years ago

Well, the easy way is to just change the friendly name in HA to whatever you like. As long as the core entity name does not change, HA will not have any problems. There is a feature I have requested to add custom JSON to be passed to the MQTT, this would allow for more controls - not just friendly name, but also the attributes

jbstep commented 3 years ago

My issue is that we image our computers often and doing this across 25-30 PC's is very laborious. If we could use a generic sensor name and it could grab the host name like IOT link does, it would be perfect.

ImaBadCoder commented 3 years ago

agree with jbstep, would be ideal to not have to manually change anything, but have it dynamically create the sensors with the correct info.

sleevezipper commented 3 years ago

A prefix would indeed be nice. There's some more discussion on this in #24.

sleevezipper commented 2 years ago

A name prefix has been implemented and will be in the next release!