Hi All,
I’m new to Home Assistant and I’m seeking advice on the below topic.
I’m using the Nanoleaf integration with my Elements, and I get the swipe_up, down, left, right events as expected. I’ve seen that the Nanoleaf integration gets the events using the aionanoleaf package.
In the source of that it is visible that it could recognize single tap and dual tap events as well:
aionanoleaf/aionanoleaf /events.py
I’m wondering, if I could enable this on my Home Assistant Green by making a custom version of the Nanoleaf integration by copying it to custom_components
and modifying the below file to include them in TOUCH_GESTURE_TRIGGER_MAP
? Or is that not enough, would anything else be needed? Did anyone try to catch these events?
homeassistant/components/nanoleaf/const.py
I would modify it to this:
TOUCH_GESTURE_TRIGGER_MAP = {
0: "single_tap",
1: "double_tap",
2: "swipe_up",
3: "swipe_down",
4: "swipe_left",
5: "swipe_right",
}