I have configured successfully a NUT server in my RPi and I can get UPS values from a remote client by using upsc.
I added the NUT integration in Home Assistant by adding the following in the configuration.yaml file under the sensors section:
- platform: nut
name: "UPS"
host: 192.168.1.100
port: 3493
resources:
- ups.load
- ups.temperature
- ups.status
- input.voltage
- input.frequency
- output.voltage
- battery.voltage
- battery.charge
However when I restart Home Assistant the entity is not available and I get the following error in the log file:
2020-07-05 18:51:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 129, in async_init
flow, flow.init_step, data, init_done
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 201, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/nut/config_flow.py", line 143, in async_step_import
if self._host_port_alias_already_configured(user_input):
File "/usr/src/homeassistant/homeassistant/components/nut/config_flow.py", line 218, in _host_port_alias_already_configured
for entry in self._async_current_entries()
File "/usr/src/homeassistant/homeassistant/components/nut/config_flow.py", line 218, in <setcomp>
for entry in self._async_current_entries()
File "/usr/src/homeassistant/homeassistant/components/nut/config_flow.py", line 106, in _format_host_port_alias
host = user_input[CONF_HOST]
KeyError: 'host'
Any ideas what to look for?
Thank you in advance!