Sonoff spamming log: Task exception was never retrieved

Hi there,

After restarting my hassio, I get this message a lot (spamming my log):

2018-11-06 23:19:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/mqtt.py", line 68, in async_discover_sensor
    config = PLATFORM_SCHEMA(discovery_payload)
  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: value is not allowed for dictionary value @ data['device_class']

When I turn on and off my sonoff tasmota switch, the message does no longer spam my log.

Here is my config:

- platform: mqtt
  name: "Light"
  state_topic: "stat/sonoff/POWER"
  command_topic: "cmnd/sonoff/POWER"
  availability_topic: "tele/sonoff/LWT"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: true

Is this a know issue or is my config wrong?
Anyway to fix this (without having to turn on and off my light at start)

I also saw, that for some people this was fixed with 0.78.2:

But since I’m running 0.82.0b2 I don’t think that this is fixed…

Thank you for testing the beta :wink:

Try a stable version like 0.81.6

I have these a lot too. It’s the first post that appears to identify the root cause as Sonoff related (at least?)
I’m on 0.81.6 and still get these, been having them since 0.66 so would be nice to know how to stop them :slight_smile:

The issue was also present in 0.81.6 and I hoped it’s maybe gone in the beta…

Does it work, if you turn them on and off one time? Is the issue gone then?

To be honest I’ve not tried. if I get the time I will and then report back.