bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
383 stars 90 forks source link

Command Line Sensor is moving #466

Closed prolife86 closed 1 year ago

prolife86 commented 1 year ago

Before you submit a new bug report, please check that

Describe the bug

HA Is changing its Command Line sensors, see warning:

Command Line YAML configuration has moved
This stops working in version 2023.8.0. Please address before upgrading.
Configuring Command Line sensor using YAML has moved.

Consult the documentation to move your YAML configuration to integration key and restart Home Assistant to fix this issue.

Also see: Should be something like: https://community.home-assistant.io/t/configuring-command-line-sesor-using-yaml-has-moved-consult-the-documentation-to-move-your-yaml-configuration-to-integration-key-and-restart-home-assistant-to-fix-this-issue/579429/26

I solved it by: -removing this from configuration.yaml:

# Oud Papier Sensor
  - platform: command_line
    name: Import Garbage Schedule
    unique_id: Oud_Papier_TXT
    command: "sh /share/import_dates.sh"

And at the top including (before "homeassistant:" etc.: command_line: !include command_line.yaml

-creating command_line.yaml entering:

- sensor:
     name: "Import Garbage Schedule"
     command: "sh /share/import_dates.sh"
     unique_id: Oud_Papier_TXT

Now the error message is gone and the command line integration seems to be working.

Configuration

Old in configuration.yaml:

# Oud Papier Sensor
  - platform: command_line
    name: Import Garbage Schedule
    unique_id: Oud_Papier_TXT
    command: "sh /share/import_dates.sh"

New in configuration.yaml: command_line: !include command_line.yaml

New in command_line.yaml:

- sensor:
     name: "Import Garbage Schedule"
     command: "sh /share/import_dates.sh"
     unique_id: Oud_Papier_TXT

Debug logs

N/A
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity in last 30 days. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.