Here's the thread at the Home Assistant community forum, in the 'Scripts' sub-forum:
community.home-assistant.io
It's a BASH shell script that runs on the Home Assistant system.
It uses a Wemos D1 Mini with a BH1750 ambient light sensor in ESPHome to know WHEN to switch.
A Home Assistant 'automation' triggers the BASH script to run.
Worst part of this setup is the cameras.dat text file, and it's not so difficult, just tedious.
If anyone knows how to extract camera info from Blue Iris programmatically, I'd be keen to learn.
Enjoy...

Dahua cameras - switch between Day and Night video profiles
Rather than using the ‘sun’ integration with ‘sunrise’ and ‘sunset’ events, or trying to offset these events by some fixed amount, I use an ESPHome sensor built from a Wemos D1 Mini (ESP8266) and a BH1750 ambient light sensor. This sensor is located in a window on the south side of my home...

It's a BASH shell script that runs on the Home Assistant system.
It uses a Wemos D1 Mini with a BH1750 ambient light sensor in ESPHome to know WHEN to switch.
A Home Assistant 'automation' triggers the BASH script to run.
Worst part of this setup is the cameras.dat text file, and it's not so difficult, just tedious.
If anyone knows how to extract camera info from Blue Iris programmatically, I'd be keen to learn.
Enjoy...