iantrich / roku-card

📺 Roku Remote Card
MIT License
116 stars 40 forks source link

Add icon to button options #51

Open spripe opened 3 years ago

spripe commented 3 years ago

Is your feature request related to a problem? Please describe. Would like to have the option to add a icon to a button

Describe the solution you'd like Add the same possibility as app button to a ordinary button

Describe alternatives you've considered N/A

Additional context N/A

DrHoneyBear commented 3 years ago

Do you mean the core buttonset (left, right, up, down, etc)? If so, what's the point using this card. You might as well just use builtin button-card , and set each button icon + action. Easy,

josrafafonlo commented 2 years ago

You could manually download roku-card.js and see where it defines a button (There's a "renderButton" function for each one) and change the icon for the one you want. For example, I changed power button icon to a customized one:

${this._config.tv||this._config.power&&this._config.power.show?this._renderButton("power","mdi:monitor-speaker","Power"):""}

you can see the icon I picked as "mdi:monitor-speaker"

Then you reload hass resources manually (https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins) and you're done