i added some shell_command in my configuration.yaml, but got an duplicated mapping key error? but there is no duplicate?
it occours at fourth line …token and url are definitey different…?
what make me more confuse: when commenting the lines, the error stays?
is there a limit in naming shell commands or what is the problem?
when uncommenting any of the other lines, but 2 uncommented, then it ok without error, but at the moment i uncommen any third line, error comesback?
is thee a limit of 2?
line are very long, with token und url?
ok problem seems something older… the first 7 lines are existing for 2-3 years?
sry i had started posting first picture instead of code as the “indicator —^” was not placed in same position when posting as code, so i did all following pictures ´same way… later i realized the correct column is shown in first line
thanx your mentioned quotation marks solved the newly added lines , but the first 2 existing shell commands are showing errors anyway? i see this backups had stopped working with latest HASSIO update from 2025.09…=>2026.1.0; seems the quotation marks surround the date is a problem since then?
also the double slash are irritating me, is that correct? but it did worked since last update?
bad indentation of a mapping entry (3:77)
#shell_command.yaml
# Backup logs and append a version number if one already exists.
backup_logs: "cp /config/home-assistant.log /config/log_backup//log-`date +"%Y%m%d%H%M"`.log"
backup_logs1: "cp /config/home-assistant.log.1 /config/log_backup/log-`date +"%Y%m%d%H%M"`.log.1"
thanx tom,
weird that it worked for that longe time?
corrected and working code…
# Backup logs and append a version number if one already exists.
backup_logs: "cp /config/home-assistant.log /config/log_backup//log-'date +'%Y%m%d%H%M''.log"
backup_logs1: "cp /config/home-assistant.log.1 /config/log_backup/log-'date +'%Y%m%d%H%M''.log.1"