Skip to content

Camera switch permanently unavailable on Creator 5 Pro (availability gated on is_pro instead of is_creator5_pro) #17

Description

@bberrevoets

Summary

On a Creator 5 Pro (PID 41), switch.<printer>_camera is permanently unavailable. The camera entity works fine — only the switch that toggles the stream is dead.

The camera switch's availability is gated on client.is_pro, which means Adventurer 5M Pro, not "any Pro model":

https://github.com/GhostTypes/ff-5mp-hass/blob/main/custom_components/flashforge/switch.py#L52

FlashForgeSwitchEntityDescription(
    key="camera",
    ...
    availability_fn=lambda client: client.is_pro,   # <-- never true on a Creator 5 Pro
),

Everywhere else the codebase carefully distinguishes the two. select.py gates the very same "Pro-only feature" concept correctly:

# select.py
availability_fn=lambda data: bool(
    getattr(data, "is_pro", False) or getattr(data, "is_creator5_pro", False)
),

and sensor.py does the same in _has_air_quality(). So this looks like a single spot that was missed rather than a deliberate restriction.

Suggested fix

availability_fn=lambda client: bool(
    getattr(client, "is_pro", False) or getattr(client, "is_creator5_pro", False)
),

Note the switch platform passes the client to availability_fn (unlike select.py/sensor.py, which pass the coordinator data), so the fix belongs on the client attributes.

Environment

  • Printer: FlashForge Creator 5 Pro, firmware 1.9.4
  • Integration: v1.3.0, LAN mode, local HTTP API
  • Home Assistant: 2026.7

The printer does report a camera and gives a working stream URL:

// POST /detail
"camera": 1,
"cameraStreamUrl": "http://<ip>:8080/?action=stream"

and camera.<printer>_camera streams correctly (MJPEG, confirmed serving real frames). Only the toggle is affected.

Possibly related: the LED switch

On the same printer the LED switch also comes up unavailable unless the "Override LED availability" option is enabled — even though /product explicitly reports light control as present:

// POST /product
{ "lightCtrlState": 1, "chamberTempCtrlState": 1, "nozzleTempCtrlState": 1, "platformTempCtrlState": 1,
  "internalFanCtrlState": 0, "externalFanCtrlState": 0 }

So client.led_control appears not to reflect lightCtrlState on this model. With the override enabled the switch works correctly end-to-end (verified: toggling from HA flips the printer's own lightStatus opencloseopen). Might be worth deriving led_control from lightCtrlState so the override isn't needed here — happy to open a separate issue if you'd prefer.

Thanks for the integration — the Creator 5 Pro support (per-tool temps, chamber, TVOC) is otherwise spot on.

Metadata

Metadata

Assignees

Labels

area: apiAPI layerbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions