thanks for sharing, i added script to macOS Control Center - MCC with little modification
Night Shift Toggle Script
use framework "CoreBrightness"
property cOBJ : a reference to current application's CBBlueLightClient's alloc's init
if ( item 2 of item 2 of (cOBJ's getBlueLightStatus:( reference )) as boolean ) then
cOBJ's setEnabled:(1 = 0)
else
cOBJ's setStrength:0.5 commit: true -- Change this for tempeture between 0 and 1
cOBJ's setEnabled:(0 = 0)
end if