Skip to content

Instantly share code, notes, and snippets.

@brianhanifin
Last active January 18, 2020 04:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianhanifin/2943a65501c32732e6e7e17aebd3f63e to your computer and use it in GitHub Desktop.
Save brianhanifin/2943a65501c32732e6e7e17aebd3f63e to your computer and use it in GitHub Desktop.
HASS-CLI Snippets
hass-cli --columns=ENTITY="entity_id,state,attributes[duration],attributes[remaining]" --no-headers --table-format tsv state list ^timer \
| grep active \
| sed -e 's/timer.//g' \
| sed -e 's/\<active\>//g' \
| sed -e 's/\t/,/g' \
| sed -e 's/,,/,/g' \
| sed -e 's/ //g' \
www/data/active_timers_snapshot.csv
| sed -e 's/\<active\>//g' | sed -e 's/\t/,/g'
hass-cli --columns=ENTITY="entity_id,state,attributes[duration],attributes[remaining]" --no-headers --table-format tsv state list ^timer \
| grep active \
| sed -e 's/\<active\>//g' \
| sed -e 's/timer.//g' \
| sed -e 's/\t/,/g' \
| sed -e 's/,,/,/g' \
| sed -e 's/ //g' \
www/data/active_timers_snapshot.csv
hass-cli --columns=ENTITY="entity_id,state,attributes[duration],attributes[remaining]" --no-headers --table-format tsv state list ^timer | grep active | sed -e 's/\<active\>//g' | sed -e 's/timer.//g' | sed -e 's/\t/,/g' | sed -e 's/,,/,/g' | sed -e 's/ //g'
hass-cli --columns=ENTITY="entity_id,state,attributes[duration],attributes[remaining]" --no-headers --table-format tsv state list ^timer | grep paused | sed -e 's/\<paused\>//g' | sed -e 's/timer.//g' | sed -e 's/\t/,/g' | sed -e 's/,,/,/g' | sed -e 's/ //g'
hass-cli --columns=ENTITY="entity_id,state,attributes[remaining]" --no-headers --table-format tsv state list ^timer | grep paused | sed -e 's/\<paused\>//g' | sed -e 's/timer.//g' | sed -e 's/\t/,/g' | sed -e 's/,,/,/g' | sed -e 's/ //g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment