Dynamic sensor updates on value change #112
Replies: 6 comments 2 replies
-
Hi there, I'm glad to hear that you find the project useful. It should be possible to do the following, but I've not the time at the moment to test it. I'm not entirely sure if with a HA text_sensor wether the data is pushed to the device regardless though. If this is the case and the issue is that the screen is constantly updating. You can remove Let me know how you get on and I will find some time to take a look if you still need help 👍 Rob |
Beta Was this translation helpful? Give feedback.
-
Found something that allowed me to adjust the default refresh interval: https://github.com/BigBobbas/ESP32-S3-Box3-Custom-ESPHome/blob/main/s3b.yaml#L153-L156 Since I am mostly sitting on the solar dashboard I built this is probably sufficient. Removed the If there is a better solution - or something cleaner - let me know! |
Beta Was this translation helpful? Give feedback.
-
Hi there , If you can describe exactly what it is you would like to happen, I can take a look and see if we can come up with the best configuration for your requirement |
Beta Was this translation helpful? Give feedback.
-
Hey @BigBobbas , Thanks for your replies! I was indeed looking more into this since the battery of the Box lasts less than 24h when running with HA updates all the time. Not a huge issue since it would sit on my desk but I am sure others will not find this acceptable when placing it in a remote location.
Using a Quick EDIT: Looks like the only sensor that has an
EDIT 2: Yes, I removed the on-update and wen't back to an update interval of 15s - lower than before but still better than 2s. Good enough to see some updates happening sometimes but I mostly glance at it anyway. EDIT 3: Went back to |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I dropped this approach since there are no benefits in updating on sensor changes. Battery won't last longer and just reducing the overall update interval for the screen works just fine. I will close this questions since I don't think there even is a great answer to it! |
Beta Was this translation helpful? Give feedback.
-
Hey Community,
First off, great work on this project! My Box was sitting around most of the time since I was missing some additional features out of the box like displaying sensor values. This project finally allowed me to do just that!
Question that came up after implementing a simple page for Solar Production and Power Consumption:
How can I refresh the sensor data from Home Assistant only when I am actually looking at the page for the sensors? I re-purposed the
template_page
assolar_page
and added the sensors to thetext_sensors
block and the details onto that page (see code below). Now everything seems to work just fine but after installing this I also noticed how often the data is updated (once for each sensors value change). Of course I could just limit it to the consumption sensor since it will certainly always update but that felt wrong. Especially since the sensors constantly update in the background.Q: How can I either throttle the updates on the sensor, disable updates of sensor values unless I am in the page or otherwise reduce the amount of updates?
Any help is appreciated 😄
Page
Sensor
Beta Was this translation helpful? Give feedback.
All reactions