Appuie decalé sur deux boutons

Bonjour
J’ai créé une carte télécommande pour mon smart ir broadlink

type: horizontal-stack
cards:
  - type: vertical-stack
    cards:
      - type: vertical-stack
        title: LG
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:numeric-1-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '1'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-2-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '2'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-3-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '3'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:numeric-4-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '4'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
                    - background: grey
              - type: custom:button-card
                icon: mdi:numeric-5-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '5'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-6-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '6'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:numeric-7-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '7'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-8-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '8'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-9-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '9'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:cog
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:numeric-0-box
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: '0'
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:power
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: power
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:arrow-down-bold
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: chaine-
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:menu-up
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: monter
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:arrow-up-bold
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: chaine+
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:menu-left
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: gauche
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: ok
                name: Ok
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
              - type: custom:button-card
                icon: mdi:menu-right
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: droite
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:cog
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:menu-down
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:hdmi-port
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: hdmi
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                icon: mdi:volume-minus
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: volume-
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:volume-mute
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: mute
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px
              - type: custom:button-card
                icon: mdi:volume-plus
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command: volume+
                styles:
                  card:
                    - width: 80px
                    - height: 40px
                    - background: grey
                  icon:
                    - width: 20px
                    - height: 20px

Si j’appuie sur le bouton 1 tout fonctionne, cependant, je voudrais faire un bouton qui me permettrait d’appuyer simultanément sur le chiffre un et six par exemple. Comment je peux faire ?

Bonjour,
faut lire la doc :wink:

pour les multi commandes, écris comme telle dans la fenêtre command:

- 1
- 6

exemple en YAML, dans ton automatisation passe en modifier en yaml (3 petit points):

service: remote.send_command
data:
  device: télé
  command:
    - 1
    - 6
  delay_secs: 0.4
target:
  entity_id: remote.rm4_mini

Trop fort :wink:
Merci :slight_smile:

erreur d’espace a command:

              - type: custom:button-card
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    entity_id: remote.broadlink
                    device: tv_lg
                    command:
                      - 1
                      - 6

Franchement TROP FORT HOME ASSISTANT :slight_smile:

@sg72
Ta TV LG est WebOS ?

Si c’est le cas, ta une carte télécommande toute prête.

Non c’est normal;) pas de smart tv

1 « J'aime »

Ta celle la alors, qui gère les codes broadlink. Les codes broadlink ce trouve dans /config/.storage/broadlink_remote_xxxxxxxxxxx_codes.
.storage est un dossier caché, sous windows faut activer afficher les dossiers cachés.

Cliquez sur le bouton Démarrer, puis sélectionnez panneau de configuration > apparence et personnalisation. Sélectionnez Options des dossiers , puis l’onglet Affichage . Sous Paramètres avancés, sélectionnez afficher les fichiers, dossiers et lecteurs cachés , puis cliquez sur OK.

LG remote example:


type: 'custom:generic-remote-control-card'
name: LG Tv
remote_template: simple
buttons:
  power:
    call: remote.send_command
    data:
      entity_id: remote.living_room_remote
      command: "b64:JgBYAAABKpIVEBURFDUWEBQRFBETEhURFDUVNRUQFTUVNRQ2FDUTNxQTExEUEhE3ExQTERMSFRITNRU1FDYUEhI3FDUVNRM3FQAFMwABKEoWAAxMAAEqSBUADQU="


  source:
    call: remote.send_command
    data:
      entity_id: remote.living_room_remote
      command: "b64:JgBYAAABJpMSExEUETgRFBEUERMSExITEjcSOBETEjgROBI4ETgSOBETEjgROBITEhMSEhM3ETgTNxITERMSOBE4EjgREx

Merci WarC0zes j’ai rentré tous les codes IR sur mon HA Via mon Broadlink et tout fonctionne super bien :wink: