cbulock / lovelace-battery-entity

A custom Lovelace component for displaying battery levels for battery entities
Apache License 2.0
199 stars 24 forks source link

Home Assistant 0.106 breaks battery card #14

Open stalakerob opened 4 years ago

stalakerob commented 4 years ago

Battery card not working under HASS 0.106

teddythanh commented 4 years ago

Yes. I have the same problem after upgraded to Hass 0.106. The card disappeared. Hic.

jhbcosta commented 4 years ago

Same problem here. After upgraded to 0.106 the card disappeared.

Andrey1One commented 4 years ago

Yes, not working under HA 0.106

ostap414 commented 4 years ago

Есть такая проблема

mattlward commented 4 years ago

Same here, but shares a view with another card and it took it out as well. The entire view is now blank.

borland502 commented 4 years ago

The problem was fixed by the mini-chart developer which seemed to suffer the same issue: https://github.com/kalkih/mini-graph-card/tree/0.106.x-compatibility

jarnose commented 4 years ago

Change line 64 from this._config = config; to this._config = JSON.parse(JSON.stringify(config));

liri commented 4 years ago

created pull request: https://github.com/cbulock/lovelace-battery-entity/pull/15

ostap414 commented 4 years ago

Change line 64 from this._config = config; to this._config = JSON.parse(JSON.stringify(config));

It didn't help.The card doesn't work.

Andrey1One commented 4 years ago

Change line 64 This don't help me too

liri commented 4 years ago

It did solve the problem on my instance..

teddythanh commented 4 years ago

Change line 64 This don't help me too

It didn't work for me also.

liri commented 4 years ago

Did you try cleaning your cache or change the js file version in the url you have inside lovelace.yaml?

ostap414 commented 4 years ago

The cache is cleaned. The version is 0.1.Not change.

ostap414 commented 4 years ago

01 The Configurator doesn't like this line 110

runnerfanspb commented 4 years ago

Yes, not working under HA 0.106

thehijacker commented 4 years ago

Change line 64 from this._config = config; to this._config = JSON.parse(JSON.stringify(config));

This fixed it for me.

ostap414 commented 4 years ago

Re-recorded again.Everything worked.

teddythanh commented 4 years ago

Re-recorded again.Everything worked.

Sorry but what you mean "re-recorded"? :) How you fixed it? Thank you :)

ostap414 commented 4 years ago

Deleted and created the card again

Re-recorded again.Everything worked.

Sorry but what you mean "re-recorded"? :) How you fixed it? Thank you :)

Deleted and created the card again

teddythanh commented 4 years ago

Finally I fixed it. Beside changing the code of line 64, we need to move the file battery-entity.js into www/community folder. Then change the yaml code in your ui-lovelace.yaml as below and it will work again.

resources:
   - url: /community_plugin/battery-entity.js?v=0.2
     type: module
ostap414 commented 4 years ago

Finally I fixed it. Beside changing the code of line 64, we need to move the file battery-entity.js into www/community folder. Then change the yaml code in your ui-lovelace.yaml as below and it will work again.

resources:
   - url: /community_plugin/battery-entity.js?v=0.2
     type: module

After updating 106.5 ,the card does not work

chilicheech commented 4 years ago

I just installed it using HACS and I'm getting this error:

Custom element doesn't exist: battery-entity.
type: 'custom:battery-entity'
entity: sensor.side_door_battery_level
RamonM77 commented 4 years ago

The card seems to break the complete page when multiple entities are included. A single entity however doesn't break the page, but does show a part of the problem. The border is missing when a single entity is shown. Hope this helps you to find a solution for this issue.

Example: battery-card

mattlward commented 4 years ago

Agreed, I am unable to add a secondary sensor as well. Also, install does not place the correct entry in the lovelace config.

richard-scott commented 4 years ago

I've also tried this on Home Assistant 0.106.6, and the resource didn't get added to lovelace when clicking this:

2020-03-12 14_11_07-Home Assistant

I have had to manually add this:

  - type: module
    url: /hacsfiles/lovelace-battery-entity/battery-entity.js

and once I did, it all worked!