Skip to content
New issue

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

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

Already on GitHub? # to your account

Cant configure integration without active spool #105

Closed
4 tasks done
HermanCattaneo opened this issue Mar 29, 2024 · 6 comments
Closed
4 tasks done

Cant configure integration without active spool #105

HermanCattaneo opened this issue Mar 29, 2024 · 6 comments
Assignees
Labels
bug Something isn't working released on @dev

Comments

@HermanCattaneo
Copy link

System Health details

System Information

version core-2024.3.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.20-haos
arch x86_64
timezone Europe/Budapest
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1401
Downloaded Repositories 33
Home Assistant Cloud
logged_in true
subscription_expiration 9 April 2024 at 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
remote_server eu-central-1-2.ui.nabu.casa
certificate_status ready
instance_id 3b98053420a34df7bdafe861765b3da3
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.1
update_channel stable
supervisor_version supervisor-2024.03.1
agent_version 1.6.0
docker_version 24.0.7
disk_total 30.8 GB
disk_used 13.6 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons TasmoAdmin (0.30.0), Duck DNS (1.16.0), File editor (5.8.0), Mosquitto broker (6.4.0), Terminal & SSH (9.10.0), ESPHome (2021.11.3), Double Take Proxy (1.0.0), NGINX Home Assistant SSL proxy (3.9.0), Swatch (3.1.0-2717ec6)
Dashboards
dashboards 1
resources 19
views 19
mode storage
Recorder
oldest_recorder_run 14 March 2024 at 06:40
current_recorder_run 29 March 2024 at 23:56
estimated_db_size 1629.82 MiB
database_engine sqlite
database_version 3.44.2
Sonoff
version 3.6.0 (8dd8af9)
cloud_online 3 / 7
local_online 3 / 3
Spotify
api_endpoint_reachable ok

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

If there is no active spool selected, cant configure the integration, because active_spool_id cant be empty.

Reproduction steps

  1. Fresh spoolman install
  2. Create vendor, filament, spool(s)
  3. Dont select any spool (in fluidd)
  4. Add intregration and try configure it
    ...

Debug logs

2024-03-30 00:13:47.025 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up spoolman platform for sensor
Traceback (most recent call last):
  File "/config/custom_components/spoolman/coordinator.py", line 61, in _async_update_data
    klipper_active_spool: int = await KlipperAPI(klipper_url).get_active_spool_id()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spoolman/classes/klipper_api.py", line 23, in get_active_spool_id
    return int(data.get('result').get("spool_id"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Diagnostics dump

No response

@Disane87 Disane87 self-assigned this Mar 30, 2024
@Disane87 Disane87 added the bug Something isn't working label Mar 30, 2024
Disane87 added a commit that referenced this issue Mar 30, 2024
fixes Cant configure integration without active spool #105
github-actions bot pushed a commit that referenced this issue Mar 30, 2024
## [0.4.2-dev.2](v0.4.2-dev.1...v0.4.2-dev.2) (2024-03-30)

### 🛠️ Fixes

* Fixes an issue when there is no active spool in klipper ([eda5f32](eda5f32)), closes [#105](#105)
@Disane87
Copy link
Owner

Disane87 commented Mar 30, 2024

@HermanCattaneo thank you for reporting this! I've fixed this issue. Could you please test it with the latest dev version? If it's fixed, I would push it to main :)
Thank you in advance!

@HermanCattaneo
Copy link
Author

HermanCattaneo commented Apr 1, 2024

sry just realized i forgot to restart ha after version change

@Disane87
Copy link
Owner

Disane87 commented Apr 1, 2024

So this issue is gone for you?

@HermanCattaneo
Copy link
Author

it's perfect, thank you

@HermanCattaneo
Copy link
Author

sry for the async communication, so yes, i tried v.0.4.2-dev.2 and its working with no active spool, thank you, should i close the issue?

@Disane87
Copy link
Owner

Disane87 commented Apr 1, 2024

Thank you! Nah the workflow will close it when I push it to main

github-actions bot pushed a commit that referenced this issue Apr 1, 2024
## [0.4.3](v0.4.2...v0.4.3) (2024-04-01)

### 🛠️ Fixes

* Fixes an issue when there is no active spool in klipper ([eda5f32](eda5f32)), closes [#105](#105)
@Disane87 Disane87 closed this as completed Apr 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working released on @dev
Projects
None yet
Development

No branches or pull requests

2 participants