Example that I use for air quality that has “IF” statements in Sensor. This is what you want I believe.
purpleair_description:
friendly_name: 'PurpleAir AQI Description'
unique_id: purpleair_description
value_template: >
{% set aqi = states('sensor.purpleair_aqi')|float %}
{% if aqi >= 401.0 %}
Very Hazardous
{% elif aqi >= 301.0 %}
Hazardous
{% elif aqi >= 201.0 %}
Very Unhealthy
{% elif aqi >= 151.0 %}
Unhealthy
{% elif aqi >= 101.0 %}
Unhealthy for Sensitive Groups
{% elif aqi >= 51.0 %}
Moderate
{% elif aqi >= 0.0 %}
Good
{% else %}
undefined
{% endif %}
entity_id: sensor.purpleair
availability_template: "{{ sensor.purpleair_available }}"
https://community.home-assistant.io/t/weekday-and-month-sensor/45678/5
‘{% if now().month in (1,) %} January……. {% endif %}’
One possibility is to set a sensor for your Minimum Az
{% set xxx = states('now().month')|float %} # xxx being the variable
{% if xxx = 9}
145
{% if xxx = 10}
168
or make a binary sensor if sensor.sun_azimuth is > AzMin
depends on what you want to do
I don’t know if the now.month starts at zero or one; but for being 0100 for me, that is the answer you get. Well past my bedtime.