You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like the issue is in local function procmessages.lua: process_message(topic, msg)
in this block, the numvalue is capped at 100 before the check for dimmermax by the line
if numvalue > 100 then; numvalue = 100; end
which comes before the check for dimmermax
elseif dtype == 'Dimmer' then
local numvalue = tonumber(value)
if numvalue then
log.debug ('Dimmer value received:', numvalue)
if numvalue < 0 then; numvalue = 0; end
if numvalue > 100 then; numvalue = 100; end
if device.preferences.dimmermax then
if numvalue > device.preferences.dimmermax then
numvalue = device.preferences.dimmermax
end
end
device:emit_event(capabilities.switchLevel.level(numvalue))
if device:supports_capability_by_id('switch') then
if numvalue > 0 then
device:emit_event(capabilities.switch.switch('on'))
else
device:emit_event(capabilities.switch.switch('off'))
end
end
The text was updated successfully, but these errors were encountered:
Looks like the issue is in local function procmessages.lua: process_message(topic, msg)
in this block, the numvalue is capped at 100 before the check for dimmermax by the line
if numvalue > 100 then; numvalue = 100; end
which comes before the check for dimmermax
The text was updated successfully, but these errors were encountered: