Extra keys error

Any ideas where to start looking?

Crikey. That’s not helpful.

Hopefully this is a single platform/component that HA is struggling to identify.

Do you have 19 of one type of component?

Did you solve this yet? Did you search your yaml files for source_entity_id and source_attribute?

I have a similar problem

Your configuration contains extra keys that the platform does not support (but were silently accepted before 0.88). Please find and remove the following.This will become a breaking change.

  • [device].

Absolutely no clue on what is causing this, no line numbers to the config file etc.

Search/grep for device: in your yaml files. Does that find anything?

Only a hide_entity: true in an automation, which is still valid according to the examples in the documentation. https://www.home-assistant.io/docs/automation/examples/

Sorry, I don’t understand. I asked if you can find the string device: in your yaml files and you said you found hide_entity. I don’t get the connection???

You are right, I am an idiot - PEBKAC, I searched for entity: instead of device:. Perhaps I need to wake up more.

Searching for device: finds nothing.

nick@nuccy:/home/homeassistant/.homeassistant$ grep device: *.yaml
nick@nuccy:/home/homeassistant/.homeassistant$

And how about grep -r device: *.yaml? Or do you not have yaml files in sub-directories (like automations, packages, etc.)?

Or do you possibly use “JSON” type configs, like:

abc: {"device": "xyz"}

Maybe just grep for device (without the colon.)

No difference -ie nothing found.

No.

No luck there either.

It is not causing a specific problem, and it may be a false alarm. But on the other hand it may become “breaking”.

So, I checked the code, and there should be warnings in the log with more details. Is it possible you have warnings disabled (by your logger config)?

Maybe try:

grep "contains extra keys" home-assistant.log

Just this one line

2019-02-24 13:55:08 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [device].

Ok, I did a test where I added device: abc to a sensor config. I got this:

Your configuration contains extra keys that the platform does not support.
Please remove [device].  (See /home/xxx/.homeassistant/configuration.yaml, line 28).

And looking at the code again, that last part in the parentheses is not included in all case. Is there config coming from somewhere besides yaml config files??? Discovery??? Somewhere in the .storage folder???

EDIT: That was on the info page. This is what was in home-assistant.log:

2019-02-23 19:28:17 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [device].  (See /home/xxx/.homeassistant/configuration.yaml, line 28). 

Do you use Xiaomi Dafang/Xiaofang camera’s by any chance? In my case the [device]. error comes from these camera’s. Something to do with MQTT topics I believe, but not sure about that.

1 Like

Yes there is quite a bit of mqtt discovery with devices coming in from zigbee2mqtt and from the ailight firmware I have on some bulbs and from dafang camera.

Bingo, that is something we have in common. And that message is coming in the log just as mqtt.cover is set up (this is the mechanism for moving the PTZ aspects of the camera.

Try turning your mqtt server off to see if the error persists. If it doesn’t than it’s surely one of those devices that give the errors (for me only my xiaofang cams give this error, I don’t use zigbee yet).

Turned off the mqtt server and indeed the error has disappeared.

Now to go through the mqtt components to sort this out. I’ll start with dafang seeing we have that in common.

Thanks to you both, especially @pnbruckner without whom I would have given up and put it in the too hard pile. Thunderbird Two to the rescue again.

1 Like

FYI:

The correct command to use grep to search for a string recursing through subfolders is
grep -r device: . *.yaml
If you just use grep -r device: *.yaml it won’t work as expected.

This is since -r takes takes a directory name (or pattern) as its argument.