Created
April 1, 2023 11:40
-
-
Save kelchm/97829acff3e21cc339ea254cbb411a70 to your computer and use it in GitHub Desktop.
hass-cli examples
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
#!/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