Coder Social home page Coder Social logo

sian-lee-sa / honeycomb-menu Goto Github PK

View Code? Open in Web Editor NEW
190.0 190.0 10.0 1.83 MB

Honeycomb menu is a Home Assistant module (not a card) that can be applied to any lovelace card. When activated by the defined action on said card, the module will display a 'rounded' list of honeycomb buttons with an optional XY pad to make interfacing with lovelace more fluent

License: Other

JavaScript 100.00%
home-assistant home-assistant-frontend lovelace-module lovelace-ui menu module

honeycomb-menu's People

Contributors

dependabot[bot] avatar sian-lee-sa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

honeycomb-menu's Issues

Menu half loading or not loading

Thanks for this great work.
As I love it, I want to implement it in my floorplan.
Unfortunately, I can't make it work.
Sometimes the menu loads but sometimes it doesn't.
Moreover, in the same floorplan there is a menu that is "half loading", meaning that the central control loads but the buttons don't load.
To give you more info: when I hold the mouse, in a couple of entities with the menu the picture grays out but in another one is not doing even this.
I'm using Chrome.

This is the code of one of the menus:

              hold_action:
                action: call-service
                service: honeycomb
                service_data:
                  entity: media_player.android_tv_192_168_1_143
                  size: 150
                  xy_pad:
                    'y':
                      invert: true
                      service: script.turn_on
                      service_data:
                        entity_id: >-
                          {{ ( y_percentage > 0 ? "script.tv_volume_up" :
                          "script.tv_volume_down" ) }}
                  styles:
                    icon:
                      - height: 40%
                      - top: '-3px'
                  buttons:
                    - icon: mdi:television
                      tap_action:
                        action: call-service
                        service: script.tv_power
                    - icon: mdi:power
                      tap_action:
                        action: toggle
                    - icon: mdi:netflix
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          source: Netflix
                        target:
                          entity_id: media_player.android_tv_192_168_1_143
                    - icon: mdi:alpha-h-circle
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          source: com.hbo.hbonow
                        target:
                          entity_id: media_player.android_tv_192_168_1_143
                    - icon: mdi:alpha-d-circle
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          source: Disney+
                        target:
                          entity_id: media_player.android_tv_192_168_1_143
                    - icon: mdi:alpha-p-circle
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          source: Prime Video
                        target:
                          entity_id: media_player.android_tv_192_168_1_143

This is an screenshot after holding down on the TV to show the menu:

image

Cannot read property of undefined (reading 'addEventListener')

Hi thanks for awsome module! This is exactly what I need but I cannot get it working.
I have the below basic code that Im using just to test before I code my whole floorplan.
When I hold the item i do get a dimmed screen with nothing else but the error.
Then when selecting anywhere on the screen it un-dimms and throws the other error.
I have added the module but I am getting the errors:
webpack:///./src/honeycomb-menu.js?:350:67 Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener')
and
https://.ui.nabu.casa/frontend_latest/app.f08a72d3.js:849:77999 Uncaught TypeError: Cannot read properties of null (reading 'adoptedStyleSheets')

...
- type: picture-elements
  elements:
    - type: image
      ...
      hold_action:
        action: call-service
        service: honeycomb
        service_data:
          buttons:
            - entity: light.kitchen
              icon: 'mdi:broom'
              tap_action:
                action: more-info
            - entity: light.kitchen_led
              icon: 'mdi:broom'
              tap_action:
                action: more-info
            - entity: light.laundry
              icon: 'mdi:broom'
              tap_action:
                action: more-info

Not sure if it is interfering with another module I might have installed?
I have these modules installed

  • decluttering-card.js
  • group-card.js
  • kiosk-mode.js
  • light-entity-card.js
  • lovelace-card-templater.js
  • lovelace-card-templater.js
  • card-tools.js
  • layout-card.js
  • more-info-card.js
  • mini-media-player-bundle.js
  • search-card.js
  • text-element.js
  • card-tools.js
  • honeycomb-menu.js
  • now-playing-card.js

Inconsistent on IOS

hi - I've got honeycomb up and running on my PC browser just fine), but on my iphone and ipad -- both from the home assistant app and from a mobile browser -- MOST of the time it doesn't work. but it's weird, because every so often it DOES work just fine on mobile, but its rare.

On PC, the honeycomb pops up and all the buttons show and work. On mobile, when i hold press to bring it up, the screen dims but the honeycomb pop up doesn't appear. it almost seems like it "appears" but only somewhere offscreen.

here's the relevant card yaml. (and i only just recently added the "hold_action" and "tap_action" === none to each of the honeycomb buttons. i read in another thread that was worth a shot, but it didn't make a difference. i was having the same issues even before i added those lines.

      - type: custom:button-card
        entity: climate.pure_hot_cool_link
        icon: mdi:fan
        state_color: true
        tap_action:
          action: call-service
          service: fan.toggle
          service_data:
            entity_id: fan.pure_hot_cool_link
        hold_action:
          action: call-service
          service: honeycomb
          service_data:
            buttons:
              - icon: mdi:information-variant
                tap_action:
                  action: more-info
                hold_action: none
                double_tap_action: none
              - icon: mdi:fan-speed-1
                active: '[[[ return entity.attributes.speed == "low" ]]]'
                tap_action:
                  action: call-service
                  service: fan.set_speed
                  service_data:
                    entity_id: entity
                    speed: low
                hold_action: none
                double_tap_action: none
              - icon: mdi:fan-speed-2
                active: '[[[ return entity.attributes.speed == "medium" ]]]'
                tap_action:
                  action: call-service
                  service: fan.set_speed
                  service_data:
                    entity_id: entity
                    speed: medium
                hold_action: none
                double_tap_action: none
              - icon: mdi:fan-speed-3
                active: '[[[ return entity.attributes.speed == "high" ]]]'
                tap_action:
                  action: call-service
                  service: fan.set_speed
                  service_data:
                    entity_id: entity
                    speed: high
                hold_action: none
                double_tap_action: none
              - icon: mdi:radiator
                tap_action:
                  action: call-service
                  service: climate.set_hvac_mode
                  service_data:
                    entity_id: climate.pure_hot_cool_link
                    hvac_mode: heat
                hold_action: none
                double_tap_action: none
              - icon: mdi:snowflake
                tap_action:
                  action: call-service
                  service: climate.set_hvac_mode
                  service_data:
                    entity_id: climate.pure_hot_cool_link
                    hvac_mode: cool
                hold_action: none
                double_tap_action: none
            entity: fan.pure_hot_cool_link
            autoclose: true
            active: true
        double_tap_action:
          action: call-service
          service: script.dyson_timed_off
        color_type: icon
        size: 35px
        show_icon: true
        show_name: false
        styles:
          card:
            - opacity: 1
            - padding: 15px 0px
            - '--mdc-ripple-color': var(--button-card-light-color)
            - '--mdc-ripple-press-opacity': 0.5
          name:
            - opacity: 1
            - padding: 15px 0px
            - '--mdc-ripple-color': var(--button-card-light-color)
            - '--mdc-ripple-press-opacity': 0.5
        state:
          - value: 'off'
            color: rgba(255, 255, 255, .45)
          - value: unavailable
            color: rgba(255, 255, 255, .45)
          - value: heat
            color: rgba(190, 60, 20, 1)
          - value: cool
            color: rgba(10, 80, 160, 1)

honeycomp logs errors when invoked

Hello there,

I want to use the module with a floor plan following your guide.
I have installed the honeycomp-menu and card-tools and configured honeycomp inside the rules section of the floorplan-card as follows:

        - entities:
          - switch.e5_s4_hwr_waschmaschine
          tap_action: toggle
          hold_action:
            action: call-service
            service: honeycomb
            service_data:
              active: true
              buttons:
                - entity: cover.e8_r1_wohnen_gross_fenster
                  icon: mdi:blinds
                  tap_action:
                    action: more-info
                - entity: cover.e8_r2_wohnen_klein_fenster
                  icon: mdi:blinds-open
                  tap_action:
                    action: more-info
                - entity: climate.e6_e7_e8_t1_kueswo_temperatur
                  icon: mdi:thermometer
                  tap_action:
                    action: more-info

when performing the hold action on the entity I can see the error in the logs:

typography.js:181 
        
       Uncaught TypeError: Cannot read properties of null (reading 'adoptedStyleSheets')
    at HoneycombMenuItem._createLovelaceCard (honeycomb-menu-item.js:169:67)
    at HoneycombMenuItem.ready (honeycomb-menu-item.js:136:34)
    at HoneycombMenuItem._enableProperties (typography.js:181:1)
    at a.__enableOrFlushClients (typography.js:181:1)
    at a._readyClients (typography.js:181:1)
    at a._flushClients (typography.js:181:1)
    at a._propertiesChanged (typography.js:181:1)
    at a._flushProperties (typography.js:181:1)
    at a.ready (typography.js:181:1)
    at a._enableProperties (typography.js:181:1)

Is this a bug or what am I doing wrong? Do I need a specific version of card-tools (I used the latest) so maybe there are some incompatibilities?

honeycomb menu does not appear with template switch entities

I am testing out the honeycomb menu and have noticed not all entities are compatible? I am able to see the blank dark honeycomb menu after installing the .js file. However, if I input the below entity which is a template switch, the honeycomb menu does not appear. If I use a different entity ( a switch entity via a broadlink IR command), the menu shows up. I have tried other template switch and the menu does not show up as well. Below is a snipet of the code I am testing with.

    - entity: switch.jcom_tv
      tap_action:
        action: 'toggle'
      hold_action:
        action: call-service
        service: honeycomb
        service_data:
          autoclose: false
          active: true
          buttons:
            - icon: mdi:information-variant
              color_type: card
              color: rgb(135,206,250, .7)
              styles:
                icon:
                  - width: 40%
            - icon: mdi:monitor
            - icon: mdi:volume-minus
            - icon: mdi:volume-mute
            - icon: mdi:monitor-lock
              color_type: card
              color: rgb(135,206,250, .7)
              styles:
                icon:
                  - width: 40%
            - icon: mdi:volume-plus
              color_type: card
              color: rgb(135,206,250, .7)
              styles:
                icon:
                  - width: 40%

honeycomb-menu in conjunction with 'browser_mod.popup'

Hi there,

I've noticed an issue when attempting to use a 'honeycomb-menu' element/config within a 'browser_mod.popup' configuration.

When the 'honeycomb-menu' is called (action: call-service) via a 'tap_action' it is only visible behind the 'browser_mod.popup' card.

Code and screenshot attached ...

Screenshot

service: browser_mod.popup
data:
  style: |
    --popup-min-width: 450px;
  dismissable: true
  content:
    type: vertical-stack
    cards:
      - type: custom:button-card
        color_type: blank-card
        styles:
          card:
            - height: 3px
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            name: Power
            icon: mdi:power
            tap_action:
              action: call-service
              service: honeycomb
              service_data:
                buttons:
                  - icon: mdi:volume-plus
                    color_type: card
                    color: green
                  - icon: mdi:volume-minus
                    color_type: card
                    color: green
                  - icon: mdi:volume-mute
                    color_type: card
                    color: green
                  - icon: mdi:television-classic
                    color_type: card
                    color: green
                  - icon: mdi:television-classic-off
                    color_type: card
                    color: green
                  - icon: mdi:play-pause
                    color_type: card
                    color: green
            show_icon: true
            styles:
              card:
                - height: 140px
              ...

Menu does not popup

Following the Readme I cannot seem to get the menu to popup

- type: button
  entity: fan.fabian
  hold_action:
    action: call-service
    service: honeycomb
    service_data:
      template: light
      autoclose: false
      active: true
      buttons:
        - icon: mdi:fan-auto
          tap_action:
            action: call-service
            service: fan.set_preset_mode
            service_data:
              preset_mode: auto
              entity_id: fan.fabian

I have checked the sources in chrome developer tools and honeycomb-menu.js is listed so I believe its loaded properly.
Nothing happens when holding over the button, nor if I change to tap_action

Icon Size

Hi, I simply wonder how one could increase the icon size of honeycomb items.
I've look through and old thread here referencing to card-mod but I can't simply get that solution to work, and it seems outdated judging from the comments.

Anyway, any idea how to accomplish this or am I doing something wrong when "size" only increases the menu size but the icons in it stays the same size?

It looks so nice in the example-GIFs :)
Thank you! :)

The following call service with template is not supported

I'm trying to use this button to invoce the vacuum.send_command with a template for room id, but the service is not properly invoked... is says required key not provided data['command']. If I use the below service call with a normal button, it works properly.

                                      - icon: 'mdi:white-balance-sunny'
                                        tap_action:
                                          action: call-service
                                          service: honeycomb
                                          service_data:
                                            autoclose: true
                                            buttons:
                                              - icon: 'mdi:toaster-oven'
                                                tap_action:
                                                  action: call-service
                                                  service: vacuum.send_command
                                                  target:
                                                    entity_id: vacuum.aspirapolvere
                                                  data:
                                                    command: spot_area
                                                    params:
                                                      rooms: >-
                                                                   ${ parseInt(states['input_number.stanza_cucina'].state).toString() }
                                                      cleanings: 1

Uncaught (in promise) DOMException: Failed to load because no supported source was found.

Hi,
first off, I would like to thank you for this useful menu !
I'm using it for the first time, and I'm trying to put a menu for my vacuum over a floorplan image.

Here is what I put:

- entity: vacuum.robot_aspirateur
     tap_action:
        action: call-service
        service: honeycomb
        service_data:
           entity: vacuum.robot_aspirateur
           buttons:
             - icon: mdi:information
                tap_action:
                  action: more-info
              - icon: mdi:vacuum
                tap_action:
                action: "vacuum.start"

The thing is that when click on the vacuum, the menu appears, but when pushing the button, nothing happens.
Having a look a the DevTools shows me the following message on the console:
Uncaught (in promise) DOMException: Failed to load because no supported source was found.

I also noticed that in the logs, I had the following error message :

Logger: frontend.js.latest.202305033
Source: components/system_log/__init__.py:257 
First occurred: 6:03:08 PM (2 occurrences) 
Last logged: 6:57:19 PM

https://mydnsname:8123/hacsfiles/honeycomb-menu/honeycomb-menu.js:113:2748 Uncaught TypeError: Cannot read properties of null (reading 'honeycomb_menu_templates')
:0:0 Script error.

Did I do something wrong ?
I'm using Brave browser, but I have the same problem with Chrome.
Thanks for your help :)

Kris

Required key not provided @ data['service']. Got None

Home Assistant 2023.4.5 Docker
Honeycomb Menu 0.12.2 installed through HACS

Chrome 112 throws:
Failed to call service honeycomb/undefined. required key not provided @ data['service']. Got None

After looking at the console it shows below error:

{
    "code": "invalid_format",
    "message": "required key not provided @ data['service']. Got None"
}

Any idea how to fix it?

HoneyComb Menรน and Sonoff NS Panel

Good Evening,
I'm trying to build a dashboard for Sonoff NS Panel Pro (android with installed HA companion App).
When i try to push the button of the dashboard, in order to activate the HoneyComb Menรน, using my PC or my android phone i haven't any problem, but if i try the same process on my NS Panel i receive this error:

