made script not use functions and instead execute by itself
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
light() {
|
||||
local entity="light.$1"
|
||||
#!/bin/bash
|
||||
source ~/sh/ha/.env
|
||||
entity="light.$1"
|
||||
|
||||
if [[ $2 == "on" ]]; then
|
||||
curl -X POST \
|
||||
@@ -22,4 +23,3 @@ light() {
|
||||
-d "{\"entity_id\":\"$entity\",\"brightness_pct\":$2}" \
|
||||
"$HA_URL/api/services/light/turn_on"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user