NUT configuration for QNAP attached UPS

Homeassistant 2020.12.1 running in a Docker container on a QNAP server.

I tried following the example in https://www.home-assistant.io/integrations/nut/ specifying the IP address and UPS name in the configuration.yaml file. Attempting to access the device resulted in failure. I know from other code that access the QNAP NUT instance over the network, requires the timeout on a request to be increased.

Editing homeassistant/components/nut/init.py and changing the 10 to a 5000 in

async def async_update_data():
    """Fetch data from NUT."""
    async with async_timeout.timeout(10):
        await hass.async_add_executor_job(data.update)
        if not data.status:
            raise UpdateFailed("Error fetching UPS state"

has enabled the device to function correctly

1 Like