Created
May 7, 2022 18:45
-
-
Save vlaraort/b74d6c3113f1a031245d27329e1f22f7 to your computer and use it in GitHub Desktop.
Custom chip menu for HA minimalist UI, to toggle side menu
@Nicoautoxp, you have to use it with the minimalist integration.
Please make this change to prevent errors from popping up.
---
chip_menu:
template: "chips"
tap_action:
action: 'call-service'
service: |
[[[
this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true}));
return none;
]]]
show_icon: true
icon: "mdi:menu"
styles:
grid:
- grid-template-areas: "'i'"
i tried to use it but i get a error
bnt_3:
card:
type: custom:button-card
icon: mdi:menu
tap_action:
action: call-service
service: |-
[[[
this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true}));
return none;
]]]
styles:
icon:
- width: 20px
- color: white
- justify-self: center
- align-self: center
card:
- border-radius: 100px
- width: 39px
- height: 39px
- background: rgb(39,39,39)
- box-shadow: none
ButtonCardJSTemplateError: ReferenceError: none is not defined in 'this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true})); return none...'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
does this still work ? I tried it and it can't find the service. Do I need to change something ?