Sensor not appearing

I have put this into my configuration.ymal but the sensor doesn’t appear after a full restart of home assistant and i can’t see anything coming up in the logs when i search for it.

Any ideas?

sensor:
  - platform: command_line
    name: "Groceries Spent"
    command: "echo 100.00"
    unit_of_measurement: "USD"

I believe that’s the old formatting. I think the following should work:

command_line:
  - sensor:
      name: "Groceries Spent"
      command: "echo 100.00"
      unit_of_measurement: "USD"

Here you can find some other examples: Command line - Home Assistant

Hope this helps!

1 Like

Brilliant, that was exactly the issue.

1 Like