sbryfcz / harmony-card

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

Missing buttons card blank #28

Closed jscherry closed 3 years ago

jscherry commented 4 years ago

After updating to 110 I can't see any of the buttons that were there before such as volume etc. I can still see OFF and the other inputs I have assigned. Is there a change that needs to be made for the icons or buttons?

Trejjy commented 4 years ago

Myself too,

Looks like there is an issue with the styles. Not sure how to resolve...

DevTools failed to load SourceMap: Could not load content for http://homeassistant.local:8123/hacsfiles/harmony-card/style-map.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

ExarTarkin commented 4 years ago

Hello,

Same issue here. Looking at the source I think it's already corrected but we're missing a new release.

Can you please look into it?

jonbloom commented 4 years ago

@sbryfcz Looks like this needs a new release to support the https://github.com/sbryfcz/harmony-card/pull/26 PR.

randyarrasmith commented 4 years ago

same here. HA v110 broke my harmony card :(

randyarrasmith commented 4 years ago

oh cool... found the PR and did a quick search and replace on the paper-icon-button to ha-icon-button and it works. nice !

Trejjy commented 4 years ago

oh cool... found the PR and did a quick search and replace on the paper-icon-button to ha-icon-button and it works. nice !

Are you able to guide me on this? I did a replace on the harmony-card.js and it didn't work... I could be doing it all wrong :)

randyarrasmith commented 4 years ago

oh cool... found the PR and did a quick search and replace on the paper-icon-button to ha-icon-button and it works. nice !

Are you able to guide me on this? I did a replace on the harmony-card.js and it didn't work... I could be doing it all wrong :)

HA may not be serving the .js file. So either edit the same file that is in the .gz file or I think you can simply delete the .gz file and then HA will serve the .js file.

werfpsa commented 4 years ago

I have added some extra buttons, after having done the replacement with ha-icono-button. 6 buttons have been added: Info, subs, audio, topmenu, menu and options. You can modify the command, color and icon in lovelace... Easy job, thanks to the developer Sam.... See button names below.

image

'dpad_info': 
    command: 'Info',
    icon: 'mdi:information',
'dpad_option': {
    command: 'Option',
    icon: 'mdi:alpha-o-circle',
'dpad_audio': {
    command: 'Audio',
    icon: 'mdi:music-circle',
'dpad_sub': {
    command: 'Subtitle',
    icon: 'mdi:subtitles',
'dpad_tmenu': {
    command: 'TopMenu',
    icon: 'mdi:menu',
'dpad_menu': {
    command: 'PopUpMenu',
    icon: 'mdi:menu-open',
    hide: false
werfpsa commented 4 years ago

Happy to share the .js file

kdoh82 commented 4 years ago

@werfpsa are you just adding your buttons code to the harmony-card.js file? I'd be interested in using the file for sure.

werfpsa commented 4 years ago

A little more... You also have to add them to the matrix (remote) and extend the lay-out section. So I have added the buttons and rebuild the matrix in line 4003 etc starting with:

${this.renderIconButton(buttonConfig['dpad_left'], currentDevice, { 'grid-column': '2', 'grid-row': '2' })} ${this.renderIconButton(buttonConfig['dpad_right'], currentDevice, { 'grid-column': '4', 'grid-row': '2' })} ${this.renderIconButton(buttonConfig['dpad_up'], currentDevice, { 'grid-column': '3', 'grid-row': '1' })} ${this.renderIconButton(buttonConfig['dpad_down'], currentDevice, { 'grid-column': '3', 'grid-row': '3' })} ${this.renderIconButton(buttonConfig['dpad_center'], currentDevice, { 'grid-column': '3', 'grid-row': '2' })} ${this.renderIconButton(buttonConfig['dpad_info'], currentDevice, { 'grid-column': '1', 'grid-row': '1' })}

In line 3101 you also need to update the matrix lay-out part:

.remote { display: grid; grid-template-columns: auto 15px auto auto auto 15px auto; grid-template-rows: auto auto auto; align-items: center; justify-content: center; text-align: center; } This should work.

werfpsa commented 4 years ago

Sorry, this is the correct matrix part:

        <div class="remote">
            ${this.renderIconButton(buttonConfig['dpad_left'], currentDevice, { 'grid-column': '3', 'grid-row': '2' })}
            ${this.renderIconButton(buttonConfig['dpad_right'], currentDevice, { 'grid-column': '5', 'grid-row': '2' })}
            ${this.renderIconButton(buttonConfig['dpad_up'], currentDevice, { 'grid-column': '4', 'grid-row': '1' })}
            ${this.renderIconButton(buttonConfig['dpad_down'], currentDevice, { 'grid-column': '4', 'grid-row': '3' })}
            ${this.renderIconButton(buttonConfig['dpad_center'], currentDevice, { 'grid-column': '4', 'grid-row': '2' })}
            ${this.renderIconButton(buttonConfig['dpad_info'], currentDevice, { 'grid-column': '1', 'grid-row': '1' })}
            ${this.renderIconButton(buttonConfig['dpad_tmenu'], currentDevice, { 'grid-column': '1', 'grid-row': '2' })}
            ${this.renderIconButton(buttonConfig['dpad_option'], currentDevice, { 'grid-column': '1', 'grid-row': '3' })}
            ${this.renderIconButton(buttonConfig['dpad_audio'], currentDevice, { 'grid-column': '7', 'grid-row': '3' })}
            ${this.renderIconButton(buttonConfig['dpad_menu'], currentDevice, { 'grid-column': '7', 'grid-row': '2' })}
            ${this.renderIconButton(buttonConfig['dpad_sub'], currentDevice, { 'grid-column': '7', 'grid-row': '1' })}
        </div>        
sbryfcz commented 4 years ago

I just cut a quick release based on the PR from @MichaelBitard . Hope this helps everyone out. Sorry I've been so detached from this everyone. Life is crazy right now. Happy to add collaborators :)