Type float invalid option

Hi, I am new to HA and ESPHome so I hope this isn’t user error. I have a few NodeMCUs working with ESPHome, these are just sensors that send data back to HA. They work fine. I am now trying to add a new device that will take a value as input (0-255) and I want to take that value and pass it from a NodeMCU running ESPHome firmware via SPI to control a device.

I am following the examples for Custom Output (sorry, I can’t include link before I’m a new user).

and when I compile, I get:

INFO Reading configuration /config/esphome/dpot.yaml…
Failed config

light.custom: [source /config/esphome/dpot.yaml:76]
platform: custom

[type] is an invalid option for [light.custom]. Please check the indentation.
type: float [source /config/esphome/dpot.yaml:77]
lambda: |-
auto my_custom_float_output = new MyCustomFloatOutput();
App.register_component(my_custom_float_output);
return {my_custom_float_output};
lights:
- name: dpotstuff

Here is my config:

output:

  • platform: custom
    type: float
    lambda: |-
    auto my_custom_float_output = new MyCustomFloatOutput();
    App.register_component(my_custom_float_output);
    return {my_custom_float_output};

It seems this was an issue someone had before: https://github.com/esphome/issues/issues/50

But I am not sure how to fix this. I am running this in Hass.io on a Raspberry Pi, so I am not exactly sure how to get to esphomeyaml/components/output/custom.py to see if it’s fixed?

I did try to run the dev branch to see if it’s fixed from 1.15.3, but same error.

I don’t need float, since the value I am passing are whole numbers between 0-255, but I am not enough of a programmer to figure out from the example how to make it work. Please help. :slight_smile:

It was supposed to be fixed in Jan 2019, but it still seems to be a problem in 1.15.3?

Okay, it was user error. I am new to ESPHome and the issue was caused by me putting the float type under light, instead of output. So the error message was correct, and when googling it, it brings up an old bug that was already fixed.