Problem with using fractions in ramp rate

Posted on
Wed Dec 18, 2019 4:48 pm
mohaidar offline
User avatar
Posts: 3
Joined: Nov 30, 2019

Problem with using fractions in ramp rate

I noticed a change in the plugin that I wantto ask about. The ramp rate no longer accepts fractions and only integers. I get the following error when using a ramp rate for example of 1.2:

Traceback (most recent call last):
File “plugin.py”, line 1615, in fadeDimmer
ValueError: invalid literal for int() with base 10: ‘1.2’

Is this a limitation with Lutron or new requirement in the plugin?. This was working 2 versions before.

Thank you!

Posted on
Wed Dec 18, 2019 5:13 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Problem with using fractions in ramp rate

I’m assuming you actually mean the fade time field, as it’s not a rate value. That was never supposed to support fractional seconds. The old code just passed the string to the repeater, and I assume it just ignored the decimal portion. At least, the Lutron docs all show an integer value in that field. Did you actually test your values and did it actually do fractional seconds?

I made change back in June to support fade times greater than 60 seconds, and to do that I needed to convert the string to an integer. So a decimal value is going to fail.

If fractional seconds actually do work, I’ll have to change that code again. But the easiest thing would be to just make all your fade times integers.

If fractional seconds are supposed to work, please open an issue on GitHub.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests