Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot fetch all disks information #274

Closed
1 task done
cg1410 opened this issue Feb 27, 2024 · 3 comments
Closed
1 task done

Cannot fetch all disks information #274

cg1410 opened this issue Feb 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cg1410
Copy link

cg1410 commented Feb 27, 2024

Checklist

Describe the issue you are experiencing

Hello!
At first i would like to mention that i really like Your integration and mostly it works perfectly.
However i have an issue with reading disks data from my proxmox node.

Here it is, how my disks configuration looks like:
image

And for disks sda, sdb, sdc and sde everything is fine.
The integration is not able to read data (health, temperature, usage etc.) for disk sdd.

Here is the error from home assistant:

Logger: custom_components.proxmoxve
Source: helpers/update_coordinator.py:313
Integration: Proxmox VE ([documentation](https://github.com/dougiteixeira/proxmoxve), [issues](https://github.com/dougiteixeira/proxmoxve/issues))
First occurred: 11:59:12 (1 occurrences)
Last logged: 11:59:12

Unexpected error fetching proxmox_coordinator_disk_pormox_/dev/sdd data: invalid literal for int() with base 10: '3012 (57 88 0)'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/proxmoxve/coordinator.py", line 701, in _async_update_data
    power_hours=int(disk_attributes["power_hours"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3012 (57 88 0)'

I would be very glad if You could help me solve that issue.

In which version of Home Assistant Core do you have the problem?

2024.2.4

What version of Proxmox VE Custom Integration has the issue?

3.4.0

What version of Proxmox VE do you have the problem?

8.1.4

Diagnostics information

No response

Additional information

No response

@cg1410 cg1410 added the bug Something isn't working label Feb 27, 2024
@cg1410
Copy link
Author

cg1410 commented Feb 27, 2024

so the issue is that power_on_hours on that specific disk is: 3015 (173 39 0)

image

i've made a dirty fix by changing

power_hours=int(disk_attributes["power_hours"])

to
power_hours=int(disk_attributes["power_hours"].split()[0])

but probably there is better way to do that :)

@dougiteixeira
Copy link
Owner

dougiteixeira commented Feb 27, 2024

@cg1410 Please, You must add the diagnostic files as instructed in the issue form.

Please, you can follow the steps below:

@dougiteixeira
Copy link
Owner

This is already fixed by #256, please test for the new version 2.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants