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

on_click condition never reached with remote_receiver #5765

Open
dbozec opened this issue May 4, 2024 · 1 comment
Open

on_click condition never reached with remote_receiver #5765

dbozec opened this issue May 4, 2024 · 1 comment

Comments

@dbozec
Copy link

dbozec commented May 4, 2024

The problem

When trying to trigger some code on a button click from an IR remote control with the remote_receiver component, it doesn't work with on_click condition.
It works with on_press condition but I'm unable to make it work with on_click or with on_double_click

Which version of ESPHome has the issue?

2023.12.5

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

all

What platform are you using?

ESP32-IDF

Board

esp32doit-espduino

Component causing the issue

IR receiver

Example YAML snippet

switch:
  - platform: gpio
    pin: GPIO13
    name: "Relay"
    id: relay_1

binary_sensor:
  - platform: remote_receiver
    name: "Power"
    samsung:
      data: 0xE0E036C9
      nbits: 32
    on_click:
      then:
        - switch.toggle: relay_1

remote_receiver:
  pin:
    number: GPIO26
    inverted: true
    mode:
      input: true
      pullup: true

Anything in the logs that might be useful for us?

No response

Additional information

In the YAML example, if you replace on_click with on_press it will work

Conversation about this : https://community.home-assistant.io/t/detect-double-click-on-remote-receiver/715255

@dbozec
Copy link
Author

dbozec commented May 5, 2024

It seems that min_length must be configured to less than the default value to make on_click work.
10ms seems to be a good value.
Still I'm unable to make on_double_click work, but it may be a normal behavior ?

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

No branches or pull requests

1 participant