esphome / esphome/feature-requests

Expose binary sensor press/release/click/double_click/etc automations as HA events

Open
#467 4 comments 0 reactions 0 assignees View on GitHub
component: binary_sensor
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
I would like to be able to use different types of clicks as automation triggers in HA

**Please describe your use case for this integration and alternatives you've tried:**
The HA Xiaomi Binary Sensor integration exposes button click details. The switches will all fire xiaomi_aqara.click events with a click_type field that can be used to determine the type of the button press - long_click_press, long_click_release, hold, single, double for single switches; or single, double, long, both, double_both, long_both for double-switch devices.

I would like to use similar functionality for ESPHome binary sensors, preferably without having to manually configure each individual click_type as a binary sensor automation. Since I am a MQTT user, I would like this to be supported for both connectivity types (MQTT and API).

**Additional context**
https://www.home-assistant.io/integrations/binary_sensor.xiaomi_aqara/
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/xiaomi_aqara/binary_sensor.py#L430

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.