Created
July 16, 2021 15:55
-
-
Save niecore/fe81f7b7660d3f44c21a0bcd7eb3fab8 to your computer and use it in GitHub Desktop.
homeassistant command line switch with usbrelay
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
switch: | |
- platform: command_line | |
switches: | |
switch_name: | |
command_on: "usbrelay RELAY_1=1" | |
command_off: "usbrelay RELAY_1=0" | |
command_state: "usbrelay | grep -i 'RELAY_1' | grep -E -i '=1'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment