Instead of [Functionvalue], use this:
{{ round( [Functionvalue] / 10 ) }}
And whats round meaning in this raw cmd? I need 0.1 accurate celsius for my tuya temperature sensor and now if its 23.4 (right now) the virtual device temperature sensor says 23. In this way round means actual round?
Search for Math or mathjs at the forum, to find out about the possibilities.
To avoid numbers like 24.1111111111111111 or similar, I often use the round function.
Indeed, round without options means: round to 0 digits.
When you need it rounded to 1 digit, use
{{ round( [Functionvalue] / 10 ,1 ) }}
Round to 2 digits, use
{{ round( [Functionvalue] / 10 ,2 ) }}
Thank you so much. I was able to make everything and now i learn raw styled flows with tuya devices and seems like every devices working. Made a virtual humidity sensor too from the tuya temp and humidity sensor so thank you again.
You can do that in one flow - and actually also for all devices - or at least - that is what I did.
You create one virtual device that includes battery, temperature and humidity and just validate whatever is in the message. I have over 10 sensors in one advanced flow and it works like a charm.
@Robert_Szilagyi @Vincent_Verbon and others,
To keep all sensors of a device together, you can create just one virtual device with multiple sensors, with an advanced virtual device of the Device Capabilities app
One of many examples:
(Click on the link or the v
symbol)
Hello. Iām very new to the Homey PRO, Iāve only had mine for a week. i try to configure tuya cloud but get error code 2406. i have restarted the app, relinked tuya smart with my tuya cloud develerment. deleted the account and started from scratch. refresh settings but nothing works, what am I doing wrong? Please help me!
2 posts were merged into an existing topic: Trouble configuring Tuya Cloud on Homey PRO 2023
Hello Frida,
Did you read the 1st post of this app thread?
Most apps have their own topic, with FAQ and howtoās, which can be found at the bottom of the homey.app store app page.
And / or use the search function, you could have searched for ā2406ā.
But, as I already found it for you, here you go:
My guess right now: in the app settings, make sure you use the Tuya Smart or SmartLife app account to log in, and use the emailaddress instead of the username; see screenshot
And also, do NOT use your iot.tuya.com login. Thatās only for authenticating to the iot platform site.
I have made a tuya project, linked my tuya app account, set the variables in de homey tuya cloud app but still my devices are not visible within Homey Pro.
All settings are correct as described. Restarted the app and the Homey itself but still no luck. Anyone who can help me out??
Hi Peter and thanks for your reply!
I didnāt know that most apps have their own topic. Thanks. But Iām not getting any wiser about my problem.
Iām still using Tuya Smart, Iāve also tried using SmartLife and my region is correct. The link between App and Cloud seems to work and I have relinked it as many times as possible with no results. My Cloud Project was created a week ago so after May 25, 2021.
I log in with my e-mail address (which is not linked to Facebook, google or the like) and the e-mail address I log in to the app, not the e-mail address I log in to the IoT platform with. I have also selected Use official only on Choose desired API(S). I have uninstalled, deleted and redone both app in phone, in homey and on IoT. I have also removed devices and added them againā¦
I now saw that I have received a message in Homey that āYou are still using the old deprecated API and drivers, please switch to new drivers only.ā
After some googling, I looked up information about API keys. So I made a new one and put it in homeyscript.
I am very grateful for any feedback you can provide!
The message youāre getting is related to this setting probably:
Set it in the app configuration to āuse official onlyā
I know you mentioned you did configure that, but the message youāre receiving indicates using older API.
@Peter_Kawa, maybe Iām not getting your advice exactly as I do have one virtual device with all sensors configured - with the virtual devices app, I didnāt need the device capabilities app for that. How does using āadvanced virtual deviceā have a benefit over that config ?
In the device capabilities I just selected the three values the sensor supports (temp, humidity and battery) and it works.
I see. While Iām not actively using the Virtual Devices app anymore, I was thinking one can use only one capability each VD, my bad!
Iād say just read the Advanced virtual device and device capabilities topics, to discover the possibilities.
YW!
-
I assume youāve read all of post #1 ?
-
What country number did you enter?
- Did you select āTuyaā as well in the dropdown āMobile Appā (below the country number entry)?
Did you find the YT vid in this thread? maybe it helps while you can watch almost all config steps:
- Can you share a screenshot of the app config screen (pls hide personal info)?
Iāll read up on AD anyway, wouldnāt have thought of that without your post :-). , I figured idd that you thought I had a device defined per capability.
Hello again! I canāt figure out what Iām doing wrong. I have watched YT several times, follow all the instructions, still it doesnāt work. Same error code all the time. My Homey PRO, Tuya and devices were purchased less than a month ago. Iām starting to feel really stupidā¦
trying to send a picture of the settings in the Homey app
I forgot, what do you mean by country number? I am central Europe. +46
Ah, that might be it. Only enter 46
in the āTelephone country codeā field (Youāre from Sweden, right?).
And youāre not the only one having a hard time configuring this. Thereās just many things which can go wrong.
Wow!!! Its working!!! Thank you so much!!!