I decided to try this and installed it from hacs. But after it is installed, hacs says it cannot be loaded. And Lovelace says battery state card (type: âcustom:battery-state-cardâ) is not found (of course, as hacs says it cannot be loaded)
Mine does the same, but I donât think it does it on all the sensors, just my Hue ones - I will check later and grab a screenshot if I donât forget!
What exactly do you mean that HACS syst it cannot be loaded? If you have lovelace yaml mode you need to add reference to the js file manually otherwise card code wonât be loaded and HACS will mark the card as red:
Card has dependency on Lit-Element but it getâs it from the HA native cards. This way card code is much smaller and there is no need of making external request to get it from the internet. So the answer is no - it doesnât have any dependencies which can be the reason of your problem.
Ok so we have two people seeing the below issue. Anyone else?
But still I have no idea what might be the reason of this problem. Same value is being processed to set the color and the icon.
Question mark icon is the default initial icon or when the state has a string value - not number. Maybe for some reason the icon is not updating when it should but looking at the logic in the code it cannot happen.
If this is the UI editor, keep in mind anytime you load HA in a browser or mobile as guess basically a browser app, it will show the question marks. Refreshing they donât so even though the main screen shows it loading the editor probably wouldnât as thatâs kind of a refresh. What I get when I first load is fine, then if I try to add another light or in this case the same light I get:
On you last screen it looks like the color of the SiPhone is not updated as well. Please open dev tools in the browser (F12) and check the Console tab if there are any errors related to the card. In case of the error the update process can brake and the result may be random (maybe that is the case here).
Probably a bug in HA because I noticed it was saying it could not load âbattery state carâ when I tried to add the card in lovelace. So I added one letter behind type: âcustom:battery-state-cardâ and removed the extra letter again and then it loaded.
Yes itâs usually always that way as evertime I go into HA itâs the first time so rarely refresh the page to fix it. Anyway, thanks, based on running out of ideas guess I can try another card or something. Not a super big deal but family is asking why the question marks when they look at the page so not idea.
You can give it a try with this one Lovelace Battery Entity Card. It doesnât have too many settings but it displays the battery states in similar way. If you try it out please let me know if it worked.
FYI: I have installed 0.113.3 and I have a repro in one case. This means that probably I should be able to fix it. It might be hard though - as you were saying it doesnât repro after refresh.
In HA v0.113 they have updated MDI icons - maybe something is messed up. Iâm pretty sure I havenâs seen such problem before. Neither anyone was reporting it.
@jriker1, @davefi Have you used this card before HA v0.113.X?
Yep, I started using it around 6th June, so that would have been around release 0.110 I believe. Iâve had the problem since I first installed it, so its not new to 0.113.
I also check (just forgot to post!) and mine does it on 2 out of 4 sensors. They are all Hue, 2 are Motion Sensors, 2 are Remotes. I have the ? on one of each, so it doesnât seem related to the device type either!
It is only doing it on the ones reading 100% though, I have never seen it on the other two sensors.
I also tried the live view, and that works fine - comes up immediately with all the correct icons, and no ? shown:
I really would like to help you guys and fix this issue but I cannot find any consistent repro. In my case it happened once on my dektop (Win + Chrome) and once on my iPad. Switching to different HA tab and back or refreshing the page fixes the issue and I cannot repro it any more (even if I re-launch the browser).
I have tried clearing web app storage in browser (in incognito mode) but it didnât help.
I need to find the way to consistently repro this issue