usernein / tv-card

📺 TV Remote Card (with touchpad and haptic feedback)
Apache License 2.0
107 stars 26 forks source link

Multiple TV-card Settings affect each other #12

Closed wang3356 closed 2 years ago

wang3356 commented 2 years ago
type: custom:tv-card
entity: remote.zhi_neng_yao_kong_remote
title: ONKYO
power_row:
  - power
volume_row: buttons
source_row:
  - tv
  - box
  - bluetooth
custom_keys:
  power:
    icon: mdi:power
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: power
      device: ONKYO
  volume_up:
    icon: mdi:volume-plus
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: volume+
      device: ONKYO
  volume_down:
    icon: mdi:volume-minus
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: volume-
      device: ONKYO
  volume_mute:
    icon: mdi:volume-mute
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: mute
      device: ONKYO
  tv:
    icon: mdi:television-box
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: TV
      device: ONKYO
  box:
    icon: mdi:disc-player
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: STRMBOX
      device: ONKYO
  bluetooth:
    icon: mdi:bluetooth-connect
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: BLUETOOTH
      device: ONKYO

image

type: custom:tv-card
entity: remote.zhi_neng_yao_kong_remote
title: 机顶盒
power_row:
  - power
channel_row:
  - menu
  - set
  - home
  - back
volume_row: buttons
navigation_row: buttons
source_row:
  - sports
  - children
  - news
  - movie
custom_keys:
  power:
    icon: mdi:power
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: power
      device: dianxin
  menu:
    icon: mdi:menu
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: menu
      device: dianxin
  set:
    icon: mdi:cog-outline
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: set
      device: dianxin
  home:
    icon: mdi:home
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: home
      device: dianxin
  back:
    icon: mdi:keyboard-return
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: back
      device: dianxin
  volume_up:
    icon: mdi:volume-plus
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: volume+
      device: dianxin
  volume_down:
    icon: mdi:volume-minus
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: volume-
      device: dianxin
  volume_mute:
    icon: mdi:volume-mute
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: mute
      device: dianxin
  up:
    icon: mdi:chevron-up
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: up
      device: dianxin
  down:
    icon: mdi:chevron-down
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: down
      device: dianxin
  left:
    icon: mdi:chevron-left
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: left
      device: dianxin
  right:
    icon: mdi:chevron-right
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: right
      device: dianxin
  enter:
    icon: mdi:circle
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: ok
      device: dianxin
  sports:
    icon: mdi:ski
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: 1
      device: dianxin
  news:
    icon: mdi:account
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: 2
      device: dianxin
  children:
    icon: mdi:human-male-female-child
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: 3
      device: dianxin
  movie:
    icon: mdi:movie-open
    service: remote.send_command
    service_data:
      entity_id: remote.zhi_neng_yao_kong_remote
      command: 4
      device: dianxin

image

Individual Settings can be displayed properly, but the number of cards set together will affect each other, and images will not be displayed

image image

wang3356 commented 2 years ago

image None of these positions can be displayed properly

usernein commented 2 years ago

Hmmm i think i got the problem... Custom buttons, sources and icons are saved in global vars, so probably what's happening is that one card is overriding others settings I'll fix it soon, thanks for reporting

usernein commented 2 years ago

@wang3356 v0.5.2 should fix it. Can you check it?

wang3356 commented 2 years ago

@wang3356 v0.5.2应该修复它。你能检查一下吗? Thank you very much. My initial tests are ok