[547198447536] Error handling message: required key not provided @ data['service']. Got None (invalid_format) NSPANEL from 192.168.1.73 (Mozilla/5.0 (Linux; Android 8.1.0; px30_evb Build/OPM8.190605.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.132 Mobile Safari/537.36 Home Assistant/beta-10008-d81913b7-10008 (Android 8.1.0; px30_evb))

Can you help me to understand where is the problem ?
Thanks a lot.
Z.

Problem

Hello, why does the hexagon frame disappear when I insert the icon?

image

Honeycomb menu doesn't work since upgrading to Home Assistant 2023.0.4

As the title suggests, since upgrading to HA 2023.04 today (released on 04/04/23) - the honeycomb menu no longer works as apparently it relies on polymer, not Lit. As such, if you try to perform an action to show the menu, you get the below error stating that Polymer support will be "removed in 2023.0.5" but its actually already been removed as shown here;

https://developers.home-assistant.io/blog/2023/04/04/deprecating_polymer/

"In Home Assistant 2023.4, we finally removed the last piece of Polymer from the entry point of Home Assistant, meaning it is not loaded when the app starts, but only when a component needs it."

They claim HA will now load it when needed, but since the update it doesn't work at all so assuming something needs to be done on honeycomb to set polymer up, and also inevitably move to Lit?

image

Note: This error did not occur prior to the upgrade, nor did the Polymer prompt.

Thanks

Erro cardTools is not defined

I've been trying to implement honeycomb in my project, but my log records the following error:

Logger: frontend.js.latest.202209070
Source: components/system_log/init.py:227
First occurred: 10:15:52 (13 occurrences)
Last logged: 11:39:59

webpack:///./src/honeycomb-menu.js?:347:16 Uncaught TypeError: Cannot read properties of undefined (reading 'shade')
webpack:///./src/honeycomb-menu.js?:51:32 Uncaught ReferenceError: cardTools is not defined

Could someone help me?

HA error - Polymer is not defined

Hi, since updating to 2023.5.2 I am getting this error. Do you know what is about?

Logger: frontend.js.latest.202305033
Source: components/system_log/__init__.py:257
First occurred: 21:05:53 (1 occurrences)
Last logged: 21:05:53

webpack:///./src/honeycomb-menu-item.js?:16:33 Uncaught ReferenceError: Polymer is not defined

Feature request: Immediate Action

Hi,

I was quite disappointed when I learned that honeycomb menu is not working on IOS devices, even with the companion app. Anyways, while I still continued to fiddle around with it, honeycomb menu works well and (so far) reliable with the latest update to IOS 16.5.1!

Configuring it for various mobile devices, I noticed a feature that would just well complement the already great menus.
Would it be possible to add the option for an action that is executed while honeycomb menu opens?
For example, like toggling a light when pressing an icon, while also opening the honeycombs for changing light brightness and color. I know there is always a work around with scripts, however, it would just be very elegant to have that as an additional functionality here...

It's me, hi, im the problem its me

Hi Sian,

I'm hoping to pay to get some lessons or to get some work done on a dashboard and have no idea how to reach out to you. I'm based in Melbourne.

Love your work and been following many of your projects for a long time. Hoping to get some support,

Matt

Button-card 4.0.0 upgrade breaks honeycomb-menu

button-card 4.0.0 seems to break honeycomb-menu. No buttons are displayed anymore.
Tested with multiple browser, including current Chrome version.

Downgrade to button-card 3.5.0 restores full functionality of honeycomb-menu.

Buttons not showing when but icons defined

I am trying to use honeycomb module inside a picture-elements.

When I use this code :

image

The 6 buttons are showing.

image

But when I try to fill the honey buttons using this code :

image

The buttons are not showing anymore :
image

Any idea what I am doing wrong ?

Companion App compatibility?

I see that you are developing this in Chrome and that you say Chrome is the only supported browser. But are there any plans to make this compatible with the companion app in iOS? I love the idea of this menu and played with it in Chrome, I use tablets around the house for rooms and in my workshop, all using the Companion App, along with my iPhone when I'm on the go. But of course this doesn't work in that, the only place this works is if I'm sitting at my computer (which I rarely am).

Just curious about if there's plans on supporting the iOS community as well? Unless someone knows a way to change the iOS app to use chrome instead of safari, but so far I can't seem to find a way to do it.

Honeycomb shows on a different location than where I clicked

This may be a minimalist room-card specific. Someone would maybe be able to advise - I did not find any guidance so far.

Problem descriptiom:
When I click on one of the room card entities (those small indicators) and I call a honeycomb service on this entity, then honeycomb popup shows on a location of my last click on dashboard. If I click on the same entity again, honeycomb popup shows correctly. It seems it always remembers location of the click I made before.

Steps to reproduce:

  1. Click on random place of the dashboard
  2. Click on of the room card entities (cover entity on "Pracovna" room card)

Expected behaviour:
Honeycomb popup shows around cover entity

Current behaviour:
Honeycomb popup shows on a location from Step 1.

What would help:
Having a possibility to set the popup location of honeycomb manually.

Step 1
step1

Step 2
Step2

Full code of the room card:

view_layout:
  grid-area: "office"
  place-self: left end stretch
type: "custom:button-card"
template:
  - card_room
  - blue_on
  - grey_off
  - grey_no_state
  - blue_closed
name: Pracovna
label: >
  [[[
    return "๐ŸŒก๏ธ" + states['sensor.office_temperature'].state + " ยฐC" + "๐Ÿ’ง" + states['sensor.temperature_sensor_office_humidity_sensor_6'].state + " %"
  ]]]
card_mod:
  style: |
    ha-card {
      {% if states('cover.office')|title == 'Closing' %}
        animation: blink 1s linear infinite;
      {%endif%}
      {% if states('cover.office')|title == 'Opening' %}
        animation: blink 1s linear infinite;
      {%endif%}
    }
      @keyframes blink {
        50% {opacity: 0;}
    }
entity: switch.martin_pc_switch
icon: mdi:chair-rolling
tap_action:
  action: navigate
  navigation_path: "office"
variables:
  label_use_temperature: false
  label_use_brightness: true
  entity_1:
    entity_id: switch.martin_pc_switch
    templates:
      - blue_on
    tap_action:
      action: toggle
  entity_2:
    entity_id: cover.office
    templates:
      - blue_closed
    tap_action:
      action: call-service
      service: honeycomb   
      entity: cover.office
      service_data:
        entity_id: entity
        animation_speed: 25
        buttons:
          - icon: mdi:numeric-1-box
            active: >
              [[[
                return (states['cover.office'].attributes.current_tilt_position <= states['sensor.blinds_tilt_determine_min_high'].state 
                && states['cover.office'].attributes.current_tilt_position >= states['sensor.blinds_tilt_determine_min_low'].state) 
                && states['cover.office'].state == "closed"
                ? "True" : "1" == "1"
              ]]]
            tap_action:
              action: call-service
              service: script.tilt_blinds_office_min
          - icon: mdi:numeric-2-box
            active: >
              [[[
                return (states['cover.office'].attributes.current_tilt_position <= states['sensor.blinds_tilt_determine_mid_high'].state 
                && states['cover.office'].attributes.current_tilt_position >= states['sensor.blinds_tilt_determine_mid_low'].state) 
                && states['cover.office'].state == "closed"
                ? "True" : "1" == "1"
              ]]]
            tap_action:
              action: call-service
              service: script.tilt_blinds_office_mid
          - icon: mdi:numeric-3-box
            active: >
              [[[
                return (states['cover.office'].attributes.current_tilt_position <= states['sensor.blinds_tilt_determine_max_high'].state 
                && states['cover.office'].attributes.current_tilt_position >= states['sensor.blinds_tilt_determine_max_low'].state)
                && states['cover.office'].state == "closed" 
                ? "True" : "1" == "1"
              ]]]
            tap_action:
              action: call-service
              service: script.tilt_blinds_office_max
          - icon: mdi:window-shutter-open
            active: >
              [[[
                return (states['cover.office'].state == "open") ? "True" : "1" == "1"
              ]]]
            tap_action:
              action: call-service
              service: cover.open_cover
              target:
                device_id:
                  - d0393edaa4cef9acaa5f75affa7207ea
          - icon: mdi:window-shutter
            active: >
              [[[
                return (states['cover.office'].attributes.current_tilt_position == 0 && states['cover.office'].state == "closed") ? "True" : "1" == "1"
              ]]]
            tap_action:
              action: call-service
              service: cover.close_cover
              target:
                device_id:
                  - d0393edaa4cef9acaa5f75affa7207ea
          - show: false

Speed of opening

Hi, is there a way to make the honeycomb menu open faster? It seems extremely slow to animate the menu open.

Feature request/ ideas

Thanks for this module. It's really great!

Here's a video to showcase how I used this and hopefully aid in explaining some ideas that I think would be really useful.

2023_06_14_08_42_00.2.mp4
  1. I added another honeycomb service call to a honeycomb button. This opens a new menu, but closes the first one even with autoclose false. Would be nice if only leaf nodes could be set to autoclose.
  2. It would be really cool if one could expand to more than 6 buttons, e.g. start a second row of clockwise buttons around the first and cascade out up to 12.
  3. 1 + 2 combined to expand the menu into different directions. i.e. dont dismiss the first menu, but when I build the second one I only add buttons in certain positions so I can infinite expand submenus - perhaps dimming the previous layer a slightly.
  4. It would be nice if one could specify the button label with and without a icon. Currently it shows the name of the entity. I would like to show an icon and state/attribute value for Temperature, Humidity and Pressure in the leaf node after hitting more-info.

button in picture-element?

hello, I'm quite new to the subject but....
I managed to make my floorpla3D
it works, but I spend time creating images, I use the "picture-element", but can I integrate the honeycomb in it, I can't do it

Safari & iOS (Home Assistant App) Rendering Issues

Hiya, first of all thanks for this, it's a nice component to interact with floorplans.

I am having some issues regarding rendering the menu on safari & iOS devices, specifically both within Chrome, and on the HA app itself. I suspect Chrome may use Safari's webkit.

I've been able to get the following error to reproduce whenever I attempt to open the honeycomb menu via a click:

TypeError: Illegal constructor
(anonymous function) โ€” typography.js:181
close โ€” honeycomb-menu.js:290:647

I've hunted about and seen potential issues regarding Polyfill on Safari & iOS devices.

This really impacts my usage of honeycomb, and if this cannot ever work on iOS devices or safari, then I'm without a menu system as it stands for my floorplan.

Many thanks!

The menu shifts when you click away from the icon

Hello, I assigned an image for this menu that needs to be clicked on for this menu to open, but I noticed that if I press my finger a little to the left to the right, the menu opens not in the center of the image, but where I clicked. And the currant is no longer in the center of the menu. Can this be fixed somehow?

DOM Error when clicking button

Just wanted to say thanks for all your work and tutorials on the HA Floorplan. Impressive stuff.

I've implemented a Honeycomb menu with a template as follows:

- element: path_living_room
  hold_action:
     action: call-service
     service: honeycomb
     service_data:
      template: area
      autoclose: false
      variables:
         climate: climate.living_room
         light: light.living_room
         motion: binary_sensor.living_room_occupancy
area:
  variables:
    light: null
    climate: null
    motion: null
  size: 150
  buttons:
    - icon: 'mdi:information-variant'
      entity: '[[[ return (variables.light) ]]]'
      tap_action:
         action: more-info
    - icon: 'mdi:lightbulb'
      entity: '[[[ return (variables.light) ]]]'
      active: true
      tap_action:
         action: turn_off
    - icon: 'mdi:motion-sensor'
      entity: '[[[ return (variables.motion) ]]]'
      active: true
      tap_action:
         action: more-info
    - icon: 'mdi:radiator'
      entity: '[[[ return (variables.climate) ]]]'
      active: true
      position: 5
      tap_action:
         action: more-info

I'm getting this error in the console when a clock a button. The button seems to work fine, just seems odd that I get an error

downstairs:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

If it matters 'path_living_room' is not an entity. Also my lovelace config is broken up via includes, but I don't think that should make a difference. Whilst I maintain several integrations, so pretty good at the background stuff, I'm not sure how to debug the frontend.

different views in safari and chrome

I just noticed that the Honeycomb menu works "differently" in the browsers.

the first picture is taken in the chrome
Bildschirmfoto 2021-08-16 um 06 21 45

the second picture is taken in the safari
Bildschirmfoto 2021-08-16 um 06 22 57

now i would say that the honeycomb does not work in safari. But:

this was done in safari:
Bildschirmfoto 2021-08-16 um 06 24 32

the code for the menu in the safari are also "old" building blocks .... I can say that as soon as I add buttons to the tiles, the menu can no longer be opened

do you know if there are any disagreements here?

Code Chrome:

  - type: state-icon
    entity: light.extended_color_light_3_flur_eg
    style:
      top: 77%
      left: 50%
    tap_action:
      action: toggle
    hold_action:
      action: call-service
      service: honeycomb
      service_data:
        entity: light.extended_color_light_3_flur_eg
        color: var(--paper-item-icon-color)
        xy_pad:
          repeat: 500
          x:
            invert: true
            service: light.turn_on
            service_data:
              entity: light.extended_color_light_3_flur_eg
              hue: '[[[ return {{ y }} / 18 * {{ y_percentage }}; ]]]'
          'y':
            invert: true
            service: light.turn_off
            service_data:
              entity: light.extended_color_light_3_flur_eg
              brightness_step_pct: '[[[ return {{ y_percentage }} / 10; ]]]'
        buttons:
          - icon: mdi:information-variant
            tap_action:
              action: more-info
          - icon: mdi:lightbulb
            active: true
          - icon: mdi:motion-sensor
            position: 4
            active: true
            tap_action:
              action: toggle

code safarie:

 - type: state-icon
    entity: light.extended_color_light_3_flur_eg
    style:
      top: 66%
      left: 25%
    tap_action:
      action: toggle
    hold_action:
      action: call-service
      service: honeycomb
      service_data: null ##I'm not sure whether "null" can be used here? is added there automatically
      entity: light.extended_color_light_3_flur_eg
      buttons:
        - icon: mdi:information_variant
          tap_action:
            action: more-info
        - icon: mdi:fan-speed-1
          tap_action:
            action: call-service

No Buttons in Honeycomb Menu

Hey,

I don't know why, but no buttons are displayed.

I've been trying to integrate your honeycomb menu into my HA for days.
Unfortunately, only empty tiles are shown to me.
It is not possible for me to include any entities here.

Bildschirmfoto 2021-08-13 um 08 08 52

- type: custom:vertical-stack-in-card
    style:
      top: 57%
      left: 35%
    title: My Card
    cards:
      - type: button
        entity: light.extended_color_light_2
        hold_action:
          action: call-service
          service: honeycomb
          service_data:
            template: light
            buttons:
              - show: '[[[ return (variables.motion) ]]]'
                entity: '[[[ return variables.motion ]]]'
                icon: mdi:lightbulb
                position: 4
                active: true
                tap_action:
                  action: toggle
              - show: '[[[ return (variables.timer) ]]]'
                entity: '[[[ return variables.timer ]]]'
                icon: mdi:lightbulb
                position: 5
                active: true
                tap_action:
                  action: toggle

Even if I use the standard code from the instructions, I only see empty tiles.

is it possible for me to get a working code? I would like to know where the problem is.
thank you from Germany

are browser_mod services and light-popup card supported?

https://github.com/thomasloven/hass-browser_mod
https://github.com/DBuit/light-popup-card

BTW -- if i haven't said it recently, i freakin' love this module. Youtube content is killer too! I'm trying to get a light-popup card to render with a click action off of one of the buttons in the honeycomb. Normal tap-actions (toggle, more-info etc) all work fine.

here's the code with the honeycomb (i tried to copy your blue outline and im butchering it.. so looking forward to that vid as well)

  - type: image
      entity: light.master_bathroom_lights
      image: /local/Floorplan/transparent.png
      tap_action:
        action: toggle
      style:
        border: 4px solid cyan
        width: 230px
        height: 175px
        top: 17.5%
        left: 58%
        opacity: '${states[''light.master_bathroom_lights''].state === ''on'' ? ''.5'' : ''0'' }'
      hold_action:
        action: call-service
        service: honeycomb
        service_data:
          buttons:
            - icon: 'mdi:fan'
              entity: light.master_bathroom_exhaust_fan
              state:
                - value: 'on'
                  spin: true
              tap_action:
                action: toggle
              styles:
                icon:
                  - color: white
            - icon: 'mdi:lightbulb'
              entity: light.master_bathroom_lights
              state:
                - value: 'on'
                  color: yellow
                - value: 'off'
                  color: white
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  card:
                    type: 'custom:light-popup-card'
                    entity: light.master_bathroom_lights
                    brightnessWidth: 150px
                    brightnessHeight: 400px
                    switchWidth: 150px
                    switchHeight: 400px

Issue after honeycomb menu upgrade

It got weird after the upgrade, so I looked up the data and came all the way here.
Buton card downgrade to 3.5
It's implemented well on laptops, but it's still weird on mobile.

Let's wait for an improved upgrade version.

Option/variable to change animation speed

Hi there!

Thanks for such a great module firstly!

And the main reason I'm here ... Is there a way or option/feature which could be added to change the animation load time?

Buttons not showing up

Hi there,

I have installed your modure with button-card already installed but once I open de menu, the buttons dont show up, just appear as grey.

This is my code:

  • type: custom:button-card
    name: Switch Salon
    icon: mdi:lightbulb
    aspect_ratio: 1/1
    show_name: false
    styles:
    card:
    - border-radius: 50%
    - box-shadow: 0px 0px 2px 0.5px yellow
    style:
    top: 19%
    left: 45%
    width: 3%
    tap_action:
    action: call-service
    service: honeycomb
    service-data:
    buttons:
    - name: Mesilla
    show_name: true
    autoclose: true
    color_type: card
    style:
    width: 1%
    tap_action:
    action: call-service
    service: switch.toggle
    service-data:
    entity: switch.sonoff_1000b01f53

Buttons

Buttons function not working, only background changes color.
Without butttons:
image
image

With buttons:

image
image

Cant get it to work

Tried your examples and made multiple tries without any success. Just cant get it to work.
As far as I can tell, no error message.

Used chrome

Tried with installing with HACS, which only installs the honeycomb-menu.js and also tried manually and installed all source files.
No matter what, not working.

Honeycomb menu not showing

Hello all!

i'm a newbie and i'm struggling to get the Sian-lee honeycomb menu work...
I've installed through HACS everything: https://imgur.com/o1CThP5
Everything is loaded on resources: https://imgur.com/pZPUdGZ

But it seems i don't see any custom card when i create a new dashboard and if i try to create one manually i can't get it working: https://imgur.com/RxghiZh (tap action works, hold action doesn't)

This is the example code i'm using for my test:
https://pastebin.com/grHt8ji8
and this other test
https://pastebin.com/FGsQveLa

whatever i do, honeycomb menu doesn't show...
am i missing something?

XY Pad Question

Amazing service.. great flexibility. I'm trying to get the XY_pad to work. but having some difficulties.
I've installed via HACS and am running in Lovelace Storage mode (not yaml mode). are the x, y, x_percentage and y_percentage variable supported by default? I get buttons working no problem, but not having any luck with xy_pad.

 entity: light.downstairs_hallway_main_lights
          xy_pad:
            repeat: 500
            'y':
               invert: true
               service: light.turn_on
               service_data:
                 entity_id: light.downstairs_hallway_main_lights
                 brightness_step_pct: '[[[ return {{ y_percentage }} / 10; ]]]'

Limit the number of buttons

Hi,
Is it possible to limit of buttons that get displayed? The problem that I'm having is that when not using the 6 buttons, the unused hexagons ares still displayed
button2

It would also be great to auto or manual rearrange the position of the buttons depending on the number used
Thank you for your work, this is an awesome tool!

Feature requests

Hi, thanks a lot for your great work! Really love it!

I have some requests for a future release:

  • autoclose: autoclose if no button is pressed after a variable time
  • show name: show entity name or button name when hover with mouse
  • adaptive size: I am using honeycomb menu in my picture-element card. Works perfectly on a 24 inch monitor, but when I use from tablet or smartphone, buttons are too great, while picture element card is responsive.

Best regards!

Fail to call any xxx.toggle from the ui

hello!

HA can't call seem to call any xxx.toggle services from the ui, only from the developer tools. Only resolved if I uninstall honeycomb
error

works on developer tools:

service: light.toggle
data: {}
target:
  entity_id: light.leds_laura

doesn't work on ui generated button:

type: button
tap_action:
  action: call-service
  service: light.toggle
  data: {}
  target:
    entity_id: light.leds_laura

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.