Automation Timer

I have a doubt with this. It is working perfect.
Turn on at the configured time and turn off at the configured time.
My question is … What happens if at the moment of activating I do not have internet?
For what I believe will not do more the query because it asks if it is equal to the configured time.
They come up with something to add to this since I do not have much knowledge.
I guess I can ask that if it’s> = current time and it’s off there I activated the switch

Thank you very much and sorry for my English

# Accion para Timer 1
- alias: 'Accion ON Luz Acuario'
    platform: template
    value_template: '{{ states.sensor.time.state == states.sensor.timer_1_tiempo_on_long.state }}'
    - service: switch.turn_on
      entity_id: switch.habitacion_2
- alias: 'Accion OFF Luz Acuario'
    platform: template
    value_template: '{{ states.sensor.time.state == states.sensor.timer_1_tiempo_off_long.state }}'
    - service: switch.turn_off
      entity_id: switch.habitacion_2    

The internal clock of your server will still run, even without internet. So this would still work.

Thanks for the reply. I can think of two things that could happen is that the raspberry was not working for lack of electricity…
Another thing that can happen is that you set the time and this time during the turn-on time. It’s just going to work next day.

I’m still testing code
I have a slider to set the power on time and the power off time.

Slider ON 12pm
Slider OFF 20pm
Switch light OFF
Current hour 16pm.

I move the slider in the ignition range and it does not change the state of the switch

If I move the slider to 17pm and then to 12pm, turn on the switch.

Can you think of what the problem may be?

Template  {{ states.sensor.time.state >= states.sensor.timer_1_tiempo_off_long.state }}'