| @@ -0,0 +1,2 @@ | |||
| 1 | + | shell_command: | |
| 2 | + | unifi_ap_led_update: ssh -o StrictHostKeyChecking=no USERNAME@UNIFI_AP_IP -i ./.ssh/id_ed25519 "sed -i 's/^mgmt\.led_enabled=.*/mgmt\.led_enabled={% if is_state("input_boolean.unifi_ap_led", "on") %}true{% else %}false{% endif %}/' /var/etc/persistent/cfg/mgmt && echo {% if is_state("input_boolean.unifi_ap_led", "on") %}1{% else %}0{% endif %} > /proc/gpio/led_pattern" | |
adridoesthings / Homeassistant Unifi AP Led Configuration
Last active 6 months ago
Toggle your unifi access point led with homeassistant. Create a homeassistant helper (toggle) named input_boolean.unifi_ap_led for example and create an automation that runs this shell script when the state of the helper toggle changes. Place your id_ed25519 key in config/.ssh/id_ed25519.
adridoesthings
revised this gist 2 years ago
·
81b9a5a
1 file changed, 2 insertions