Error when setup lights with mqtt discovery

Before i upgrade to 0.87 everything has works as it should.
But after the uprade i got a error message in the log and the all the light entity looks like thsi picture in lovlace
image

Don’t know if is an hass error och esphomeyaml error ?

Using esphomeyaml with mqtt discovery for some nodemcu with the latest version from esphomeyaml.

@OttoWinter any idea ?

2019-02-07 14:34:14 WARNING (MainThread) [homeassistant.components.mqtt.discovery] "platform": "mqtt_json" is deprecated, replace with "schema":"json"
2019-02-07 14:34:14 ERROR (MainThread) [homeassistant.components.mqtt.light] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'flash': True, 'name': 'light_dckw2cjwud', 'platform': 'mqtt', 'state_topic': 'control_3dprinter/light/light_dckw2cjwud/state', 'command_topic': 'control_3dprinter/light/light_dckw2cjwud/command', 'availability_topic': 'control_3dprinter/status', 'unique_id': 'ESPlightlight_dckw2cjwud', 'device': {'identifiers': '5ccf7f033ea5', 'name': 'control_3dprinter', 'sw_version': 'esphomelib v1.10.1 Feb  7 2019, 14:32:35', 'model': 'PLATFORMIO_NODEMCUV2', 'manufacturer': 'espressif'}, 'schema': 'json'},)
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/mqtt/light/__init__.py", line 60, in async_discover
    config = PLATFORM_SCHEMA(discovery_payload)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/validators.py", line 207, in __call__
    return self._exec((Schema(val) for val in self.validators), v)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/validators.py", line 286, in _exec
    raise e if self.msg is None else AllInvalid(self.msg, path=path)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/validators.py", line 282, in _exec
    v = func(v)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 811, in validate_callable
    return schema(data)
  File "/usr/src/app/homeassistant/components/mqtt/light/__init__.py", line 36, in validate_mqtt_light
    return schemas[value[CONF_SCHEMA]](value)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['flash']

flash: True is an invalid config option for mqtt light.
should be

effect: true
effect_list: [flash]

Used to silently fail but after pull 20562 this is now a breaking change.

Would need to be corrected in ESPHomeYaml @OttoWinter

Ahh ok.

Will wait for answer from Otto

/
Andreas

I am having the same issue since upgrading to 0.87.
All my lights (using esphomeyaml) is giving the same error.

Same problem here

Have the same issue.

Does it mean, that all esphomelib-based devices should be upgraded with new code?

For MQTT discovery, potentially.
Though, I moved mine to esphome’s native API and they’re working fine on that.

That’s not cool. Especially for people, using devices, installed in places, that hard to access, or people without access to firmware sources…

If it is indeed still broken in the latest esphome build, you could still manually add the device via configuration.yaml. It’d just be the the Mqtt discovery auto creation that would not be working.

I’m not 100% sure whether this is caused by people using an old version of esphome on the device though.
A recompile and push to device would clarify that.
I was due to update my firmware on my devices anyway so decided to move to API while I was at it.

Also, if a device is installed in a hard to reach place, surely they would have OTA set up as that feature was introduced before Mqtt discovery?..

Honestly, I’m a bit scary to use that OTA feature.
I mean, if it failed - I’ll have a big problem to reach devices, connect it, and flash manually.
So, I prefer do not touch thing, once it works :slight_smile:
Thank you for the hint however, I will try to configure device manually.
And yes, may be it’s time to upgrade ESPhomelib and use API…