sbryfcz / harmony-card

A Home Assistant Lovelace Care for Harmony Integration
MIT License
104 stars 12 forks source link

Feature: Buttons linked to a activities #51

Closed poudenes closed 3 years ago

poudenes commented 3 years ago

Hi There,

Nice AddOn!!!

Would be nice to link all the buttons to different activities , like example below:

activities:
  - name: Kodi
    device: Kodi
  - name: AppleTV
    device: AppleTV

buttons:
  default:
    a:
      icon: 'mdi:chevron-up'
      device: Device1
      command: VolumeUp
    b:
      icon: 'mdi:chevron-down'
      device: Device1
      command: VolumeDown

  Kodi:
    a:
      icon: 'mdi:chevron-up'
      device: Device1
      command: VolumeUp
    b:
      icon: 'mdi:chevron-down'
      device: Device1
      command: VolumeDown

  AppleTV:
    a:
      icon: 'mdi:chevron-up'
      device: Device2
      command: VolumeUp
    b:
      icon: 'mdi:chevron-down'
      device: Device2
      command: VolumeDown

So when activity "Kodi" is active, then use the buttons: button>Kodi. When other activity is active then use the buttons that belong to the activity. When there is no specific button config then always use default

Cheers

N1c093 commented 3 years ago

Do you mean, that you want to change the buttons based on the current/active activity?

This is already possible. In the following example I change the buttons "a" & "b" if the activity "Fernsehen" is active.

Example:


activities:
  - name: Fernsehen
    volume_device: Sony TV
    device: Sony TV
    hide_keyPad: false
    buttons:
      a:
        color: null
        command: ChannelDown
        device: Sony TV
        hide: false
        icon: 'mdi:chevron-down'
      b:
        color: null
        command: ChannelUp
        device: Sony TV
        hide: false
        icon: 'mdi:chevron-up'
werfpsa commented 3 years ago

It works for all the buttons. You can hide them for the current activity. I would like to hide all buttons for activity 'PowerOff'. It works well, except for the volume bar (volume_down, volume_up, volume_mute). Would be great if this can be fixed.

N1c093 commented 3 years ago

@werfpsa For me it's working fine to hide all buttons for "PowerOff". Can you create a new issue with your config? I think it would be better to have a new issue for it so we don't mix two topics in one issue.

github-actions[bot] commented 3 years ago

This issue is being marked as stale due to lack of activity