Skip to content

Very quick button presses only register on device but not in Home Assistant #57

@markusressel

Description

@markusressel

Hey there,
very cool product!

I noticed that when trying to adjust the brightness of a light using a button on the LocalDeck, pressing the button for a very short amount of time lead to the expected pulse animation on the button, but no resulting change in the brightness of the light. While the hardware did register the event and played the animation, the binary_sensor on the Home Assistant side stayed "off" the whole time.

I found this post: https://www.facebook.com/groups/HomeAssistant/posts/4227071614230843/
which suggest that this is a "batching" mechanism of the native ESPHome API, which by default debounces state changes within a 100ms time window.

This can be disabled using the following YAML:

api:
  # fixes very brief button presses only registering on-device but not within Home Assistant
  batch_delay: 0ms

See: https://esphome.io/components/api/#configuration-variables

I would recommend to add this to the ESPHome YAML Template for the LocalDeck, because it not only makes the device respond much faster (feels much snappier), but it also doesn't drop inputs that are indicated as "detected" by the pulse animation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions