I am trying to add a SSD1306 OLED Display to my project, but adding the sample configuration produces an error on the lambda line (line# 65). I don’t grok lambda; what am I missing here?
EDIT: Because it is on the last line of the YAML file, I did not see the error message. I am missing a font file? What do I put here? Is there a default font?
substitutions:
display_name: temperature-1
esphome:
name: ${display_name}
platform: ESP8266
board: d1_mini
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
ota:
safe_mode: True
wifi:
ssid: "Kwinnet"
password: !secret wifi_password
fast_connect: true
#-----------------------------
dallas:
- pin: D3
update_interval: 5s
sensor:
# WiFi Signal sensor.
- platform: wifi_signal
name: ${display_name} WiFi Signal
update_interval: 60s
#Dallas DS18B20 Temperature sensor
- platform: dallas
address: 0x67020D9246E81C28
name: ${display_name} Temperature
unit_of_measurement: '°F'
filters:
- lambda: return x * (9.0/5.0) + 32.0;
#Blink the LED_BUILTIN if there's a problem, on otherwise.
status_led:
pin:
number: D4 #GPIO2, LED_BUILTIN
inverted: True
# Example configuration entry
i2c:
sda: D1
scl: D2
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
reset_pin: D0
address: 0x3C
lambda: |-
it.print(0, 0, id(font), "Hello World!");