Comments (4)
The principle of specifying the duration
parameter is uniform across multiple components in HA. It is always a single, inseparable period of time. If you and I begin to invent a new meaning for it, we will get a huge confusion in the minds of users. And this is very bad.
The only way that I see for solving your problem is to make two levels of calculation. In the first one, calculate the average value for the required period of the current day, and with the second sensor, calculate the average value of the average values for the week.
# Example configuration.yaml entry
sensor:
- platform: average
name: 'Daily Average Temperature During Sun'
start: '{{ now().replace(hour=19).replace(minute=0).replace(second=0) }}'
duration:
hours: 20
entities:
- sensor.temperature_measurement
- platform: average
name: 'Average Temperature During Sun'
duration:
days: 5
entities:
- sensor.daily_average_temperature_during_sun
from ha-average.
Good point! I'll give that a shot. I never thought about averaging the average sensors. :D
from ha-average.
This seems to be working well. I don't know if there's a good way to inspect the values that are recorded to "test" the calculation, but it looks right at a glance. Thanks again for the help!
from ha-average.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from ha-average.
Related Issues (20)
- Average Sensor is Unavailable due to Get_Instance error in log. HOT 5
- Possible Service Call To Reset An Average? HOT 1
- Configuration items HOT 1
- Add Interval Option HOT 3
- Data from the current month only HOT 1
- Looks like HA 2022.10 is breaking this component again HOT 1
- Fix hasn't worked: Average sensor still records lot of unnecessary attribute in the recorder that fills up the database quite fast HOT 1
- Issue in 2022.10.x Temperature HOT 4
- Shut be updated!? HOT 4
- Multiple Entity calculation timeout
- Sensor fails if temperature unit is "f" vs "F" HOT 1
- How to avoid error on HA Startup when entity is not available? HOT 1
- convert_temperature issue/error HOT 5
- Set interval using GUI
- Posibility restrict use only last value from dedicated scanning period.
- Problem with propagation of temperature unit when averaging a statistics helper
- Frequency of sensor update HOT 3
- Hi, the integration seems to break in HA 23.3.1 HOT 11
- This integration will stop working with Home Assistant 2023.4 HOT 8
- can't get average temperature over a 1 day period of last week HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-average.