Using state attribute number values in Automation

Is there a way to use number values of attributes in Automations in the Visual Editor?
Or do i have to switch to Yaml for those conditions?
For example i want a warning 2 days ahead for the trash pickup. If i enter that in the Visual Editor:
It will format the 2 to ‘2’

condition: state
entity_id: sensor.meerlanden_gft
state: '2'
attribute: Days_until

I have to change that in yaml to:

condition: state
entity_id: sensor.meerlanden_gft
state: 1
attribute: Days_until

And if i try to switch back to the visual editor i get this error:

Visual editor is not supported for this configuration
The provided value for 'state' is not supported by the visual editor. We support (string) but received (0).
You can still edit your config in YAML.

Is there another way todo this besides editing in Yaml or is there a future fix for this?

If it is a number the condition type needs to be a ‘Numeric State’.

Thanks… i feel stupid now.

No problem. We’ve all been there! :sweat_smile: