@whp my answer was wrong. But maybe it could be possible but it seems the timer counts upwards from 0 to a value, so that doesnt do what you want.
Seeing that you also use sunset times, it makes it more complex for me the work something out.
I was thinking of 2 things and this would make the most sense;
using a bash script to calculate time differences, this will only work if the times never change and you need to figure out how to parse the sunset times of pimatic, which should be doable via extracting it through a variable and the API. Which would then allow you to setup a shellsensor with the command sudo calculate.sh 17:10 18:00 which would output 00:50, which then would be displayed on your pimatic page and can be updated every minute so it counts down in minutes.
If you want, i can try some things out but before i put time into it, let me know if you are willing to use bash to do this. Let me know asap