systemmonitor: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 324, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/systemmonitor/sensor.py", line 151, in update
self._state = round(psutil.disk_usage(self.argument).free / 1024 ** 3, 1)
File "/usr/local/lib/python3.7/site-packages/psutil/__init__.py", line 2013, in disk_usage
return _psplatform.disk_usage(path)
File "/usr/local/lib/python3.7/site-packages/psutil/_psposix.py", line 121, in disk_usage
st = os.statvfs(path)
FileNotFoundError: [Errno 2] No such file or directory: ''
It’s not really an issue. there are optional arguments in the table. So it’s both. You just have to look up the table to see if an argument is required.
Well it is a binary thing. The argument for a type is either required or optional. If it is required (for the component to work) and is not there, it should fail the configuration check. If it is optional, it should have a default value.
But in that case, the component should have a default value for the argument that is required. It should not just not work without explanation (the error message does not tell you that an argument is missing).