joleys / niko-home-control-II

Home Assistant Custom Integration for Niko Home Control II
MIT License
74 stars 21 forks source link

Trigger on long-hold or multiple switch presses? #99

Closed SeBsZ closed 10 months ago

SeBsZ commented 10 months ago

Hi, thanks for your work on this integration. I'm wondering if it is possible to set up automations to trigger not just when a Niko switch is pressed, but also when the switch is held down longer for example. This way I could trigger dim actions for the hue bulbs etc.

I have configured my Niko switches to switch on/off a virtual flag. I can then use your integration to monitor changes to this virtual flag and trigger actions. This works perfectly, but I would like to know if long-presses are supported somehow?

Thanks again

tijsverkoyen commented 10 months ago

This is not possible. Niko does not expose the actual switches, only the actions.

Well, they expose them, but there are no "events" triggered on these devices as far as I know. So we don't see presses/long presses.

SeBsZ commented 10 months ago

Too bad, thanks for your reply

user152306 commented 9 months ago

In addition, please send an email to Niko with a feature request that you want to be able to do actions with long-press, shortpress and maybe even hold-action for the same button. This would be great for us since we then can use that in HA based on different virtual devices in Niko per function. I have sent in a request like this to support but they didn't really act on it, so if more ppl do it it can maybe help. Or if someone has a contact in Niko development, please take this to them. As I see it, it would open up a new world for API-users where we suddenly can add one or two extra functions per button (long+hold) in our house without impacting the original function (short) of the button.

user152306 commented 9 months ago

@SeBsZ there is one thing I have seen in the Niko docs that gives you a little "extra functionality" on a button, maybe this can help your use case in the meantime; https://guide.niko.eu/display/NHCIPE/Using+one+push+button+for+creating+more+than+2+different+scenes

SeBsZ commented 9 months ago

Thanks, this is basically what I'm emulating now in Home Assistant. I can push a button x times to "scroll" through different modes. Usually I use this in my children's bedrooms:

Push 1: light 100% Push 2: light 30% Push 3: light off Push 4: repeat