I need to register an event in home assistant for a particular entity.
the entity is sensor.tv_voltage and I want to trigger an event which sends
the state and the timestamp every 5 minute and how can I do this can someone explain this to me please. If yaml is involved how can I write and
configure it. Also the problem is this sensor reports its state in milli seconds
and it is too much data and I want to gather data with listening to a custom
event which gives that data in 5 minutes period. Can someone help me on this.
Thanks.
But less about the specifics and what are you ACTUALLY trying to accomplish. Natural language.
I want to…? Send a report to my so? Push the data over to another system as a trigger?
It will help people guide you through identifying what data you need how it needs to be manipulated and how tk send it and store it. (those are your steps btw you just need to I’d the what and how in each step now.)
Also another trap new HA folks get into is thinking on clocks. Ha is designed to run on events.
Thing happens data exists event happened do something.
So in your ‘I want to’ think I terms of - when this happens inwant it to… And avoid the every x minutes clock scenarios
And finally m this is a user community. Not a support desk. We’re just like you.
I’m currently working on inserting live updates from sensor.tv_voltage into our database. However, I’ve noticed that the sensor updates very frequently—potentially multiple times per second—which results in a large volume of data and rapid database growth.
What I’m really trying to achieve is to only insert a record when the sensor state changes, and ideally, only if it remains stable for a few minutes (e.g., 5 minutes or more), instead of capturing every millisecond-level change.
Is there a way to do this using a Home Assistant event or automation trigger? If so, could you provide an example of how to implement this kind of event-based filtering?
But it changes a lot. So maybe sensor changes and new value is >= 5% of old value (see what we’re doing, ok yeah the trigger we usually use is noisy so choke more… Keep choking the condition until you get EXACTLY what you want - or close enough) now you have the event and data
What do we want to do with it? (see how this builds in the automation editor)
So your trigger can be on the power / current as long as you add a filter. Then the filter keeps the flood back.