I have an ESP that reads data from my inverter every 5 seconds. I want to do this with this frequency because I want to read the active power (PAC) in almost real-time.
But this also means that all other sensors are updated every 5 seconds in Home Assistant. I think this will generate a lot of log entries in the database? So can I configure the sensors in ESPHome to update only once per minute? Or do I really need to work with two different update intervals in my code?
This, “update_interval: 60s”, is not working as I expected.
Sensors are updated by either the default interval or something else if you’ve manually configured the interval.
There shouldn’t be any default 5 second sensor update interval so, it sounds like you’ve added some kind automation or script that does 5s updates. You need to remove that piece of code and then your individual update interval will work.
All the sensor data available from their meter is queried in one go and they want a 5s interval for only one of the sensors. So they have to use 5s as the update interval and throttle the other sensors.
Ya, I understand that. What isn’t making sense is where this 5s update interval is coming from currently and isn’t allowing entity specific update_interval to work. It sounds like OP has set a 5s update_interval on the primary sensor and it is applying that to all other related sensor entity’s below it which would cause his update_interval to not work when he tries.
The one thing that I do know is that it is really helpful when people include all of the config or at least all of the senor/s related to this inverter they are asking about instead of deciding which parts of the config they think we need to see and then make the rest of it a big guessing game. Seeing the full context of the code is kinda helpful.
Also, there’s no need to curse and scream at me like the way you did!
I just wanted to add a quick follow-up.
I didn’t post the entire code to keep the question concise.
It’s a piece of code that reads the RX every 20ms (and optionally responds) and sends a request on the TX every 5s. The response with the correct length is processed and handled in the sensors.
Oh cool!! Look what trying to be concise or as i prefer to call it, “deciding what information people can see” and it’s a good way to make people confused about mysterious 5s updates and next thing you know, your post has turned into you now gettng questions instead of answers and it just ends up dragging things out longer than necessary and holy flipping crap you seriously typed out a paragraph trying to explain what the top secret code does instead of just just flipping posting it as if what, people are to dumb to understand it and need it explained to them?? All of this coulda simply been a non issue had it been available in the OP and this applies to all future posts/questions not just this one. Please dont ask for assistance and then simultaneously make a unilateral decision of what code/details you think are what people need and they will get nothing more, even though it is to your benefit! Its always always always better to error on the side of :more" because, more is always better than less details and that way we can see all relevant details and decide for our big boy selves which bits are important and ignore the ones that aren’t!
Hey, who really knows though!! Maybe im just weird because if i posted a question then i sure as shit know that i want to see peoplel responding with useful tips or answers instead of them spamming me with their own questions.
Im not mad at you or anyone else! Well, unless it was one you two that didn’t flush the toilet and left a #2 in there soaking!!! Just be aware! I’ve got my eyes on you, you porcelain pirate!!