hass_mifi/run.sh

6 lines
201 B
Bash
Raw Permalink Normal View History

2020-03-07 12:49:38 -05:00
#!/bin/bash
mydir1="${0%/*}"
2020-03-07 13:11:39 -05:00
python="/opt/hass_3.7/bin/python"
2020-03-07 12:49:38 -05:00
2020-03-07 13:11:39 -05:00
"${python}" "${mydir1}/getPage.py" | grep 'id="statusBar_battery" style="">' | grep -o -P '.{0,3}%.{0,0}' | sed 's/>//g' | sed 's/%//g'