Night mode ,Http Post

Is it possible to switch Night Mode On or Off through HTTP Post? (e.g. with Macrodroid)
After all, you want to activate it when you go to bed. Not at, let’s say 21 h., and you have visitors over.
If not (which would be quite odd considering all other possibilities) please add this option.