Homey Community Forum

Unable to dim light to calculated value

#1

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?

#2

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

#3

How I can round it?

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

#4

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

Thanks for advice.

1 Like
#5

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.

#6

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:

#7

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

#8

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

#9

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

#10

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:

#11

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.

#12

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

#13

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