Notice due to lack of data

Do you actually know what the code Does ?, and what the “output/state” of those is ?

No, but sometimes ( When the Value is actually changed )
I:E You look in your wallet, you have 10 buck: Next time you want to check(next Update) You still have 10 Buck, Nothing have change NO Last_Change before you spend a dime

type: entities
entities:
  - entity: sensor.forecast_current_temperature
    secondary_info: last-updated

You REALLY should spend a little time reading the DOCS … Please ?

you are right something that does not change value and receives data continuously changes only in last-updated but does not change in last_changed, right?

That’s better! thank you!

{# Trastero Temperatura #}
{{
now() - states.sensor.battery_158d0001e89657.last_updated >= timedelta (hours=4)
and
now() - states.sensor.humidity_158d0001e89657.last_updated >= timedelta (hours=4)
and
now() - states.sensor.temperature_158d0001e89657.last_updated >= timedelta (hours=4)
}}



Can I make a list similar to this one showing the last update time of my sensors?

Seriously, I know you didn’t answer my question, whether you understand/Know what the Code, you got served does, that´’s fine with me
Then i provide you Hint’s,Tips, And links To The Most Basic INFO, EXAMPLES RTFM
Stop Asking more questions in this Topic
Start Reading The Docs, or Don’t ADD Another CARD, If you Dont want to read about What you DO, Or want to Do
It’s Kind of like the “Last_Changed VS Last_Updated”
You get “Updated” with Served “Solutions” But You never Change !, Before you start To Read

1 Like

the difference between Last_Changed VS Last_Updated I read it here:

about the code…

{# Trastero Temperatura #}
{{
now() - states.sensor.battery_158d0001e89657.last_updated >= timedelta (hours=4)
and
now() - states.sensor.humidity_158d0001e89657.last_updated >= timedelta (hours=4)
and
now() - states.sensor.temperature_158d0001e89657.last_updated >= timedelta (hours=4)
}}

is a TRUE or FALSE template.

That is, if any of the entities in the device has not been updated for more than 4 hours it will return a TRUE. It calculates this by taking the current time and subtracting it from the time of the last update.

There are 3 conditions joined by an AND so that if one of them is FALSE it returns FALSE.

So the entire template will only be true when all the data has not been updated for more than 4 hours.

They are sensors that must be updated several times per hour, I use this template so that HA warns me that something bad happens with any sensor.

The problem comes from the fact that I have 40 sensors in the same automation, and all of them return the same warning message. And once I get the warning on the mobile that there is a sensor that does not work, I do not know which of the 40 is. So I need to create a panel to see which of the 40 I have is the one that does not update.

that’s why I was asking if I can make a list similar to this one showing the last update time of my sensors?

any help on how to display that view with the last update date?

nobody knows how to do it?

Looks like you’re using my automation that I originally posted

If you see I’m setting the trigger id and using that in the notification, enabling me to see which entity failed

1 Like

a doubt related to this, why can I use this code with some entities and not with others, that is to say:

when I apply it to the entity binary_sensor.10004998a5_9 which I check that it exists and has these fields

it gives me this error and does not let me save the automatism:

Message malformed: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'a5_9') for dictionary value @ data['action'][10]['if'][0]['conditions'][0]['value_template']

@armedad How can it be that if there is last_updated and last_changed in the developer part, I can’t use them and I get this error?

type: entities
entities:
  - entity: binary_sensor.10004998a5_9
    secondary_info: last-changed

post the whole yaml for that automation. please be sure to use proper formatting.

sorry, I had not seen your code, it is correct, it shows the entity and below it the time of the last change.

But I don’t understand why in the rest I can call “last_changed” like this:

{{states.sensor.temperature_158d0001e89657.last_updated}}

and in this one I can’t and I have to call it like this:


type: entities
entities:
  - entity: binary_sensor.10004998a5_9
    secondary_info: last-changed

Could I call it from a template and only show the time? something like this?

type: custom:mushroom-title-card
title: test
subtitle: |-
  {{states.sensor.temperature_158d0001e89657.last_updated}}

  {{states.binary_sensor.10004998a5_9.last_updated}}

when you’re dealing with the front end, not all front end cards accept templates. in fact the default ones generally don’t.

mushroom-title-card does:

but you had asked about getting an error in an automation i think? when you posted this:

if you want help figuring out why that is erroring out, please post that yaml that’s erroring. i don’t think the things you just posted were the ones causing the error from that screenshot, right?

1 Like

yes that should work

These are my tests. In the first image we see how I try to call last_updated from 2 entities. As you can see the 10004998a5_9 does not work.

type: custom:mushroom-title-card
title: Sensores RF443 test
subtitle: |-
  {{states.sensor.temperature_158d0001e89657.last_updated}}

  {{states.binary_sensor.10004998a5_9.last_updated}}

But if I can call last_updates of this entity 10004998a5_9 like this

type: entities
entities:
  - entity: binary_sensor.10004998a5_9
    secondary_info: last-updated

I mean, the entity 10004998a5_9 does not work in template? why?

how can I call the secondary information of an entity such as this

  - entity: binary_sensor.10004998a5_1
    secondary_info: last-updated

from a template??

I have tried this and it doesn’t work, is there any other method?

  {{states.binary_sensor.10004998a5_9.last_updated}}

@armedad Do you know?

this question is quite different than the original. you should start a new thread w/ your question.

the format generally looks right. i have a guess as to the issue, but to be honest, it’s just a guess…

new post here: Call the secondary information of an entity

thanks