esphome / esphome-core

🚨 No longer used 🚨 - The C++ framework behind ESPHome
https://esphome.io/
GNU General Public License v3.0
545 stars 113 forks source link

Error in HA since 0.86 #491

Closed escoand closed 5 years ago

escoand commented 5 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.): Hass.io 0.87

ESP (ESP32/ESP8266/Board/Sonoff): ESP8266

Affected component:

Description of problem: Since update to HA 0.86 (or maybe 0.87) I got the following errors in HA log. The entity is therefore not recognized in HA. Don't know if this is ESPhome related or a problem of HA.

Problem-relevant YAML-configuration entries:

esphomeyaml:
  name: licht_sofa
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pwd
  fast_connect: true
  manual_ip:
    static_ip: 192.168.1.40
    gateway: 192.168.1.1
    subnet: 255.255.255.0

#api:
mqtt:
  broker: 192.168.1.45

logger:

ota:

status_led:
  pin: GPIO4

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO14
      mode: INPUT_PULLUP
      inverted: True
    id: button
    on_press:
      then:
        - light.toggle:
            id: light

light:
  - platform: binary
    name: Sofa
    id: light
    output: relay

output:
  - platform: gpio
    pin: GPIO5
    id: relay
  # needed for button to work
  - platform: gpio
    pin: GPIO12
    id: pull_down

Traceback (if applicable):

Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'flash': True, 'name': 'Sofa', 'platform': 'mqtt', 'state_topic': 'licht_sofa/light/sofa/state', 'command_topic': 'licht_sofa/light/sofa/command', 'availability_topic': 'licht_sofa/status', 'unique_id': 'ESPlightsofa', 'device': {'identifiers': '2c3ae82f5a1d', 'name': 'licht_sofa', 'sw_version': 'esphomelib v1.10.1 Feb 10 2019, 22:36:05', 'model': 'PLATFORMIO_ESP01_1M', 'manufacturer': 'espressif'}, 'schema': 'json'},)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/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/local/lib/python3.6/site-packages/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']

Additional information: I've other ESPhome devices (Wemos D1 mini but without light) without this problems.

brandond commented 5 years ago

This is fixed in dev by https://github.com/esphome/esphome-core/pull/478