NUT - no sensors created for s/n or model no by integration

Hi,

Nut running on my Pi should be able to output the model and s/n when running the upsc command the values should be present. So why are no sensor entries created by the HA Nut integration? Thank you

Not sure on the sensor but HA is pulling the info for my three. Just have to download the diagnostics to see it.

Ran diags and in the case of one nut I have setup it does see s/n. In fact every unique_id includes the serial number so why no sensors for it when I check under integrations?

Is it possible to create a sensor using part of the unique id? Every sensor for a UPS running nut uses s/n as part of the unique id. On the Pi the s/n can be seen but s/n comes up blank as shown in my last post. Can a manual sensor be created and populated with a value?

A little farther up, do you have a section like this?

image

If so, then you can create a template helper with this template:

{% set identifiers = device_attr('sensor.3d_printers_ups_load', 'identifiers') | list %}
{% set identifier = identifiers[0][1] %}
{{ identifier.split('_')[-1].strip() }}

and it should give you the SN as a new entity.

I will have to check when I am home later. One of my Pi’s will give me the s/n and couple others don’t. One a side note, the one we are discussing does and the NUT chat over at Github is telling me I need to update NUT to latest version. I thought sudo update\upgrade should do that, but apparently not. Not sure if that relates because I am not sure where NUT for HA is compared to the other one that can be used in multiple platforms. My skill set is not at a level where I can compile a new NUT.

For what your asking I will check later on. Thank you for assistance here.

1 Like

Here is a screenshot of further up in the extract from the diags:

Then I get this error:

Should be sensor.baseups_load in the template.

(post deleted by author)

While it is pulling out the serial number I am getting the message:

‘This template does not listen for any events and will not update automatically’

I am not seeing uom, device class, state class and no submit button.

Your serial number won’t ever change, so I wouldn’t worry too much about it not updating.

You’ll use the template to create a template sensor from the Helpers tab under devices.

That’s where my screenshot came from.

Its not about it not changing. I view HA as a place where all my information can be easily accessed in one place. I don’t want to be looking under the bottom or back of something.

thank you for clarifying that. much appreciated.

Just add it as an attribute and be done with it. There’s a couple of forum posts on how to do that using customize.

Also, I get HA is done by volunteers and I guess there is 3 people that maintain the NUT addon\integration (or so I was told), but I could rattle off few things that entities were created for NUT and the data never changes. It always has a static value. Some have their wants and needs, I have mine too. Thanks for the tip.

Then this needs to go in as a Feature Request. Pretty sure I saw another one requesting this already somewhere on the forum, so search around before creating a new one please.