Hey guys,
i’m having problems including the mcp3008 adc in my code. I want to use the mcp to read data from 2 analog moisture sensors and showing it on home assistant. Rest like supersonic sensor and dht22 works like a charm. Hope you can help me to fix the issue.
Flashing stops with “ERROR” and WARNING Components “mqtt_mqttsensorcomponent_8” were never registered.
esphome:
name: controller
platform: ESP8266
board: nodemcuv2
text_sensor:
- platform: version
name: Version of Controller
- platform: wifi_info
ip_address:
name: Controller
mcp3008:
cs_pin: D8
sensor:
- platform: mcp3008
update_interval: 1s
id: moisture
number: 0
- platform: adc
id: moisture_sensor
sensor: moisture
- lambda: |-
if (x > 0.7) {
return 0;
} else if (x < 0.26) {
return 100;
} else {
return (0.7-x) / (0.7-0.26) * 100.0;
}