Eu adicionei um código:
Arquivo configuration.yaml
shell_command: !include shell_commands.yaml
switch:
-
platform: command_line
name: “Zona 1”
command_on: “echo ‘[t001 MUTEON 1]’ | nc -i 1 -w 3 192.168.12.18 5000”
command_off: “echo ‘[t001 MUTEOFF 1]’ | nc -i 1 -w 3 192.168.12.18 5000” -
platform: command_line
name: “Zona 2”
command_on: “echo ‘[t001 MUTEON 2]’ | nc -i 1 -w 3 192.168.12.18 5000”
command_off: “echo ‘[t001 MUTEOFF 2]’ | nc -i 1 -w 3 192.168.12.18 5000” -
platform: command_line
name: “Zona 3”
command_on: “echo ‘[t001 MUTEON 3]’ | nc -i 1 -w 3 192.168.12.18 5000”
command_off: “echo ‘[t001 MUTEOFF 3]’ | nc -i 1 -w 3 192.168.12.18 5000” -
platform: command_line
name: “Zona 4”
command_on: “echo ‘[t001 MUTEON 4]’ | nc -i 1 -w 3 192.168.12.18 5000”
command_off: “echo ‘[t001 MUTEOFF 4]’ | nc -i 1 -w 3 192.168.12.18 5000” -
platform: command_line
name: “Multiroom Power”
command_on: “echo ‘[t001 PWRON]’ | nc -i 1 -w 3 192.168.12.18 5000”
command_off: “echo ‘[t001 PWROFF]’ | nc -i 1 -w 3 192.168.12.18 5000”
Depois criei um arquivo chamado shell_comands.yaml
Comandos zona 1
z1vol00: “echo ‘[t001 VOLSETX 1 0]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol10: “echo ‘[t001 VOLSETX 1 10]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol20: “echo ‘[t001 VOLSETX 1 20]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol30: “echo ‘[t001 VOLSETX 1 30]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol40: “echo ‘[t001 VOLSETX 1 40]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol50: “echo ‘[t001 VOLSETX 1 50]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol60: “echo ‘[t001 VOLSETX 1 60]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol65: “echo ‘[t001 VOLSETX 1 65]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol70: “echo ‘[t001 VOLSETX 1 70]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol75: “echo ‘[t001 VOLSETX 1 75]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol80: “echo ‘[t001 VOLSETX 1 80]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol85: “echo ‘[t001 VOLSETX 1 85]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol90: “echo ‘[t001 VOLSETX 1 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
z1vol99: “echo ‘[t001 VOLSETX 1 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
Comandos zona 2
z2vol00: “echo ‘[t001 VOLSETX 2 0]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol10: “echo ‘[t001 VOLSETX 2 10]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol20: “echo ‘[t001 VOLSETX 2 20]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol30: “echo ‘[t001 VOLSETX 2 30]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol40: “echo ‘[t001 VOLSETX 2 40]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol50: “echo ‘[t001 VOLSETX 2 50]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol60: “echo ‘[t001 VOLSETX 2 60]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol65: “echo ‘[t001 VOLSETX 2 65]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol70: “echo ‘[t001 VOLSETX 2 70]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol75: “echo ‘[t001 VOLSETX 2 75]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol80: “echo ‘[t001 VOLSETX 2 80]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol85: “echo ‘[t001 VOLSETX 2 85]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol90: “echo ‘[t001 VOLSETX 2 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
z2vol99: “echo ‘[t001 VOLSETX 2 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
Comandos zona 3
z3vol00: “echo ‘[t001 VOLSETX 3 0]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol10: “echo ‘[t001 VOLSETX 3 10]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol20: “echo ‘[t001 VOLSETX 3 20]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol30: “echo ‘[t001 VOLSETX 3 30]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol40: “echo ‘[t001 VOLSETX 3 40]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol50: “echo ‘[t001 VOLSETX 3 50]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol60: “echo ‘[t001 VOLSETX 3 60]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol65: “echo ‘[t001 VOLSETX 3 65]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol70: “echo ‘[t001 VOLSETX 3 70]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol75: “echo ‘[t001 VOLSETX 3 75]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol80: “echo ‘[t001 VOLSETX 3 80]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol85: “echo ‘[t001 VOLSETX 3 85]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol90: “echo ‘[t001 VOLSETX 3 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
z3vol99: “echo ‘[t001 VOLSETX 3 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
Comandos zona 4
z4vol00: “echo ‘[t001 VOLSETX 4 0]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol10: “echo ‘[t001 VOLSETX 4 10]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol20: “echo ‘[t001 VOLSETX 4 20]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol30: “echo ‘[t001 VOLSETX 4 30]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol40: “echo ‘[t001 VOLSETX 4 40]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol50: “echo ‘[t001 VOLSETX 4 50]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol60: “echo ‘[t001 VOLSETX 4 60]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol65: “echo ‘[t001 VOLSETX 4 65]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol70: “echo ‘[t001 VOLSETX 4 70]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol75: “echo ‘[t001 VOLSETX 4 75]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol80: “echo ‘[t001 VOLSETX 4 80]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol85: “echo ‘[t001 VOLSETX 4 85]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol90: “echo ‘[t001 VOLSETX 4 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
z4vol99: “echo ‘[t001 VOLSETX 4 87]’ | nc -i 1 -w 3 192.168.12.18 5000”
O HA não me avisou nenhum erro, entretanto, não aparece nenhum dispositivo ou entidade