Hi,
I don’t understand the availability in my template sensor.
How come that the sensor still reports 0 in a few moments (see the screenshot below), when the availability in the template states that it should not report when it’s 0?
availability: >-
{{ state_attr('sensor.data', 'rows')['impressions'] is not none }}
with your example somehow I get this message: UndefinedError: 'list object' has no attribute 'impressions'
but when I look up the sensor in question, the result is:
I just looked at your last error message and I noticed rows was a list. Is it always populated or is it sometimes empty? Are you always getting the first item in the list?