I'm seeing that mostly render() method is called before set hass(hass).
This means that current() (called from render) does not have this._hass to work upon, so it throws an error, and prevents the rendering of the subsequent html in render().
On making these two changes, my testing has shown good results.
In the beginning of render():
if (!this.config || !this._hass) return html``; // checking .config is also not a bad idea
With above, we want render() to be called again when set hass(hass) is called.
This can be done by watchingthis._hass property, and the following getter will do that:
Opening this PR for issue #73 described below:
I'm seeing that mostly
render()
method is called beforeset hass(hass)
. This means thatcurrent()
(called from render) does not havethis._hass
to work upon, so it throws an error, and prevents the rendering of the subsequent html inrender()
.On making these two changes, my testing has shown good results.
render()
:render()
to be called again whenset hass(hass)
is called. This can be done by watchingthis._hass
property, and the following getter will do that: