Automation doesn't work when comparing two values

I want to triggen an input_boolean by comparing two values. But the input_boolean does not change.
Could one of you check this?

- id: '1587296168639'
  alias: Welke container
  trigger:
    platform: template
    value_template: "{{ ( sensor.afvalinfo_gft.attributes.days_until_collection_date.numeric_state  ) > ( sensor.afvalinfo_restafval.attributes.days_until_collection_date.numeric_state ) }}"
  action:
   - service: input_boolean.turn_on
     entity_id: input_boolean.grijze_container
- id: 'grijze_container_uit'
  alias: Welke_container_anders
  trigger:
    platform: template
    value_template: "{{ ( sensor.afvalinfo_gft.attributes.days_until_collection_date.numeric_state  ) < ( sensor.afvalinfo_restafval.attributes.days_until_collection_date.numeric_state ) }}"
  action:
   - service: input_boolean.turn_off
     entity_id: input_boolean.grijze_container

.numeric_state?

Where have you seen that defined and what are you expecting it to do?

I think I have read things wrong. Numeric state can be used with platform :blush: