You need to define your grid with something like or at least if how i’ll do it. i.m not an expert i’m still learning. i supossed is like your line: layout: icon_name_state
@Ildar_Gabdullin the ‘-20px’ margin-left shifts left the name, but unfortunately it remains cut on the right, even if there is still some space on right of the card.
Thanks anyway for your quick prompt too!!
ButtonCardJSTemplateError: ReferenceError: none is not defined in 'this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true})); return none...'
Unfortunately, I no longer have the old card, but it was a combination of:
stack-in-card
vertical-stack
horizontal-stack
layout-card
mushroom-chips-card
mushroom-template-card
card-mod
And now, I only use:
button-card
vertical-stack
conditional
card-mod
When I open the Home Assistant application on my smartphone, I notice that the button-card cards are the first to appear. The other cards have a longer loading time, and I think it’s because of card-mod.
Service [[[ this.dispatchevent(new event('hass-toggle-menu', { bubbles1: true, composed: true})) return none; called service [[[ this.dispatchEvent(new Event('hass-toggle-menu', { bubbles1: true, composed: true})) return none; which was not found.
I’m trying with this code, but if there’s another way to toggle the menu button with button-card, let me know.
It appears the button card does not like to execute the services when nested. I wanted to test how it was grouping the buttons and didn’t expect positive results without renaming bubbles1 back to bubbles.
I have zero experience with using a button in a button, or with the service at hand. However, could it have to do with the ‘path’ to the actionable item?
As if somehow the nested button doesnt get out of the main button to the menu item, and has no item to perform the action on, hence ending up logging none?
I suppose this would be an issue to post on the Button-card repo, as it is not yet provided for, and it would seem a nice addition to the power of button-card
For the time being, I’d suggest to use any of the other available options, and redesign your card to the options that do work…
automation:
# needed for Javascript in buttons shortcut menu
- alias: Back button
id: back_button
mode: single
trigger:
platform: state
entity_id: input_boolean.back_button
to: 'on'
action:
service: input_boolean.turn_off
target:
entity_id: input_boolean.back_button
- alias: Forward button
id: forward_button
mode: single
trigger:
platform: state
entity_id: input_boolean.forward_button
to: 'on'
action:
service: input_boolean.turn_off
target:
entity_id: input_boolean.forward_button
somehow that seems much simpler, but I need to check if the results is the same…
seems awfully indentical if you ask me… I do remember though it wasnt reliable, and in the end did away with them. I just had to find them in my 2022 backups .
Admit I didnt have the menu item button, and that service is new to me.
Do you have some documentation where you got that from?
I have experienced this in the past (here) when using a button is inside a button. Using another type of card inside the button card worked for me in the past, but I like your resolution. Nice workaround!