From b6d3129332ce43196856c76b59eca68cb69e9b53 Mon Sep 17 00:00:00 2001 From: leonardo Date: Sun, 2 Nov 2025 15:47:55 +0100 Subject: [PATCH] Add piano-terra --- piano-terra | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 piano-terra diff --git a/piano-terra b/piano-terra new file mode 100644 index 0000000..45ab50b --- /dev/null +++ b/piano-terra @@ -0,0 +1,77 @@ +esphome: + name: sensori-soggiorno + friendly_name: Sensori Soggiorno + +esp32: + board: esp32dev + framework: + type: arduino + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "xxxxxxxxxxxxxxxx" + +ota: + - platform: esphome + password: "xxxxxxxxxxxxxxxx" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Sensori-Soggiorno" + password: "JBO3b6Ct3BH6" + +captive_portal: + +i2c: + sda: 21 + scl: 22 + +button: + - platform: restart + name: "Riavvio ESP32 soggiorno" + +sensor: + - platform: dht + pin: 18 + temperature: + name: "Temperatura Soggiorno" + humidity: + name: "Umidità Soggiorno" + update_interval: 15s + + - platform: adc + pin: 33 + name: "Luminosità" + id: lightin + update_interval: 5s + attenuation: auto + unit_of_measurement: "%" + icon: "mdi:brightness-5" + filters: + - calibrate_linear: + - 2.40000 -> 100 + - 0.07500 -> 0 + +switch: + - platform: gpio + pin: 14 + name: "LED 2" + icon: "mdi:led-on" + - platform: gpio + pin: 27 + name: "LED 1" + icon: "mdi:led-on" + - platform: gpio + pin: 13 + name: "Pin Test" + icon: "mdi:test-tube" + +