Last active
January 18, 2020 04:14
-
-
Save brianhanifin/2943a65501c32732e6e7e17aebd3f63e to your computer and use it in GitHub Desktop.
HASS-CLI Snippets
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
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' |
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
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