I have a command line sensor that calls a python script that reads from an energy meter. It works great and has for over a year… however, every startup I get this error:
[homeassistant.components.sensor] Error while setting up command_line platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/command_line/sensor.py", line 66, in async_setup_platform
name: str = sensor_config[CONF_NAME]
~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
It happens immediately in the logs on startup with no other errors. Here’s the command line sensor in my config file:
Do I have something misconfigured? I have been over the docs several times and I can’t figure out what is wrong. Like I said though - other than this error, the sensor works as expected and has for like a year - I am just trying to clean up my config as much as possible.
since the last HA Update to 2023.12.1 I am getting the same error at every startup.
I have two command line sensors that read the CPU Temperature of another 2 Raspberry Pi´s in my Home. (I´m new to HA, but they have been running fine for a week until the Update was installed)
But now all I`m getting is this Error Message:
ERROR (MainThread) [homeassistant.components.sensor] Error while setting up command_line platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/command_line/sensor.py", line 66, in async_setup_platform
name: str = sensor_config[CONF_NAME]
~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable