So in my previous post I showed how to add NUT to Ubuntu and XigmaNAS – with this all working the next step is to add a NUT sensor to Home-Assistant.io

I’m running Home-Assistant in a Docker container, but previously had it running on a Raspberry Pi (using HASS.io) – I will post how I moved from RPi to Docker in future.

Configuration:

It’s fairly easy and you only have to add the following lines to your home-assistant configuration.yaml file:

under the sensors section

sensor:
- platform: nut
name: Eaton UPS
host: 192.168.2.5
port: 3493
alias: EatonUPS
username: mynas
password: your_password_goes_here
resources:
- ups.load
- ups.realpower.nominal
- input.voltage
- battery.charge
- battery.runtime
- ups.delay.shutdown

The username & password settings are the ones you configured when you set up NUT on Ubuntu.

Reload/restart Home-Assistant to make sure the config is updated.

This is what I get:

screenshot 2019-01-07 at 18.20.08

That’s it !

This sensor attributes are now available on your Home-Assistant to query and use in Node-Red flows, etc. !

screenshot 2019-01-07 at 18.27.30

Isn’t it JUST AMAZING ?

Have fun !