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

[Opener] Improvements for continuous mode #120

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

alucar-d
Copy link
Contributor

  • Actually when continuous mode is activated, the opener "lock" control and "locked" sensor shows as "locked". This PR check also continuous mode to determine the lock state
  • Add configuration switch in opener to activate/deactivate continuous mode

@kvj
Copy link
Owner

kvj commented Jan 5, 2023

Hey @alucar-d looks like a nice improvement, but I can't find any API documentation for activate_continuous_mode / deactivate_continuous_mode actions. Could you please add a reference to it?

@alucar-d
Copy link
Contributor Author

Hi @kvj, the documentation for these actions at Nuki API level is in the "lock actions" section. The last two rows on the "opener" column.
These actions are actually mapped in the code for both "bridge_lock_actions" and "web_lock_actions". I just made use of it :)
Thanks for your time!

@sebastianandress
Copy link

For those who don't want to wait for this merge, you can also get the current mode of your Nuki Opener using the rest platform:

sensor:
  - platform: rest
    unique_id: sensor.nuki_mode
    resource: http://[BRIDGE_IP_ADDRESS]:8080/list
    params:
      token: !secret nuki_token
    scan_interval: 20
    name: Nuki Mode
    value_template: "{{ value_json[0].lastKnownState.mode }}"

If the sensor returns a value of 2, continuous mode is inactive, if it is 3 continuous mode is active.
However I'm looking forward to see this built in once this branch is merged!

@GNeras
Copy link
Contributor

GNeras commented Mar 28, 2023

I think this is a good idea. The only issue I have with this is that when continuous mode is enabled, if I try to lock the Opener, it does nothing because the lock action doesn't change the continuous mode. Maybe locking should also disable continuous mode.

@alucar-d
Copy link
Contributor Author

I think this is a good idea. The only issue I have with this is that when continuous mode is enabled, if I try to lock the Opener, it does nothing because the lock action doesn't change the continuous mode. Maybe locking should also disable continuous mode.

It's a good point!
I think that the behavior should be as you said, so I'll try to adjust it.
Thanks for your comment

@alucar-d
Copy link
Contributor Author

alucar-d commented Mar 29, 2023

Updated the behavior. Now when locking an opener it checks if continuos mode is enabled and made an extra call to disable continuos mode before call the lock itself.

@GNeras
Copy link
Contributor

GNeras commented Apr 3, 2023

I tested it and I think it's perfect now 👍

@alucar-d
Copy link
Contributor Author

resolve #161

@tristanXme
Copy link

Tested it and its also working for me. Please merge it.

@kvj kvj merged commit 15fb7df into kvj:main Nov 21, 2023
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.

5 participants