Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insteon: $kpl->level returns off or on, not the actual percentage, but $lamp->level works #494

Closed
marcmerlin opened this issue Apr 1, 2015 · 3 comments

Comments

@marcmerlin
Copy link
Collaborator

Status request on a KPL dimmer does return the correct percentage, but then it gets lost and changed to off or on depending on the percentage.

This device:
INSTEON_KEYPADLINC, 0E.07.49:01, fmr_kpl, All_Lights|fmr_all # v2.0 keypadlinc dimmer dual band

status request returns:
[Insteon::BaseObject] $fmr_kpl::set_receive(19%, $PLM)

But printing from code fails, although printing a linked lamplinc shows the percentage
print $fmr_kpl->state." | ";
print $fmr_kpl->level." | ";
print $fmr_lamp->level." | ";
returns:
off | 100 | 19

@spencerryan
Copy link

spencerryan commented Nov 18, 2016

My Perl is rusty, but in Lighting.pm inside package Insteon::KeyPadLinc there is logic to only get dimming values on group 01 (which is the local load). Unfortunately the parent class SUPER inheritance/override isn't working correctly and is calling the wrong function (one that does not support dimming).

Replace this line:
return $self->SUPER::derive_link_state($p_state);
With this:
return $self->Insteon::DimmableLight::derive_link_state($p_state);

Which will correctly return on level, and let you properly use on_fast and off_fast if you so desire.

@marcmerlin
Copy link
Collaborator Author

thanks, that's helpful

marcmerlin added a commit to marcmerlin/misterhouse that referenced this issue Jul 5, 2017
As per hollie#494 , it wasn't
working, but calling DimmableLight::derive_link_state directly, works.
@marcmerlin
Copy link
Collaborator Author

Thanks @spencerryan , tested and merged. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants