-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bash-script to combine all yaml-files created by create_ha_sensor…
…s.py, add min_cell_voltage and max_cell_voltage to telemetry feedback and home assistant telemetry sensor creation, adjusted suggested_display_precision for min_pack_voltage and max_pack_voltage to 2
- Loading branch information
1 parent
69a2b18
commit ca3e6b4
Showing
3 changed files
with
83 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# This script concatenates YAML files starting with 'telemetry' into a single file. | ||
|
||
# Define the output file | ||
combined_telemetry="combined_telemetry.yaml" | ||
combined_telesignalization="combined_telesignalization.yaml" | ||
|
||
# Check if the output file already exists | ||
if [ -f "$combined_telemetry" ]; then | ||
echo "$combined_telemetry already exists. Removing it." | ||
rm "$combined_telemetry" | ||
fi | ||
|
||
# Check if the output file already exists | ||
if [ -f "$combined_telesignalization" ]; then | ||
echo "$combined_telesignalization already exists. Removing it." | ||
rm "$combined_telesignalization" | ||
fi | ||
|
||
# Loop through all yaml files starting with 'telemetry' and append them to the output file | ||
for file in telemetry*.yaml; do | ||
if [ -f "$file" ]; then | ||
echo "Appending $file to $combined_telemetry" | ||
cat "$file" >> "$combined_telemetry" | ||
# Add a newline to separate files | ||
echo "" >> "$combined_telemetry" | ||
fi | ||
done | ||
|
||
echo "Telemetry files have been concatenated into $combined_telemetry" | ||
|
||
# Loop through all yaml files starting with 'telemetry' and append them to the output file | ||
for file in telesignalization*.yaml; do | ||
if [ -f "$file" ]; then | ||
echo "Appending $file to $combined_telesignalization" | ||
cat "$file" >> "$combined_telesignalization" | ||
# Add a newline to separate files | ||
echo "" >> "$combined_telesignalization" | ||
fi | ||
done | ||
|
||
echo "Telesignalization files have been concatenated into $combined_telesignalization" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters