Unable to figure out what this error refer to

Hi.
My log file is full of this error repeatedly appearing. I have not a clue as to what component or settings this refer to. Any help will be highly appreciated.

2018-10-01 13:36:38 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 312, in async_update_ha_state
self.entity_id, state, attr, self.force_update, self._context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 903, in async_set
context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 668, in init
“Format should be .<object_id>”).format(entity_id))
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: light… Format should be .<object_id>
2018-10-01 13:36:44 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 312, in async_update_ha_state
self.entity_id, state, attr, self.force_update, self._context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 903, in async_set
context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 668, in init
“Format should be .<object_id>”).format(entity_id))
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: light… Format should be .<object_id>
2018-10-01 13:36:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 312, in async_update_ha_state
self.entity_id, state, attr, self.force_update, self._context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 903, in async_set
context)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py”, line 668, in init
“Format should be .<object_id>”).format(entity_id))
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: light… Format should be .<object_id>

Thanks in advance

It looks like you have incorrectly specified the entity ID off at least one of your lights

Instead of light.some_name you have light .
Or it looks that way to HA for some reason. Post the most recent code you were working on here. Especially if it included light entities.

Thanks Tom for looking into this.
I have not defined any ‘light’ component. All lights are controlled by switches or smart plugs and only friendly names are with ‘light’.
The error posted is the latest one.
As pointed out I need to figure out which part of my config HA is treating as light. I will continue to look for it.

Then for some reason HA thinks one of your friendly names (that has ‘light’ in the name) is a place where where you should be using an entity_id.

Posting the most recently updated part of your configuration might help us to locate the problem.

The following is the config in switches.yaml where I have used the word ‘light’.

  • platform: broadlink
    host: 192.168.1.13
    mac: “B4:43:0D:C5:5F:84”
    friendly_name: “KV Bed Light”
    type: sp3

  • platform: broadlink
    host: 192.168.1.39
    mac: “34:EA:34:E3:EE:01”
    friendly_name: “Suja Bed Light”
    type: sp3

TP_Link Brand

  • platform: tplink
    host: 192.168.1.11
    name: “Master Bedside Light 1”
    mac: “50:C7:BF:06:80:75”
    type: HS100

  • platform: tplink
    host: 192.168.1.10
    name: “Master Bedside Light 2”
    mac: “50:C7:BF:2B:42:79”
    type: HS105

  • platform: tplink
    host: 192.168.1.27
    name: “Porch Light”
    mac: “70:4F:57:04:EC:F3”
    type: HS200

  • platform: tplink
    host: 192.168.1.28
    name: “StairCase Light”
    mac: “70:4F:57:04:ED:BD”
    type: HS200

I’m wondering why the log file error does not give a hint where it is finding the light entity without proper entity_id, which would have made it easier to get any syntax error, if any.

Could you please edit your post and format the code segments as per the blue banner at the top of the page?

#Broadlink Brand
  • platform: broadlink
    host: 192.168.1.13
    mac: “B4:43:0D:C5:5F:84”
    friendly_name: “KV Bed Light”
    type: sp3

  • platform: broadlink
    host: 192.168.1.39
    mac: “34:EA:34:E3:EE:01”
    friendly_name: “Suja Bed Light”
    type: sp3

TP_Link Brand

  • platform: tplink
    host: 192.168.1.11
    name: “Master Bedside Light 1”
    mac: “50:C7:BF:06:80:75”
    type: HS100

  • platform: tplink
    host: 192.168.1.10
    name: “Master Bedside Light 2”
    mac: “50:C7:BF:2B:42:79”
    type: HS105

  • platform: tplink
    host: 192.168.1.27
    name: “Porch Light”
    mac: “70:4F:57:04:EC:F3”
    type: HS200

  • platform: tplink
    host: 192.168.1.28
    name: “StairCase Light”
    mac: “70:4F:57:04:ED:BD”
    type: HS200

Here you go. Hope this helps.

Hi…

Could some one give me a clue where I can look for the entity_id which could be wrong as the error message says. Some where like device registry etc…?

The Developer states panel, in the lower left hand menu, it looks like “<>”. It lists all your entities.

Your code is still not formatted correctly for the forum.

Hi… Sorry about the format. Since it was the first time, I tried using </> but somehow it did not work for me. Need to learn the trick :hushed:

By the way, I figured out what’s the problem and got it fixed.

For reference, I would like to mention it here.

All I did was to go to this file core_entity_registry in the .storage folder under .homeassistant and found one json entry with ‘lights.’ an incomplete entity_id. I just removed the whole json set from the file and the error disappeared with that. Not only that the restart took only 3 mins after this, while it was over 10-12 mins when the error was there.

Thanks tom_I for trying to help me out of this.