```
substitutions: devicename: d1-004 id_name: d1-004 Device_Location: DATA1-LINUS-LUCY-Temperature update_interval: !secret d1-update_interval ipaddress: 10.0.0.114 unique_id: "d1-004" deep_sleep_interval: !secret deep_sleep_interval
logger: level: DEBUG
esp8266: board: nodemcuv2
esphome: name: d1-004 friendly_name: "d1-004 - Temperatures"
wifi: ssid: !secret mogwai_wifi_name password: !secret mogwai_wifi_password <<: !include common/network.yaml
# Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "$devicename Fallback Hotspot" password: !secret mogwai_ap_key
api: encryption: key: !secret mogwai_api_key
ota: platform: esphome password: !secret mogwai_ota_key
captive_portal:
time: - platform: homeassistant id: homeassistant_time
<<: !include common/website.yaml
switch:
-
<<: !include common/d1-led-onboard1.yaml
-
<<: !include common/d1-led-onboard2.yaml
-
<<: !include common/restart.yaml
<<: !include common/nodemcu-led-onboard-both-mqtt.yaml
interval:
- <<: !include common/version-interval.yaml
one_wire:
Individual sensors
sensor:
- platform: ina226
i2c_id: bus_a
address: 0x40 # Default hardware address for most breakout boards
shunt_resistance: 0.1 ohm # Change this if your board has a different shunt resistor
max_current: 3.2A # Helps ESPHome optimize internal calibration registers
update_interval: 10s # Frequency of updates to Home Assistant
current:
name: "INA226 Current"
power:
name: "INA226 Power"
bus_voltage:
name: "INA226 Bus Voltage"
filters:
# Maps raw incorrect values -> known multimeter real values
- calibrate_linear:
- 0.0 -> 0.0
- 12.63 -> 11.99
shunt_voltage:
name: "INA226 Shunt Voltage"
- <<: !include common/free_space.yaml
text_sensor:
- <<: !include common/version.yaml
<<: !include common/external-heapmon.yaml
Example configuration entry for ESP8266
i2c: sda: GPIO4 scl: GPIO5 scan: true
id: bus_a frequency: 400Mhz```