summarylogtreecommitdiffstats
path: root/homeassistant-scanner.sh
blob: b4a40b5e7400fb45f35b7a0664db8c62ec016c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/bash

echo "Starting..."
echo "Device: ${device}"
echo "Scanner: ${scanner}"
echo "Server: ${server}"

while [ true ]
do
pidof "$scanner"
status="$?"

if [ $status -eq 0 ]
then
hass-cli --server ${server} state turn_on ${device}
fi

sleep 5

done