modrzew / hass-flashforge-adventurer-3

Home Assistant integration providing support for the FlashForge Adventurer 3 3D printer.
20 stars 10 forks source link

Adventurer 3 - Entity values are empty/wrong #6

Closed Freekers closed 1 year ago

Freekers commented 1 year ago

I own a Flashforge Adventurer 3 (not Pro or Lite, just the regular one) but the entity values are empty/wrong.

The printer is online of course ;)

Also, only two entity values are created, the camera entity is missing. I found an error regarding the camera entity in the logging, but for the other two entities there is no error.

2022-12-04 21:58:25.386 ERROR (MainThread) [homeassistant.components.camera] Error while setting up flashforge_adventurer_3 platform for camera
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/flashforge_adventurer_3/camera.py", line 27, in async_setup_entry
FlashforgeAdventurer3Camera(config),
File "/config/custom_components/flashforge_adventurer_3/camera.py", line 34, in __init__
self.type = printer_definition['type']
KeyError: 'type'
2022-12-04 21:58:25.400 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.sensor] Finished fetching My sensor data in 0.017 seconds (success: True)
2022-12-04 21:58:25.423 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.sensor] Finished fetching My sensor data in 0.023 seconds (success: True)
2022-12-04 21:59:25.028 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.sensor] Finished fetching My sensor data in 0.027 seconds (success: True)

I'm running Home Assistant 2022.11.5 in Docker on x64. Let me know if you need more info

Thanks!

modrzew commented 1 year ago

Hey @Freekers! I fixed the issue with the camera entity not showing up in version 1.0.2, please upgrade and let me know if it makes it go away.

As for the values being wrong: is that screenshot from when the printer was printing, or when it was just turned on without running any job?

Freekers commented 1 year ago

Hey @modrzew ! Thanks so much for the quick fix :) I updated to version 1.0.2. and everything is now working as it should, including camera and the progress/state entity. In my original post I tested it when the printer was idle and I misread 'online' for 'offline', that's why I was confused, sorry about that.

Thanks once again!