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

Add feature to disable/enable buttons by MQTT #1322

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Add feature to disable/enable buttons by MQTT #1322

wants to merge 1 commit into from

Conversation

vtochq
Copy link
Contributor

@vtochq vtochq commented Nov 7, 2018

Added ability to disable/enable buttons by MQTT.

For example it useful when automation enable light on door opening and you trying to turn on light manually. And you touch switch exactly after light turned on by automation and you mistakenly turn off lights.

For example it useful when automation enable light on door opening and you trying to turn on light manually. And you touch switch exactly after light turned on by automation and you mistakenly turn off lights.
@vtochq vtochq changed the title Added ability to disable/enable buttons by MQTT. Add ability to disable/enable buttons by MQTT Nov 9, 2018
@vtochq vtochq changed the title Add ability to disable/enable buttons by MQTT Add feature to disable/enable buttons by MQTT Dec 6, 2018
@vtochq
Copy link
Contributor Author

vtochq commented Dec 6, 2018

Does nobody needs feature for temporary disable buttons?

@mcspr
Copy link
Collaborator

mcspr commented Dec 6, 2018

Wouldn't .../button/0/set be useful to have to "push" the button?
Not really sure how it may be better namespaced though.
.root./button/0/{action,relay,mode}/set , .root./config/button/0/{action,relay,mode}/set ?

There is floodwindow thing implemented for relays (5 switches max over 3 seconds window). Would it make sense to configure that instead? If automation switches relay on, it can block things based on relative time since the last switch just setting switch limit to 1. See RELAY_FLOOD_*. This may be exposed as a setting.

@vtochq
Copy link
Contributor Author

vtochq commented Dec 7, 2018

I don't need set button/relay state. I need feature for temporary disable button actions.

I don't try root./button/0/{action,relay,mode}/set. Is it documented? Maybe it is what I want.
I don't know about floodwindow.
Ok, maybe this solve my problem. I try later. Thanks.

@mcspr
Copy link
Collaborator

mcspr commented Dec 7, 2018

For example it useful when automation enable light on door opening and you trying to turn on light manually.

I meant this part. Isn't the goal to protect relay state from changing too often?

And config topic are just an example, they do not exist yet :) I just wonder if it is worth to use simple /set just for this. And note that you do not disable other button actions, like reset

@mcspr mcspr mentioned this pull request Apr 26, 2019
@26tajeen
Copy link

Is this feature coming?

@mcspr mcspr mentioned this pull request May 11, 2019
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.

3 participants