Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command Line changes in 2023.6 #102

Closed
BeardedTinker opened this issue Jun 9, 2023 · 1 comment
Closed

Command Line changes in 2023.6 #102

BeardedTinker opened this issue Jun 9, 2023 · 1 comment
Assignees
Labels
Breaking change Error introduced by new version of HA

Comments

@BeardedTinker
Copy link
Owner

BeardedTinker commented Jun 9, 2023

June release has brought change to how command_line integration is configured in YAML files.
This required change to how code looks and how files are set
Due to my split configuration, I've added folder command_line and subfolders for switch, sensor and binary_sensor, as only those are currently used in my setup.

Code is easy to change.
Old:

platform: command_line
command: /bin/bash -c "(echo > /dev/tcp/192.168.1.35/1883) > /dev/null 2>&1 && echo open || echo closed"
name: MQTT status
payload_off: "closed"
payload_on: "open"
scan_interval: 300
device_class: 'problem'

Is now:

binary_sensor:
#  platform: command_line
  name: MQTT status
  unique_id: 44b85908-2738-4b54-8ded-fb6314c06c5b
  command: /bin/bash -c "(echo > /dev/tcp/192.168.1.35/1883) > /dev/null 2>&1 && echo open || echo closed"
  payload_off: "closed"
  payload_on: "open"
  scan_interval: 300
  device_class: 'problem'

And it all is called within integrations folder like this:

command_line: !include_dir_merge_list ../entities/command_line

Note that it has to use inclide_dir_merged_list.

@BeardedTinker BeardedTinker added the Breaking change Error introduced by new version of HA label Jun 9, 2023
@BeardedTinker BeardedTinker self-assigned this Jun 9, 2023
@BeardedTinker
Copy link
Owner Author

Fixed and everything is working great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change Error introduced by new version of HA
Projects
None yet
Development

No branches or pull requests

1 participant