Created
March 10, 2023 02:35
-
-
Save USA-RedDragon/e32c57f51e902438f495432aeb43c7f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: esphome-web-547a8a | |
friendly_name: Weather Node | |
esp8266: | |
board: nodemcuv2 | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
key: "haha" | |
ota: | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "WeatherNode" | |
password: "haha" | |
captive_portal: | |
i2c: | |
sda: D6 | |
scl: D5 | |
as3935_i2c: | |
irq_pin: D2 | |
indoor: False | |
spike_rejection: 2 | |
watchdog_threshold: 1 | |
mqtt: | |
broker: 192.168.1.256 | |
username: weather-esphome | |
password: !secret mqtt_password | |
will_message: null | |
birth_message: null | |
discovery: false | |
log_topic: null | |
time: | |
- platform: sntp | |
on_time: | |
- cron: '/3 * * * * *' | |
then: | |
- if: | |
condition: | |
lambda: return true; | |
then: | |
- mqtt.publish_json: | |
topic: weather-esphome/lightning | |
payload: |- | |
root["energy"] = id(lightning_energy).state; | |
root["distance"] = id(lightning_distance).state; | |
root["presence"] = id(lightning_presence).state; | |
- cron: '/3 * * * * *' | |
then: | |
- if: | |
condition: | |
lambda: return true; | |
then: | |
- mqtt.publish_json: | |
topic: weather-esphome/weather | |
payload: |- | |
root["temperature"] = id(temperature).state; | |
root["pressure"] = id(pressure).state; | |
- cron: '/3 * * * * *' | |
then: | |
- if: | |
condition: | |
lambda: return true; | |
then: | |
- mqtt.publish_json: | |
topic: weather-esphome/light | |
payload: |- | |
root["visible"] = id(visible).state; | |
root["ir"] = id(ir).state; | |
root["full_spectrum"] = id(full_spectrum).state; | |
root["lux"] = id(lux).state; | |
root["gain"] = id(gain).state; | |
sensor: | |
- platform: as3935 | |
lightning_energy: | |
name: "Lightning Energy" | |
id: lightning_energy | |
internal: true | |
distance: | |
id: lightning_distance | |
name: "Lightning Distance" | |
internal: true | |
- platform: bmp3xx | |
temperature: | |
id: temperature | |
name: "Outside BMP Temperature" | |
oversampling: 16x | |
internal: true | |
pressure: | |
id: pressure | |
name: "Outside Pressure" | |
internal: true | |
iir_filter: 4x | |
update_interval: 2s | |
- platform: tsl2591 | |
update_interval: 2s | |
integration_time: 600ms | |
gain: auto | |
device_factor: 53 | |
glass_attenuation_factor: 7.7 | |
visible: | |
id: visible | |
name: "Outside Visible Light" | |
internal: true | |
infrared: | |
id: ir | |
name: "Outside Infrared Light" | |
internal: true | |
full_spectrum: | |
id: full_spectrum | |
name: "Outside Full Spectrum Light" | |
internal: true | |
calculated_lux: | |
id: lux | |
name: "Outside Lux" | |
internal: true | |
actual_gain: | |
id: gain | |
internal: true | |
name: "TSL2591 Actual Gain" | |
binary_sensor: | |
- platform: as3935 | |
id: lightning_presence | |
internal: true | |
name: "Lightning" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment