2022-05-24 09:42:35 +00:00
|
|
|
esphome:
|
|
|
|
name: pingfuss1
|
|
|
|
platform: ESP8266
|
|
|
|
board: nodemcuv2
|
2024-05-04 13:00:31 +00:00
|
|
|
on_boot:
|
|
|
|
priority: 300
|
|
|
|
then:
|
|
|
|
- output.turn_on: st_led
|
2022-05-24 09:42:35 +00:00
|
|
|
|
|
|
|
# Enable logging
|
|
|
|
logger:
|
|
|
|
|
|
|
|
# Enable Home Assistant API
|
|
|
|
# DISABLED - We currently do not need it for operation. Maybe someday
|
|
|
|
|
|
|
|
# api:
|
2024-05-01 10:33:02 +00:00
|
|
|
# encryption:
|
|
|
|
# key: !secret ttf_key
|
2022-05-24 09:42:35 +00:00
|
|
|
|
|
|
|
ota:
|
2024-05-01 10:33:02 +00:00
|
|
|
password: !secret ttf_password
|
2022-05-24 09:42:35 +00:00
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
|
|
|
fast_connect: true
|
|
|
|
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
mqtt:
|
|
|
|
broker: !secret mqtt_broker_1
|
|
|
|
username: !secret mqtt_broker_1_username
|
|
|
|
password: !secret mqtt_broker_1_password
|
2024-05-04 13:00:31 +00:00
|
|
|
on_connect:
|
|
|
|
then:
|
|
|
|
- output.turn_off: st_led
|
|
|
|
on_disconnect:
|
|
|
|
then:
|
|
|
|
- output.turn_on: st_led
|
|
|
|
|
|
|
|
output:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: D0
|
|
|
|
mode: output
|
|
|
|
inverted: true
|
|
|
|
id: st_led
|
2022-05-24 09:42:35 +00:00
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: D2
|
|
|
|
inverted: true
|
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
|
|
|
id: "Fusstaste_BLAU"
|
|
|
|
internal: true
|
|
|
|
#filters:
|
|
|
|
# - delayed_on: 10ms
|
|
|
|
# - delayed_off: 50ms
|
|
|
|
on_multi_click:
|
|
|
|
- timing:
|
|
|
|
- ON for at most 700ms
|
|
|
|
- OFF for at least 50ms
|
|
|
|
then:
|
|
|
|
- mqtt.publish:
|
|
|
|
topic: tabletenniscounter/control/score/count
|
|
|
|
payload: "1"
|
|
|
|
qos: 2
|
|
|
|
- timing:
|
|
|
|
- ON for at least 1s
|
|
|
|
then:
|
|
|
|
- mqtt.publish:
|
|
|
|
topic: tabletenniscounter/control/score/undo
|
|
|
|
payload: ""
|
|
|
|
qos: 2
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: D3
|
|
|
|
inverted: true
|
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
|
|
|
id: "Fusstaste_ROT"
|
|
|
|
internal: true
|
|
|
|
#filters:
|
|
|
|
# - delayed_on: 10ms
|
|
|
|
# - delayed_off: 50ms
|
|
|
|
on_multi_click:
|
|
|
|
- timing:
|
|
|
|
- ON for at most 700ms
|
|
|
|
- OFF for at least 50ms
|
|
|
|
then:
|
|
|
|
- mqtt.publish:
|
|
|
|
topic: tabletenniscounter/control/score/count
|
|
|
|
payload: "0"
|
|
|
|
qos: 2
|
|
|
|
- timing:
|
|
|
|
- ON for at least 1s
|
|
|
|
then:
|
|
|
|
- mqtt.publish:
|
|
|
|
topic: tabletenniscounter/control/score/undo
|
|
|
|
payload: ""
|
|
|
|
qos: 2
|
|
|
|
|
|
|
|
|
|
|
|
|