I excluded this part:
Restarted, no errors.
But before these errors took place not every restart - so I need more restarts, more statistics.
Does it guarantee that the 1st condition will be checked first?
Seems that this entity
variable relates to the sensor (sensor.daylight_savings_times
in your example).
And this code checks THIS sensor.
Is there any meaning to check if THIS sensor exists in the code which customizing THIS sensor?
Also, how to check OTHER sensors - like input_numbers
from my case?