Skip to content

Cannot add property tap_action, object is not extensible #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
grittisemper opened this issue Mar 11, 2020 · 4 comments
Open

Cannot add property tap_action, object is not extensible #16

grittisemper opened this issue Mar 11, 2020 · 4 comments

Comments

@grittisemper
Copy link

Hi,
after the update to HA 0.106.6 I receive the following error: Cannot add property tap_action, object is not extensible

Screenshot 2020-03-11 at 14 18 33

Can you help me to resove this issue?

My configuration is the following:

                type: entities
                title: {{name}}
                show_header_toggle: false
                entities:
                  - type: custom:layout-card
                    layout: horizontal
                    column_num: 2
                    cards:
                      - type: 'custom:flex-horseshoe-card'
                        entities:
                          {% if room_sensor %}
                          - entity: sensor.{{ room_sensor }}_battery
                            decimals: 0
                            unit: '%'
                            icon: mdi:gauge
                          - entity: sensor.{{ room_sensor }}_temperature
                            decimals: 1
                            unit: '°C'
                          - entity: sensor.{{ room_sensor }}_humidity
                            decimals: 0
                            unit: '%'
                            icon: mdi:water-percent
                          - entity: sensor.{{ room_sensor }}_pressure
                            decimals: 0
                            unit: 'hPa'
                            icon: mdi:gauge
                          {% endif %}
                          {% if external_sensor %}
                          - entity: sensor.{{ external_sensor }}_battery_level
                            decimals: 0
                            unit: '%'
                            icon: mdi:gauge
                          - entity: sensor.{{ external_sensor }}_temperature
                            decimals: 1
                            unit: '°C'
                          {% endif %}
                        show:
                          horseshoe_style: 'lineargradient'
                        layout:
                          {% if room_sensor %}
                          hlines:
                            # A horizontal line. Not connected to an entity
                            - id: 0
                              xpos: 50
                              ypos: 42
                              length: 40
                              styles:
                                - stroke: var(--primary-text-color);
                                - stroke-width: 5;
                                - stroke-linecap: round;
                                - opacity: 0.7;
                          {% endif %}
                          states:
                          {% if room_sensor %}
                            # States 0 refers to the first entity in the list, ie index 0
                            - id: 0
                              entity_index: 1
                              xpos: 50
                              ypos: 34
                              styles:
                                - font-size: 2em;
                            # States 1 refers to the second entity in the list, ie index 1
                            - id: 1
                              entity_index: 2
                              xpos: 40
                              ypos: 57
                              styles:
                                - text-anchor: start;
                                - font-size: 1.5em;
                            # States 2 refers to the third entity in the list, ie index 2
                            - id: 2
                              entity_index: 3
                              xpos: 40
                              ypos: 72
                              styles:
                                - text-anchor: start;
                                - font-size: 1.5em;
                          icons:
                            # Icons 0 refers to the second entity in the list, ie index 1
                            - id: 0
                              entity_index: 2
                              xpos: 37
                              ypos: 57
                              align: end
                              size: 1.3
                            # Icons 1 refers to the third entity in the list, ie index 2
                            - id: 1
                              entity_index: 3
                              xpos: 37
                              ypos: 72
                              align: end
                              size: 1.3
                          {% endif %}
                          {% if external_sensor %}
                            - id: 0
                              entity_index: 1
                              xpos: 50
                              ypos: 60
                              styles:
                                - font-size: 3em;
                          {% endif %}
                        # Scale set to -10 to +40 degrees celcius
                        horseshoe_scale:
                          min: 0
                          max: 100
                        # color stop list with 10 colors defined in the theme. With the `lineargradient` fill style, only the
                        # first (16:) and last (25:) colors are used. The thresholds are ignored with this setting.
                        color_stops:
                          00: '#D60036'
                          10: '#CD1930'
                          20: '#C4322B'
                          30: '#BC4B25'
                          40: '#B36420'
                          50: '#AB7D1B'
                          60: '#A29615'
                          70: '#99AF10'
                          80: '#91C80A'
                          90: '#88E105'
                          100: '#80FA00'
                        style: |
                          ha-card {
                            box-shadow: var(--theme-card-box-shadow);
                          }

Thank you very much in advance

@jojoro1
Copy link

jojoro1 commented Mar 12, 2020

I have the same problem. Any progress?

@ner0tic
Copy link

ner0tic commented Mar 13, 2020

See the Pull Request (14) for the fix.

@HFsi
Copy link

HFsi commented Mar 16, 2020

Anyone get it to work?

@Lau-ie
Copy link
Contributor

Lau-ie commented Mar 16, 2020

Yup, I've have it working (still). Steps are:

  • modify the JS file to match the JS file in the pull request
  • add
tap_action:
  action: more-info

to every entity in the horseshoe config

  • remove the gzipped version of the js file in your www/community/flexible-horseshoe-card folder
  • restart homeassistant

Then possibly add '?v=1* to the end of the reference link in your ui-lovelace.yaml to force the cache to pick up the new file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants