How to read sunset-time from a virtual pin and use it in program code

I want to use sunset-time as a variable to make decisions in program code. I read that i can use it for timed notifications, but do not see how to use it in programs, for instance read it from a virtual pin. can anyone give me a clue?

Are you using blynk IOT ?

The simplest way would be to create Sunset automation and send some value to hardware to some data stream. So when you get this value you know it’s sunset - Automations - Blynk Documentation

Tnx, I will try that.

Dear Dimitry,
After your advice I have been looking around in the interface and trying all the possibilities. I did not find the possibility to set triggers like ‘Sunset’. The documentation needs to be more elaborate on this issue! Is there another explanation available?

How can I help you ?

What app do you use?

Well, I cannot find the place in Blynk.Console where i
I can set an Sunset automation on a datastream.

I use the Androic app on a Samsung tablet.

It’s in the app it self, when you open the app you should see automation tab like this

That is strange! I see at the top of my page my devices as blocks. At the bottom of the page only Devices and Notifications, but not the Automations option!

You must enable it first, when you create a datastream there’s advanced settings you will see expose to automation

I did with datastream V5, as rhe screedump shows.

Change the data type to integer

Aha, that does the trick! Cannot I use automations on string variables?

As far as I know it’s not possible to use string in the automation

Anyway, you helped me a lot.
I am still stuck with the second bit of Dimitry’s advice: ‘send some value to hardware to some data stream. So when you get this value you know it’s sunset’.
How do I do that? The only possibilities I get are ‘Send email’ and ‘Send notification (to smartphone)’. I see no option to send something to a datastream.

When you create a new automation you should see this