Currently having a bit of an issue with compiling code / configuration file for a simple colour change LED strip.
I’m using the FastLED library + ESPHome (to which i’m new to) + a dallas I²C temperature sensor.
I can get all working independently but not together. I have some basic experience with ESPHome but as I’m new to it, I don’t understand enough to troubleshoot it myself.
What I would like help with is if someone could point out where I’m going wrong with the code I’ve written.
I’m trying to get the WS2812 strip to change to some colour as temperature changes - at this stage all I want to do is to see it change rather than change to any specific colour.
As I understand you can do so with writing lambdas (C++, I haven’t done any since the university days so its been a while!), but I keep getting an error saying that ESPHome can’t read my temperature sensor as it hasn’t been imported into ESPHome - See below
The following is my config (using an ESP-01 module):
esphome: name: led_ring platform: ESP8266 board: esp01_1m wifi: ssid: "" password: "" ap: ssid: "" password: "" captive_portal: logger: api: password: "" ota: password: "" dallas: - pin: GPIO2 update_interval: 4s sensor: - platform: dallas address: 0xE73C01B556F75828 name: "Probe Temperature" - platform: homeassistant name: "Probe Temperature" entity_id: sensor.probe_temperature light: - platform: fastled_clockless id: my_light chipset: WS2812 pin: GPIO0 num_leds: 92 rgb_order: GRB name: "FastLED WS2812 Light" effects: - addressable_random_twinkle: - addressable_fireworks: - addressable_flicker: - lambda: name: My Custom Effect update_interval: 1s lambda: |- static int state = 0; auto call = id(my_light).turn_on(); call.set_transition_length(500); call.set_rgb(0.8, 1.0, (return id(sensor.probe_temperature).state/45.0)); call.perform();