AND condition in template

I want to use an AND condition in a entity_picture template but this returns an error. Am I missing some quotes or similar?

entity_picture_template: >-
  {% if states.sensor.washing_machine_power.state | float >= 1 %} and {% if is state("sun.sun", "above_horizon") %}
    /local/washing-machine_on.png
    entity_picture_template: >
      {% if states.sensor.washing_machine_power.state | float >= 1 and is_state("sun.sun", "above_horizon") %}
        /local/washing-machine_on.png

You’ll need an ‘else’ too.

1 Like

sorry I didn´t copy that part in… I also have this in the template

  {% else %}
    /local/washing-machine_off.png
  {% endif %}
1 Like