I have a variable that is being read in from an attribute on an entity. This particular attribute is a 4 - 8 digit string I need to pass it as a string to a service call that requires it be a string as leading zeros are important for this call since it's setting PIN codes on a lock. Every permutation of rendering the variable into the call as a variable and I get the following error:
Error while executing automation automation.testing: not a string value: 4444 for dictionary value @ data['code']
I've tried forcibly casting to string via | string when reading in the attribute, I've tried forcibly casting to string when using it in the action call. I've even tried using >- and putting the value write on the next line to see if it will fix the problem but none of them seem to be working. Any ideas?
Yes, I've also tried doing my attribute lookup directly inline with the call.
This seems to be an issue only for PINs that do not start with a leading 0 which is most PINs. If the PIN starts with a 0 then everything works as expected.