I have a VSN1 module and would like to have a button be red when it's on, and green when it's off.
if self:button_state() == 127 then
led_color(self:element_index(), 1, 255, 0, 0)
else
led_color(self:element_index(), 1, 0, 255, 0)
end
led_value(self:element_index(), 1, 255)What am I doing wrong here? Does this API just not work on VSN1?
I've also removed the simple color action just so there aren't conflicts. The code also doesn't work using the element API either:
element[self:element_index()]:led_color(1, 255, 0, 0)Results in error.
