Add Duration Parameter to WLED Nightlight Switch

Hi! :wave:

Unfortunately, the default WLED Nightlight switch in Home Assistant doesn’t support passing a custom duration like &NL=10. It simply toggles Nightlight using the default value set in the WLED UI (similar to &ND).

However, if you want more control — like setting duration, mode, target brightness, and even reading remaining time — this is possible using my WLED Live View Proxy integration, which supports sending JSON commands via WebSocket.

Example service call with full parameters:

service: wled_liveviewproxy.send_command
data:
  targets:
    entity_id: light.wled_strip
  command: {"nl":{"on":true,"dur":10,"mode":1,"tbri":64},"v":true}

:small_blue_diamond: This enables Nightlight for 10 minutes with fade, like &NL=10.
:small_blue_diamond: The "v": true" flag returns the full WLED state, including nl.rem — the remaining duration in seconds.

More details and examples:
:link: WLED Live View Proxy for Home Assistant