Constants and comparing values

zigpy recently made a change to the values of args and params in the event.data, and I cannot figure out how to fix my automation blueprint to compare the new values.

This is a relevant snippet taken from an Automation Trace of what args used to look like after pressing the dim up button on my zigbee dimmer switch:

command: move
args: '[0, 255]'

This is what args look like now after pressing the dim up button:

command: move
args: '[<MoveMode.Up: 0>, 255]'

This is my comparison that is no longer working:

"{{ 254 if args == [0,255] else 1 }}"

Now that args equals “[<MoveMode.Up: 0>, 255]” instead of “[0,255]”, my comparison to “0” does not return true.
How do I match the 0 or the “MoveMode.Up” constant?

I found my issue. I was not aware that variables in a blueprint are strings and not objects.

I know its been awhile since you posted, but I am having the same issue with the args for the Ikea 4 button switch. Hoping you can help.

I have all buttons working except long press down. In developer tools events I get

endpoint_id: 1
  cluster_id: 8
  command: move
  args:
    - 1
    - 83
    - 0
    - 0

But in the trace it shows:

command: move
cluster_id: 8
endpoint_id: 1
args: '[<MoveMode.Down: 1>, 83, <bitmap8.0: 0>, <bitmap8.0: 0>]'

In the long press up I was able to quote out moveMode.up and it works.

Also If I buld these as individual automations they all work as planned. Just in my blueprint it is messed up.