Ampersand in device name causing Tuya device not to be selectable

First of all - hi, and kudos on this awesome service. Absolutely the missing link in the kind of home automation I have come to appreciate over the way-too-many years I’ve been doing it (tech savvy and logic heavy, but not constantly fiddling with things, having to set up Linux machines, etc). I’m enjoying it a lot.

I came to ask a question about why I couldn’t select my temperature and humidity sensor from the Tuya device dropdown in a new condition. It showed up in the Devices screen etc, but whenever I clicked on it in the dropdown… nothing. It just selected the next device in the list. No network calls, no console errors.

But as I was writing the question, it struck me that the ampersand in its name (it was called “Temp & Humidity Sensor”) may be causing the issue. I renamed it to “Temp and Humidity Sensor” in the SmartLife app on my phone, did a Sync in Apilio… and bingo, it started working.

So… Apilio devs, I’m guessing something somewhere needs to be escaped.


Thanks @philsj for your nice feedback and reporting the bug!


You’re quite welcome @pebneter - let me know if I can be of assistance in replicating it, in case you can’t. Happy to send over a screen recording or whatever would be useful. I can definitely imagine that for a sensor like this, a lot of people might use an ampersand in the name.

My Tuya temp sensor is now integrated and working in Apilio. It’s simplified my setup a lot - before I had Switchbot send temp threshold triggers to IFTTT, and then IFTTT set an Apilio variable with a representation of how hot it was (comfortable, uncomfortable, too hot, etc), with logic blocks based on that variable. Quite a lot of stuff to go wrong, especially if a threshold was missed. I’m amazed it worked as well as it did.

One thing, which is fairly inconsequential really but I will mention it, is that this particular sensor (a “Gaoducash” brand) apparently reports the temperature as 10x the actual temp. So when it’s 25.9 deg C, it reports it as 259, so Apilio says that it’s 259 deg C in my living room (it does feel like that some days). Obviously it’s easy to get around, you just multiply your comparators by 10 as well. I have no idea how widespread that is, but perhaps the upcoming mathematical operator feature could be applied to device values as well. That would also allow the temps to be converted to deg F (or Kelvin I suppose).

1 Like

Good point, thanks @philsj . We are aware of that situation, it is actually a missing feature on our side. Tuya does sometimes scale values, and it also reports the scaling factor. But we haven’t yet implemented a function to apply the scaling for in- and output.
It’s on our task list!