Proper syntax for testing for entity state integer values in automation?

I’m trying to set up an automation with an if/then that checks for the value of an entity that is natively an integer value but I’m not sure how to specify an integer value in the GUI. I’ve seen a few versions of this in the docs, but I can’t seem to get the correct syntax. See below - what’s the correct way to specify an integer value for my test?

255

Tried that first, and the trace shows the following:

## if/condition/0/entity_id/0
Executed: April 3, 2023 at 6:16:37 AM
Result:
result: false 
state: 255 
wanted_state: '255'

The test isn’t coming through as true, so I’m assuming it’s comparing a string (my entry) to an int (the value of the state)?

You may have to use yaml. It looks like the gui editor only supports strings.

That makes so much sense, thank you. Not sure if that should be logged somewhere as a feature request or not.

I was just doing some research. It should have been fixed for triggers and conditions:

The if part is a condition so I would have thought that PR would have fixed it. But apparently this is still an issue:

You should definitely open a new frontend issue here:

You’re not using card-mod are you?

I just saw this very odd issue, probably not related though.

FYI this seems to be a known issue, as if I edit the config in YAML (which solves the problem) and go back to the UI, I see the following warning:

I’m assuming this shouldn’t be logged as an issue, then.

Templates are not supported in the UI editor.