Unable to dim light to calculated value

Hi,

I’m trying to dim the light to thew value depends on environment luminosity. The flow doesn’t work and show error.
Firmware 2.0.5

Does any body know what it could be?

IMG_0311

Dim value van only be 2 decimals, so you’ll have to round them

How I can round it?

It looks so dummy for modern systems that device can’t round it on his own.

OK, I found the way but I really can’t imagine why the device driver can’t do that.

Thanks for advice.

1 Like

You’ll have to send athom a support request for that as it is a build in capability of homey we developers can’t do anything about, and Athom doesn’t read along with this forum.

Care to share how you achieved this? I’ve got a topic on that I want this exact thing, i just dont know how to achieve it :smiley:

{{round((1000 - variable)/10)/100}}

Or {{round((1000-variable)/1000,2)}}

I’ve tried it doesn’t work for me. The result is always rounded to integer.

Can u show us ur round code?
Because this works here:

chrome_2019-04-05_17-29-36
And plz check for any spaces that don’t belong there :wink:

Sorry, looks like it was my mistake, now it is working. Probably I’ve made a mistake yesterday. Their editor has a bugs so it’s hard to edit formulas.

By the way, do you know where I can find the list of all functions supported by the Homey logic?

I just posted a comment here how I dim the lighting to lux value
klik hier