The following is my ESPHOME config for an ESP8266 NodeMCU. The humidity sensor does not show in HomeKit with ESPHOME. It did show back when I configured these with MQTT as demonstrated in the BRUHAutomation video from way back, because I had the “device_class: humidity” entry. Where would that go in this config?
esphome:
name: sensornode1
platform: ESP8266
board: nodemcuv2
wifi:
ssid: 'ssid'
password: 'password'
manual_ip:
static_ip: 10.0.0.20
gateway: 10.0.0.1
subnet: 255.255.255.0
dns1: 10.0.0.1
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Sensornode1 Fallback Hotspot"
password: "AWpCqFATbFHD"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
sensor:
- platform: dht
pin: D7
model: dht22
temperature:
name: 'SenseNode1 Temp'
filters:
- lambda: return x * (9.0/5.0) + 32.0;
unit_of_measurement: °F
humidity:
name: 'SenseNode1 Humidity'
update_interval: 30s
- platform: adc
pin: A0
name: "SenseNode1 LUX"
unit_of_measurement: lux
filters:
- lambda: return (x / 10000.0) * 2000000.0;
binary_sensor:
- platform: gpio
pin: D6
name: 'SenseNode1 Motion'
device_class: motion
output:
- platform: esp8266_pwm
pin: D1
id: redgpio
- platform: esp8266_pwm
pin: D2
id: greengpio
- platform: esp8266_pwm
pin: D3
id: bluegpio
light:
- platform: rgb
name: 'SenseNode1 LED'
red: redgpio
green: greengpio
blue: bluegpio