{"id":20081276,"url":"https://github.com/depuits/esphome-abutt","last_synced_at":"2026-02-24T09:34:53.332Z","repository":{"id":47130397,"uuid":"368113870","full_name":"depuits/esphome-AButt","owner":"depuits","description":"Simplefied button sensor for multi clicks in esphome","archived":false,"fork":false,"pushed_at":"2023-01-12T17:47:10.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T12:52:25.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/depuits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-17T08:38:04.000Z","updated_at":"2024-10-24T07:47:23.000Z","dependencies_parsed_at":"2023-02-09T12:50:12.801Z","dependency_job_id":null,"html_url":"https://github.com/depuits/esphome-AButt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/depuits/esphome-AButt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depuits%2Fesphome-AButt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depuits%2Fesphome-AButt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depuits%2Fesphome-AButt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depuits%2Fesphome-AButt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/depuits","download_url":"https://codeload.github.com/depuits/esphome-AButt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depuits%2Fesphome-AButt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T15:34:10.533Z","updated_at":"2026-02-24T09:34:53.306Z","avatar_url":"https://github.com/depuits.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Esphome AButt custom component\n\nCustom component for [esphome](https://esphome.io/) which aims to have a simplified multiclick button component in place of the [binary sensor on multiclick](https://esphome.io/components/binary_sensor/index.html?highlight=binar#binary-sensor-on-multi-click). This implementation uses the [AButt library](https://github.com/depuits/AButt).\n\n## Usage\n\nButton presses are registered as a value change with. The value reporterd is the number of time the butten was clicked in sequence. So a single press will report 1, double click will report 2, tripple click 3 and so on to the maximum defined clicks. When the button is pressed and hold the sensor will report -1 and 0 when it's released again.\n\n### Example\n\n``` YAML\nexternal_components:\n  source: github://depuits/esphome-AButt\n\nsensor:\n  - platform: AButt\n    name: \"Button\"\n    pin:\n      number: GPIO0\n      inverted: True\n      mode: INPUT_PULLUP\n    debounce: 50\n    on_value:\n      then:\n        - if:\n            condition:\n              lambda: 'return x == 1;'\n            then:\n              - light.toggle: wall\n        - if:\n            condition:\n              lambda: 'return x == 2;'\n            then:\n              - light.toggle: ceiling\n\n        # add conditions like you wish\n        # -1 = hold\n        #  0 = release\n        # any other number is the number of presses to the max defined\n\n```\n\n### Options\n\n| Option     | Description                                                                                 | Required | Default value |\n|------------|---------------------------------------------------------------------------------------------|----------|---------------|\n| pin        | Pin conected to the button                                                                  | x        |               |\n| debounce   | Amount of ms before a press is registered                                                   |          | 50            |\n| clickDelay | Ms before a click is registered as a new sequense                                           |          | 500           |\n| holdDelay  | Time before a click is registered as hold                                                   |          | 700           |\n| maxClicks  | Maximum number of clicks in a sequence (after this amount a new sequence is always started) |          | 5             |\n\n\n## Example of same behavior with binary_sensor\n\n``` YAML\nbinary_sensor:\n  - platform: gpio\n    pin:\n      number: GPIO0\n      inverted: True\n    name: \"Button\"\n    on_multi_click:\n    - timing:\n        - ON for at most 1s\n        - OFF for at most 1s\n        - ON for at most 1s\n        - OFF for at least 0.2s\n      then:\n        - logger.log: \"Double Clicked\"\n        - light.toggle: ceiling\n    - timing:\n        - ON for 1s to 2s\n        - OFF for at least 0.5s\n      then:\n        - logger.log: \"Single Long Clicked\"\n    - timing:\n        - ON for at most 1s\n        - OFF for at least 0.5s\n      then:\n        - logger.log: \"Single Short Clicked\"\n        - light.toggle: wall\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepuits%2Fesphome-abutt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdepuits%2Fesphome-abutt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepuits%2Fesphome-abutt/lists"}