anyone seeing this too: https://github.com/custom-cards/secondaryinfo-entity-row/issues/40
TypeError: null is not an object (evaluating 'this._wrappedElement.shadowRoot.querySelector')
seems new to me, (after updating to HA 2020?) though I can not be sure
ok so here we are, HA2021.3.4 and this is still happening on a fairly simple config like:
- type: custom:secondaryinfo-entity-row
entity: input_number.front_room_lux
secondary_info: >
Front room: [[ sensor.front_room_sensor_light_level ]] lx
- entity: binary_sensor.front_room_lux_input
secondary_info: last-changed
#also tried on 1 line, and with `.state` and without unit
- type: custom:secondaryinfo-entity-row
entity: input_number.high_lux
secondary_info: 'Mean indoor: [[ sensor.mean_indoor_lux.state ]]'
the line 38:
await this._wrappedElement.shadowRoot.querySelector("hui-generic-entity-row");
apparently is not correct, or thinking the object is Null:
while it apparently isnt, because the frontend is showing just fine, in all variations…
So what’s up with this hui-generic-entity-row
??
HA 2021.6 meanwhile, and no prospect of the author changing the card probably. I did manage to writeup a PR, so instructed by Thomas, to remove the card-tools requirement. see the issue post in the repo
card-tools now can do this too, and might be the better way forward:
- type: custom:secondaryinfo-entity-row
entity: input_number.front_room_lux
secondary_info: >
Front room: {{states('sensor.front_room_sensor_light_level')}} lx
- entity: input_number.high_lux
secondary_info: true
card_mod:
style:
hui-generic-entity-row$: |
.secondary::after {
content: "Mean indoor: {{states('sensor.mean_indoor_lux')}} lx"
}
I am willing to update the card. As mentioned in other threads, any issues did not appear to be widespread, and removing the dependency was beyond my skill set and current interests. So I wasn’t interested in making the change myself. However, Pull Requests are always welcome, and I appreciate you taking the time to work with Thomas to propose a solution - that’s how open source should work!
That being said, I’m am going to take some time to review the changes and test before releasing.
Thank you for your contribution!
great, please connect if I made a mistake
btw, my PR only removes card-tools as a requirement, it doesn’t fix the null error on the shadowRoot.querySelector. I still cant find the cause for that, as the path seems alright…
about the PR: it would have been even better to use lovelace-card-tools/templates.js at 477f3d4eeb5c70cab047d418d19afb6b0f07bf49 · thomasloven/lovelace-card-tools · GitHub and subscribe to the template, so changes get pushed instead of having to poll for them (dixit Thomas) but that was too big of a change for me right now…
maybe later, Or maybe you can see for yourself.
Any news regarding the error?
I am still having it…
Don’t know Ildar, I don’t use the card anymore, sorry.