ESPHome example updated to include LED control and read VBUS voltage

This commit is contained in:
Josh 2024-07-01 21:51:57 +12:00
parent bc99b181f7
commit 5cb557720e

View File

@ -10,10 +10,10 @@
# Enable Home Assistant API
api:
encryption:
key: "u1qvnGLD6JjRQGNodaYXFFXSPxe7N+3wSKcwurJPhCM="
key: "c1uNv/dyYPAkygiSdfpmM2UlQzi1B9xElFm3sKEeEFc=" #EXAMPLE KEY GENERATE YOUR OWN
ota:
password: "07b9f5a01b7f15d6523941ddf8f4b3fc"
password: "PASSWORD"
wifi:
ssid: !secret wifi_ssid
@ -69,6 +69,13 @@ output:
- platform: gpio
pin: GPIO47
id: CFG3_pin
- platform: ledc
pin: GPIO10
id: LED1_PIN
- platform: ledc
pin: GPIO12
id: LED2_PIN
# Define binary input sensor for power_good and push button
@ -183,4 +190,24 @@ sensor:
magnitude:
name: Magnitude
status:
name: Status
name: Status
#Read VBUS voltage (could be used to debug PD voltage etc)
- platform: adc
pin: GPIO4
name: "VBUS Voltage"
update_interval: 10s
attenuation: 11dB
filters:
- multiply: 8.47742
light:
- platform: monochromatic
output: LED1_PIN
id: LED1
name: "LED 1"
- platform: monochromatic
output: LED2_PIN
id: LED2
name: "LED 2"