tomaae / homeassistant-openmediavault

OpenMediaVault integration for Home Assistant
Apache License 2.0
109 stars 16 forks source link

Integration seems to have issues with S.M.A.R.T. enabled #124

Open lukas1906 opened 1 year ago

lukas1906 commented 1 year ago

Describe the issue

A clear and concise description of what the issue is. -->When setting up integration with S.M.A.R.T. enabled the integration fails.

How to reproduce the issue

Enable S.M.A.R.T. in the configuration of the integration Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Expected behavior

Integration to connect to my OMV server

Screenshots

Software versions

Diagnostics data

Traceback/Error logs

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/openmediavault/apiparser.py:53 Integration: OpenMediaVault (documentation, issues) First occurred: 18:31:36 (1 occurrences) Last logged: 18:31:36

Error setting up entry NAS for openmediavault Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart tmp_data = parse_api( ^^^^^^^^^^ File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api data = fill_vals(data, entry, uid, vals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry ret = int(ret) ^^^^^^^^ ValueError: invalid literal for int() with base 10: '16278h+57m+13.531s'

Additional context

To resolve disable S.M.A.R.T. in the configuration of the integration and reboot homeassistant

tomaae commented 1 year ago

can you check smart manually and see what kind of field is "16278h+57m+13.531s"?

lukas1906 commented 1 year ago

Hi,

it seems to be field 240 - Head_flying_hours [image: image.png]

On Tue, Jun 13, 2023 at 10:23 AM Tomaae @.***> wrote:

can you check smart manually and see what kind of field is "16278h+57m+13.531s"?

— Reply to this email directly, view it on GitHub https://github.com/tomaae/homeassistant-openmediavault/issues/124#issuecomment-1588285744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6PQODBU3ZVGLVNYXFAPJTXK6XH3ANCNFSM6AAAAAAZDCJPII . You are receiving this because you authored the thread.Message ID: @.***>