Skip to content

Fixed illuminator state/control on dual illuminator camera (IL series)#581

Open
Trexano99 wants to merge 1 commit into
rroller:mainfrom
Trexano99:main
Open

Fixed illuminator state/control on dual illuminator camera (IL series)#581
Trexano99 wants to merge 1 commit into
rroller:mainfrom
Trexano99:main

Conversation

@Trexano99

Copy link
Copy Markdown

✨ Fix: Dynamic illuminator indexing for Dahua dual smart light cameras (IL Series)

🚨 The Problem

On modern Dahua dual smart light cameras (IL series), the illuminator state and functionality were bugged. Previously, the white light was implicitly assumed to be at index 0. While this works for single-illuminator cameras, on dual-illuminator models, index 0 is assigned to the Infrared (IR) light, which breaks white light controls.

🛠️ The Solution

  • Introduced get_illuminator_index: A new function to dynamically identify the correct light index regardless of the camera's hardware layout, cleanly preserving legacy behavior.
  • Refactored async_set_lighting_v2: Parameterized the index within the function call, ensuring the dynamically identified light index is resolved before execution.

✅ Impact

  • 💡 Successfully restores turn on/off and brightness controls for the white light on IL series cameras.
  • 🛡️ Ensures strict backward compatibility for single-illuminator models.

📝 Documentation & Usage Note

To control the illuminator via the Home Assistant entity, the camera's illuminator mode must be set to manual.
(Tip: Setting the night profile to "manual illuminator" allows for consistent manual control directly from the HA entity).

@Trexano99 Trexano99 changed the title Fixed light state/control on dual illuminator camera (IL series) Fixed illuminator state/control on dual illuminator camera (IL series) Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant