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

Blinds percentage use lastlevel when closing #1603

Merged
merged 5 commits into from Jun 9, 2017

Conversation

jvandenbroek
Copy link
Contributor

Changed blinds percentage logic again after input from #1591:

  • Now sending 'Close' it actually sends the "Set Level" command if last level was > 0 && < 100
  • When changing level to 0 (Off) or 100 (On) the commands Off and On respectively will be send instead of "Set Level"

This means that the status won't show 'Closed' unless closed for 100%, I believe this is correct. Hopefully both #1591 and http://www.domoticz.com/forum/viewtopic.php?f=6&t=17654 will be solved now.

@jvandenbroek
Copy link
Contributor Author

Someone objects to the new behavior and I do think we need to discuss a little about what would be the best behavior before merging. I think it's better and more predictable to always use the last set level. With virtual devices / scripting you can always force to fully close the blinds (set level 100 = send On command) despite the previous level.

See https://www.domoticz.com/forum/viewtopic.php?p=137617#p137617 for comments.

@gizmocuz
Copy link
Contributor

gizmocuz commented Jun 9, 2017

Could you undo all code formatting ? I can not see what has changed now
Should there also not be a change in the dashboard code ?

@gizmocuz
Copy link
Contributor

gizmocuz commented Jun 9, 2017

If possible, please make it so Open/Close buttons will always do 0/100%

@jvandenbroek
Copy link
Contributor Author

jvandenbroek commented Jun 9, 2017

I've reverted much:

  • Undo formatting
  • Close will set level 100 and send the On command
  • Open will set level to 0 and send the Off command
  • Setting level > 0 < 100 will set the close icon (open when inverted)
  • Scheduler sends level + 1, this gets subtracted in function SwitchLightInt (scheduling was always setting 1 percent lower)
  • Updated dashboard and lightscontroller, simplified logic

Unfortunately now we can't check for the last level setting, so almost everything is as it was before, with some small additions and fixes. I'll just use a uservariable for setting/getting the last level...

BTW I think the + 1 level should also be used for dimmers, but I only wanted to change the blinds logic with this PR.

@gizmocuz gizmocuz merged commit d6d1b29 into domoticz:master Jun 9, 2017
@gizmocuz
Copy link
Contributor

gizmocuz commented Jun 9, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants