home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
428 stars 63 forks source link

Add option to bulk rename entities via regex #407

Open malorezzanzo64 opened 1 year ago

malorezzanzo64 commented 1 year ago

I'm currently using this simple script to do it:

!/bin/bash

for entity in $(hass-cli --no-headers --columns="ENTITY=entity_id" entity list $1) do hass-cli entity rename $entity ${entity//$2/$3} done

But having a command directly in hass-cli would be better