Skip to content

Instantly share code, notes, and snippets.

@kelchm
Created April 1, 2023 11:40
Show Gist options
  • Save kelchm/97829acff3e21cc339ea254cbb411a70 to your computer and use it in GitHub Desktop.
Save kelchm/97829acff3e21cc339ea254cbb411a70 to your computer and use it in GitHub Desktop.
hass-cli examples
#!/bin/bash
for i in $(hass-cli entity list "living_room_recessed_lights*" |awk '{print $1}' | grep -v ENTITY_ID)
do
NEW_ID=$(echo $i | sed 's/living_room_recessed_lights/living_room_fireplace_recessed_lights/')
echo "hass-cli entity rename ${i} ${NEW_ID}"
# hass-cli entity rename ${i} ${NEW_ID}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment