secondaryinfo-entity-row
secondaryinfo-entity-row copied to clipboard
TypeError: null is not an object
getting this error in Safari:
Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this._wrappedElement.shadowRoot.querySelector')
and Chrome:
Uncaught (in promise) TypeError: Cannot read property 'querySelector' of null
at HTMLElement._updateElement (secondaryinfo-entity-row.js?v=0.4:38)
on a perfectly correctly performing config:
- type: custom:secondaryinfo-entity-row
entity: input_number.home_theater_lux
secondary_info: >
Mean living: [[ sensor.mean_living_lux.state ]] lx
- entity: binary_sensor.home_theater_lux_input
secondary_info: last-changed

there are no none objects in this config, as the image proves. Dont know if this started recently tbh, my setup is
HA OS 2020.12.2 secondaryinfo-entity-row: 0.4
thought it might have been the .state
suffix in the template, so took that out.
- type: custom:secondaryinfo-entity-row
entity: input_number.home_theater_lux
secondary_info: >
Mean living: [[ sensor.mean_living_lux ]] lx
oddly enough, the frontend remains correct, and the error stays.... using this on multiple entities in the config.
still very much alive, meanwhile on HA OS 2021.1.5.
Would anything else be needed to have a look/debug this?
please check this, it is still happening. meanwhile 2021.3.4
I have same errors. 2021.3.4
just keeping this alive, error persists on 2021.5/2021.6
Same here on 2021.7.1
not using this anymore, I moved to
- type: custom:slider-entity-row
entity: input_number.home_theater_lux
secondary_info: true
card_mod:
style:
hui-generic-entity-row$: |
.secondary::after {
content: "Mean living: {{states('sensor.mean_living_lux')}} lx"
}
@Mariusthvdb Didn't get that yet.
a. According to custom:slider-entity-row, there is no attribute secondary_info. b. If I want to use this in a standard entity row, secondary_info=true will not work as well. c, Here, you are only appending and not replacing, aren't you?
I used this before on a regular input_number entity. However, that has an issue with the decimal .0
which I really dont like, so I replaced all my cards with input_number to use the custom:slider-entity-row.
I guess you didnt try it, because if you would have, you could have seen it does work with the secondary_info: true
. As a matter of fact, this is what the master himself suggested I do...

without secondary_info line:
You are right. Didn't test it, because, as I need a normal entity row, I only checked, where the secondary_info=true came from and din't find it anywhere. And it is not working for standard row and then your work-arround is only appending and working in this special situation around the entity-row from Thomas and not for other places of this secondaryinfo-entity-row. Right? At least, I was only able to append, without further investigation of hiding the standard content, coming from entity-id, last-changed, last-updated, last-triggered, etc.
My question was only, because I wondered, if there is such an easy true=empty way everywhere, as in your example.
as said, not using the secondaryinfo-entity-row any longer. Also, I showed above the card_mod works on a regular entity input_number. It works on any entity:
- entity: person.marijn
secondary_info: true
card_mod:
style:
hui-generic-entity-row$: |
.secondary::after {
content: "Mean living: {{states('sensor.mean_living_lux')}} lx"
}

for the undocumented trick on secondary_info: true
, see https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/1729
O.k. Thank you. It's not working here. Cannot save this with secondary_info: true and only get a lot of LovelaceUI-errors instead. But perhaps, this is another problem. Will have this trick in mind for the future.
You did install card-mod? Because that would be the only reason for this not to work?
No, not the case. But have a look in card_mod-thread in the forum. There is something wrong (with the syntax check) in the editor. With secondary_info: tru or abc or whatever, it is working now, but most of the cases not with true.
well, what can I say. How can you even start to complain about a card-mod mod not working, if you haven't installed it.....
it works fine, I any config I use it for, as demonstrated. I don't use the editor, so am not bothered with that, using Yaml config. The solution was provided to me by Thomas himself, so Id rather call it an undocumented feature, not a hack.
Did you read anything? The "no" was the answer about "Because that would be the only reason for this not to work?". Of yource it is installed. Thought that should be clear. And where did I complain caord_mod? You will not see any word in this direction above. FYI: Ildar_Gabdullin sees the same error. So don't blame me here. And did you wrote, that you do not use the editor? No. So let's stop the discussion here, because, a I have written, it is not related to this card,
And by the way, as I have written before. The errors are not related to card_mod, but only the editor. Even without card_mod code or card_mod, you have the error, if you use "true/false" instead of any other text. Perhaps this help other one, who are facing the same problem as well.
Sure, whatever. You keep changing the subject, so I fear it’s not much use to others.
If this really was only about the editor, and in no way to this card (your words) , you have been writing off topic from the start ….
not using this anymore, I moved to
This was the start of the off-topic. I tried to stop this topic more than once and din't change the topic. The subject was, that you startet an off-topic solution, which is currently only working by chance in your situation, without editor, etc. All the rest was root-cause analysis and not the change of any furether subject.
PLONK
Hi, any update on this by any chance ?
Simone