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

logicalBlindPosition wrong when opposite=true #39

Open
MRobi1 opened this issue Sep 17, 2020 · 1 comment
Open

logicalBlindPosition wrong when opposite=true #39

MRobi1 opened this issue Sep 17, 2020 · 1 comment

Comments

@MRobi1
Copy link

MRobi1 commented Sep 17, 2020

When 0 is closed is selected and opposite=true, the logical blind position still shows as if opposite=false.

Example:
payload.blindPosition = 80
payload.logicalBlindPosition = 20

The node itself displays 20% when it really should be 80%.

Not sure why this happens, I see in the code
blinds[i].logicalBlindPosition = blinds[i].blindPosition;
So to me they should show the same %

@joxta
Copy link

joxta commented Apr 13, 2021

I think logicalBlindPosition might be deliberatly set as a non-reversed value, as it miught be used internally.
I didn't want to mess around too much, but if you want to fix the value shown in node-red, change lines 1135 and 1136 to use blindPosition rather than logicalBlindPosition:

    shape: blinds[channel].blindPosition == 100 ? "dot" : "ring",
    text: blinds[channel].blindPosition + "%"

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