From 9dfd3e7dc8b4b0bb8bac90e38dd4bc61f0c230b5 Mon Sep 17 00:00:00 2001 From: Thibault Maekelbergh Date: Wed, 19 Jun 2024 13:45:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20(esphome):=20Fix=20incorrect=20d?= =?UTF-8?q?esk=20controller=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esp8266-desk-controller-bureau-thib.yaml | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/esphome/esp8266-desk-controller-bureau-thib.yaml b/esphome/esp8266-desk-controller-bureau-thib.yaml index 1986af9..94381e0 100644 --- a/esphome/esp8266-desk-controller-bureau-thib.yaml +++ b/esphome/esp8266-desk-controller-bureau-thib.yaml @@ -13,25 +13,24 @@ packages: mqtt: !include ./shared/mqtt.yaml binary_sensor: -# GPIO Pin 16 does not support pullup pin mode. Please choose another pin. - # - platform: gpio - # name: "Button 1" - # internal: true - # pin: - # number: D0 - # mode: INPUT_PULLUP - # inverted: true - # on_press: - # - mqtt.publish: - # topic: "esphome/${device_name}/button" - # payload: "1" - # on_click: - # min_length: 1s - # max_length: 2s - # then: - # - mqtt.publish: - # topic: "esphome/${device_name}/button_hold" - # payload: "1" + - platform: gpio + name: "Button 1" + internal: true + pin: + number: D4 + mode: INPUT_PULLUP + inverted: true + on_press: + - mqtt.publish: + topic: "esphome/${device_name}/button" + payload: "1" + on_click: + min_length: 1s + max_length: 2s + then: + - mqtt.publish: + topic: "esphome/${device_name}/button_hold" + payload: "1" - platform: gpio name: "Button 2" @@ -43,30 +42,30 @@ binary_sensor: on_press: - mqtt.publish: topic: "esphome/${device_name}/button" - payload: "1" + payload: "2" on_click: min_length: 1s max_length: 2s then: - mqtt.publish: topic: "esphome/${device_name}/button_hold" - payload: "1" + payload: "2" - platform: gpio name: "Button 3" internal: true pin: - number: D2 + number: D3 mode: INPUT_PULLUP inverted: true on_press: - mqtt.publish: topic: "esphome/${device_name}/button" - payload: "1" + payload: "3" on_click: min_length: 1s max_length: 2s then: - mqtt.publish: topic: "esphome/${device_name}/button_hold" - payload: "1" + payload: "3"