我用ha的模板功能,外加通用媒体播放器组件,组合了1个蓝牙音响,接入ha控制播放音乐,我想在播放器的界面,增加1个蓝牙的图标,并且点击图标,可以链接音响或者断开链接音响,能否增加这样一个自定义的按钮,官网文档没有提到,有知道的大佬不,我想加在下图图片里,就是增加1个特定按钮,执行特定功能操作。
# Example configuration.yaml entry
media_player:
- platform: universal
name: MEDIA_PLAYER_NAME
children:
- media_player.CHILD_1_ID
- media_player.CHILD_2_ID
commands:
turn_on:
action: SERVICE
data: SERVICE_DATA
turn_off:
action: SERVICE
data: SERVICE_DATA
volume_up:
action: SERVICE
data: SERVICE_DATA
volume_down:
action: SERVICE
data: SERVICE_DATA
volume_mute:
action: SERVICE
data: SERVICE_DATA
media_play:
action: SERVICE
data: SERVICE_DATA
media_pause:
action: SERVICE
data: SERVICE_DATA
media_previous_track:
action: SERVICE
data: SERVICE_DATA
media_next_track:
action: SERVICE
data: SERVICE_DATA
attributes:
is_volume_muted: ENTITY_ID|ATTRIBUTE
state: ENTITY_ID|ATTRIBUTE
browse_media_entity: media_player.CHILD_2_ID
device_class: tv
unique_id: a_unique_string
|