Custom Lovelace Card - Homekit style card

You shared the error is that the whole error? does it not give the object name?

@Mirko_Genovese how did you load the card under resources: in your lovelace?

url: /local/js/homekit-panel-card.js
  • type: module
Cannot assign to read only property 'useTemperature' of object '#<Object>'

enableColumns: false
entities:
  - entities:
      - entity: group.motion_indoors
        icon: 'mdi:run'
      - entity: group.motion_outside
        icon: 'mdi:run'
      - entity: light.all_lights_inside
        hold_action:
          action: navigate
          navigation_path: /lovelace/belysning_mobile
        icon: 'mdi:lightbulb'
        tap_action:
          action: call-service
          service: light.toggle
          service_data:
            entity_id: light.all_lights_inside
      - entity: light.all_lights_outside
        hold_action:
          action: navigate
          navigation_path: /lovelace/belysning_mobile
        icon: 'mdi:lightbulb'
        tap_action:
          action: call-service
          service: light.toggle
          service_data:
            entity_id: light.all_lights_outside
      - entity: alarm_control_panel.hem_larm
        hold_action:
          action: navigate
          navigation_path: /lovelace/alarm
        icon: 'mdi:shield-lock'
        offIcon: 'mdi:shield-off'
        offStates: disarmed
        tap_action:
          action: navigate
          navigation_path: /lovelace/alarm
    title: Enheter
  - entities:
      - entity: input_boolean.tv_mode_vardagsrum
        icon: 'mdi:movie'
      - entity: input_select.house_mode_select
        icon: 'mdi:weather-night'
        popup:
          buttons:
            - color: '#FFF'
              icon: 'mdi:lightbulb-on'
              name: Kväll
              value: Kväll
            - color: '#FFF'
              icon: 'mdi:lightbulb-on'
              name: Dag
              value: Dag
            - color: '#FFF'
              icon: 'mdi:lightbulb-on'
              name: Natt
              value: Natt
            - color: '#FFF'
              icon: 'mdi:lightbulb-on'
              name: Morgon
              value: Morgon
            - color: '#FFF'
              icon: 'mdi:lightbulb-on'
              name: Städning
              value: Städning
          entities:
            - input_select.house_mode_select
          entity_value_path: state
          icon: 'mdi:weather-night'
          noActiveState: '-'
          service: input_select.select_option
          service_data:
            entity_id: this
            option: value
          type: 'custom:switch-popup-card'
      - entity: group.someone_at_home
        icon: 'mdi:account-check'
        offIcon: 'mdi:account-off'
    title: Automation
home: true
rules: >
  {% if "disarmed" in states('alarm_control_panel.hem_larm') %} <li>Larmet är: 
  avlarmat</li> {% endif %}

  {% if "triggered" in states('alarm_control_panel.hem_larm') %} <li>Larmet
  larmar</li> {% endif %}

  {% if "armed_home" in states('alarm_control_panel.hem_larm') %} <li>Larmet
  är:  hemmalarmat</li> {% endif %}

  {% if "armed_away" in states('alarm_control_panel.hem_larm') %} <li>Larmet
  är:  bortalarmat</li> {% endif %}

  {% if "armed_night" in states('alarm_control_panel.hem_larm') %} <li>Larmet
  är:  nattlarmat</li> {% endif %}

  <li>Tempratur ute: {{states('sensor.temperature_framsidan') | round(1) }}
  °C</li>
statePositionTop: true
title: Hemma
titleColor: '#FFF'
type: 'custom:homekit-card'
useBrightness: true
useTemperature: false

Thanks for the pro-activeness @DBuit - your work is very much appreciated

2 Likes

Hello everyone,

i made a new card it kinda works nice with this card so just wanna share it.
It is a sidebar card to add a custom sidebar here you can find the post on the forum: Lovelace: custom sidebar card

:smiley:

3 Likes

Any solution to this error? I upgraded to HA 0.106.0b4 ,but still get the error “Cannot assign to read only property ‘useTemperature’ of object ‘#’”. @DBuit

1 Like

hi

is it possible to share your code pleae, i love the color of your tiles, how did you do this?

1 Like

Anyone knows how i can use the transparant tiles when not used, when light is on, it should go white or grey

Here’s a snipe of my code

cards:
  - type: "custom:homekit-card"
    home: false
    title: Lichten
    enableColumns: true
    rows:
      - row: 1    
        columns:
          - column: 1
            tileOnRow: 5
            entities:
              - title: Inkom
                popup:
                  type: custom:light-popup-card
                entities:
                  - entity: light.inkom
                    name: Plafondspots
                    icon: mdi:coach-lamp
          - column: 2
            tileOnRow: 5
            entities:
              - title: Slaapkamer
                popup:
                  type: custom:light-popup-card                      
                entities:
                  - entity: light.slaapkamer
                    name: Spots              
                  - entity: light.nachtlampje_mira
                    name: Nachtlampje mira
                    icon: mdi:coach-lamp

thx in advance

I’ve just updated to 0.106.0 and getting the following error

image

Removed all entities except one and getting the same error

image

1 Like

I have exactly the same problem since updating to 0.106

1 Like
create-element-base.ts:64 homekit-card TypeError: Cannot add property useTemperature, object is not extensible
    at HTMLElement.setConfig (homekit-panel-card.js:7)
    at o (create-element-base.ts:61)
    at a (create-element-base.ts:80)
    at l (create-element-base.ts:131)
    at Hi (create-card-element.ts:88)
    at HTMLElement.value (hui-panel-view.ts:55)
    at HTMLElement.value (hui-panel-view.ts:34)
    at HTMLElement.performUpdate (updating-element.ts:704)
    at HTMLElement._enqueueUpdate (updating-element.ts:653)
1 Like

Hello everyone,

Just release v0.4.7 with a fix for the hass 0.106 problem!
@Fredamn76, @slipx06, @mkhattab

Thanks for the quick response @DBuit
That specific error is but I now have this

Hello @DBuit,

I’ve just updated to 0.4.7 but the error persists.

Error on Chrome:
hpc1
Error on iOS App:
hpc2

After the update I restarted HA and cleared the browser cache.

@LKrisM, @mkhattab,

you guys still have the error? i had to refresh a few times before it was gone probably cache and stuff maybe try this (add the ?v=):

- url: /community_plugin/Homekit-panel-card/homekit-panel-card.js?v=0.4.7
    type: module

Just to make sure cache is no problem.

Yes I tried both these things. Not working in iOS app or 2 different browsers so it’s not a version or cache issue

Can you check if HACS really updated the card in /config/www/community/Homekit-panel-card?
And if so can you open the .js file and search for config. useTemperature and let me know if it is in the code?

Can you copy the error you have from the developer console of the browser for me?

Hi @DBuit,

same here, tried both but no change.

Yes, HACS did update the files and I was able to find config.useTemeperature in the .js file.

Error in developer console of Chrome:

Sorry wrong instruction can you find in the code this config.useTemperature = the problem is in new update i can change config variable in my code…

Maybe reinstall the card in HACS?