Template Controle NET Claro

Meu primeiro post aqui, espero ter ajudado alguém

2 Likes

#Configuration YAML - Substituir XXXXXXXXXX pelo nome do seu dispositivo no MQTT
mqtt:
switch:

Aparelho NET Cabo

- name: "Net_Cabo on-off"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A48B7"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A48B7"}'

- name: "Net_Cabo Volume+"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0x20DF40BF"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0x20DF40BF"}'

- name: "Net_Cabo Volume-"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0x20DFC03F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0x20DFC03F"}'

- name: "Net_Cabo Mudo"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0x20DF906F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0x20DF906F"}'

- name: "Net_Cabo Canal+"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A08F7"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A08F7"}'

- name: "Net_Cabo Canal-"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A58A7"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A58A7"}'

- name: "Net_Cabo Voltar"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A8877"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A8877"}'

- name: "Net_Cabo 1"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A807F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A807F"}'

- name: "Net_Cabo 2"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A40BF"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A40BF"}'

- name: "Net_Cabo 3"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AC03F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AC03F"}'

- name: "Net_Cabo 4"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"  
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A20DF"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A20DF"}'

- name: "Net_Cabo 5"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AA05F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AA05F"}'

- name: "Net_Cabo 6"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A609F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A609F"}'

- name: "Net_Cabo 7"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AE01F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AE01F"}'

- name: "Net_Cabo 8"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A10EF"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A10EF"}'

- name: "Net_Cabo 9"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A906F"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A906F"}'

- name: "Net_Cabo 0"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A00FF"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17A00FF"}'

- name: "Net_Cabo Favorito"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AB847"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AB847"}'

- name: "Net_Cabo Menu"   
  command_topic: "cmnd/XXXXXXXXXX/Irsend"
  payload_on: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AC43B"}'
  payload_off: '{"Protocol":"NEC","Bits":32,"Data":"0xE17AC43B"}'
3 Likes
    # CARD:
type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:power
        icon_height: 50px
        entity: switch.net_cabo_on_off
  - type: horizontal-stack
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:volume-plus
        icon_height: 50px
        entity: switch.net_cabo_volume
        name: Volume +
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.net_cabo_mudo
        icon: mdi:volume-off
        name: Mudo
        icon_height: 30px
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.net_cabo_canal
        icon: mdi:chevron-up-box
        name: Canal +
        icon_height: 50px
  - type: horizontal-stack
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.net_cabo_volume_2
        icon: mdi:volume-minus
        icon_height: 50px
        name: Volume -
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.net_cabo_voltar
        icon: mdi:arrow-u-left-top-bold
        name: Voltar
        icon_height: 30px
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.net_cabo_canal_2
        name: Canal -
        icon: mdi:chevron-down-box
        icon_height: 50px
  - type: horizontal-stack
    cards:
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-1-box
        icon_height: 50px
        entity: switch.net_cabo_1
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-2-box
        icon_height: 50px
        entity: switch.net_cabo_2
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-3-box
        icon_height: 50px
        entity: switch.net_cabo_3
  - type: horizontal-stack
    cards:
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-4-box
        icon_height: 50px
        entity: switch.net_cabo_4
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-5-box
        icon_height: 50px
        entity: switch.net_cabo_5
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-6-box
        icon_height: 50px
        entity: switch.net_cabo_6
  - type: horizontal-stack
    cards:
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-7-box
        icon_height: 50px
        entity: switch.net_cabo_7
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-8-box
        icon_height: 50px
        entity: switch.net_cabo_8
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-9-box
        icon_height: 50px
        entity: switch.net_cabo_9
  - type: horizontal-stack
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:rectangle
        name: Favoritos
        icon_height: 40px
        show_state: false
        entity: switch.net_cabo_favorito
      - show_name: false
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:numeric-0-box
        icon_height: 50px
        entity: switch.net_cabo_0
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        icon: mdi:rectangle
        name: Menu
        icon_height: 40px
        entity: switch.net_cabo_menu
2 Likes

Muito bom, parabéns!!!

1 Like

é possivel utilizar esse template com um IR sincronizado pela integração da tuya ?

Não sei, pq não uso o tuya aqui!