From c4ddb2308b26fbee88cd7c88fec2c44b8a2ad33a Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Sat, 8 Apr 2023 08:41:14 +0200 Subject: [PATCH] Add VCC sensor for esp8266 not using ADC --- bathroomheater.yaml | 1 + blinds.yaml | 2 +- templates/esp8266-vcc.yaml | 6 ++++++ watermeter.yaml | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 templates/esp8266-vcc.yaml diff --git a/bathroomheater.yaml b/bathroomheater.yaml index 9d3c39c..9ba40fc 100644 --- a/bathroomheater.yaml +++ b/bathroomheater.yaml @@ -10,6 +10,7 @@ esphome: packages: device_base: !include templates/esp8266.yaml + sensor: !include templates/esp8266-vcc.yaml dallas: - pin: D1 diff --git a/blinds.yaml b/blinds.yaml index d890f70..91dfc27 100644 --- a/blinds.yaml +++ b/blinds.yaml @@ -10,7 +10,7 @@ esphome: packages: device_base: !include templates/esp8266.yaml - mqtt: !include templates/mqtt.yaml + sensor: !include templates/esp8266-vcc.yaml globals: - id: somfy_remote_id_base diff --git a/templates/esp8266-vcc.yaml b/templates/esp8266-vcc.yaml new file mode 100644 index 0000000..6ffd5e1 --- /dev/null +++ b/templates/esp8266-vcc.yaml @@ -0,0 +1,6 @@ +# Make sure nothing is connected to the A0 pin. + +sensor: +- platform: adc + pin: VCC + name: "VCC Voltage" diff --git a/watermeter.yaml b/watermeter.yaml index 8a34ba3..ef6d7d5 100644 --- a/watermeter.yaml +++ b/watermeter.yaml @@ -7,6 +7,7 @@ esphome: packages: device_base: !include templates/esp8266.yaml + sensor: !include templates/esp8266-vcc.yaml sensor: - platform: pulse_meter