Skip to content

Not a bug but understanding problem of count #263

@skycryer

Description

@skycryer

System Health details

System Information

version core-2025.2.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.1
os_name Linux
os_version 6.6.73-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4993
Installed Version 2.0.5
Stage running
Available Repositories 1532
Downloaded Repositories 40
Home Assistant Cloud
logged_in true
subscription_expiration 30. August 2025 um 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled false
cloud_ice_servers_enabled true
remote_server eu-central-1-5.ui.nabu.casa
certificate_status ready
instance_id ade0e88f95354371bc796b58b6881508
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.2
update_channel stable
supervisor_version supervisor-2025.02.0
agent_version 1.6.0
docker_version 27.2.0
disk_total 1833.1 GB
disk_used 976.4 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (20.0.0), Apache2 (2.11.0), File editor (5.8.0), Matter Server (7.0.0), Mosquitto broker (6.5.0), Samba share (12.4.0), Scrypted (v0.130.1-noble-full), Studio Code Server (5.18.1), Z-Wave JS UI (3.20.0), nzbget (0.3.0), openWakeWord (1.10.0), Frigate (0.15.0), Double Take (1.13.11.8), ESPHome Device Builder (2024.12.4), Piper (1.5.2), Whisper (2.4.0), Silicon Labs Multiprotocol (2.4.5), InfluxDB (5.0.1), Grafana (10.2.2), Get HACS (1.3.1), Immich (1.125.7), Postgres 15 (15.7-16), Nginx Proxy Manager (1.0.1), DeepStack Server (CPU) (2022.01.1), CodeProject AI.Server (CPU) (2.5.1), Vaultwarden (Bitwarden) (0.24.0), MariaDB (2.7.2), Zigbee2MQTT (2.1.1-1), Music Assistant Server (2.3.6)
Dashboards
dashboards 4
resources 22
views 45
mode storage
Network Configuration
adapters lo (disabled), enp3s0 (enabled, default, auto), hassio (disabled), docker0 (disabled), vethd570f9c (disabled), veth9e65cc4 (disabled), vethc446e55 (disabled), vetha0f0e1d (disabled), vethec5a956 (disabled), veth7f87b98 (disabled), veth418c009 (disabled), veth4a36930 (disabled), veth194b5bd (disabled), veth3989628 (disabled), veth4f0a0b9 (disabled), vethdffb512 (disabled), wpan0 (disabled), veth2c51430 (disabled), vethdb7aaf8 (disabled), vethac8f856 (disabled), vethca54885 (disabled), veth6c04164 (disabled), veth973e561 (disabled), vethedb7c03 (disabled), veth5161566 (disabled), veth5656529 (disabled), veth209bfea (disabled), veth81c1a3e (disabled), vetha0b38b9 (disabled), vethb439db3 (disabled)
ipv4_addresses lo (127.0.0.1/8), enp3s0 (192.168.1.2/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), vethd570f9c (), veth9e65cc4 (), vethc446e55 (), vetha0f0e1d (), vethec5a956 (), veth7f87b98 (), veth418c009 (), veth4a36930 (), veth194b5bd (), veth3989628 (), veth4f0a0b9 (), vethdffb512 (), wpan0 (), veth2c51430 (), vethdb7aaf8 (), vethac8f856 (), vethca54885 (), veth6c04164 (), veth973e561 (), vethedb7c03 (), veth5161566 (), veth5656529 (), veth209bfea (), veth81c1a3e (), vetha0b38b9 (), vethb439db3 ()
ipv6_addresses lo (::1/128), enp3s0 (2003:e1:e712:6600:f727:138b:c270:5a23/64, fe80::d7a:4dbb:f84b:d6c8/64), hassio (fe80::42:56ff:fef8:94a4/64), docker0 (fe80::42:ccff:fe18:e4e7/64), vethd570f9c (fe80::e0b1:3aff:fec0:3fb0/64), veth9e65cc4 (fe80::1019:b8ff:fea5:aa46/64), vethc446e55 (fe80::70b4:89ff:fe48:8f35/64), vetha0f0e1d (fe80::f035:edff:fedc:2855/64), vethec5a956 (fe80::701f:bcff:fee7:15d3/64), veth7f87b98 (fe80::1c0b:f0ff:fe1e:3bc/64), veth418c009 (fe80::8451:20ff:fe83:3860/64), veth4a36930 (fe80::707b:26ff:fe31:a900/64), veth194b5bd (fe80::9016:6eff:fe8f:d630/64), veth3989628 (fe80::d8ef:fbff:fe60:887e/64), veth4f0a0b9 (fe80::4cef:3dff:fe41:10c6/64), vethdffb512 (fe80::f802:84ff:fe69:29f2/64), wpan0 (fd21:8344:d530:a5d4:0:ff:fe00:fc11/64, fdbd:5582:1d8:1:e4d0:89a3:5ae0:21eb/64, fd21:8344:d530:a5d4:0:ff:fe00:fc10/64, fd21:8344:d530:a5d4:0:ff:fe00:fc38/64, fd21:8344:d530:a5d4:0:ff:fe00:fc00/64, fd21:8344:d530:a5d4:0:ff:fe00:9c00/64, fd21:8344:d530:a5d4:9cf2:b5cd:1913:7d8d/64, fe80::5817:fc4:6486:577f/64), veth2c51430 (fe80::4072:dfff:fe71:cd0f/64), vethdb7aaf8 (fe80::5895:61ff:fe17:7efe/64), vethac8f856 (fe80::d863:cff:fe56:3d2/64), vethca54885 (fe80::2897:aff:fe81:d641/64), veth6c04164 (fe80::fcf5:e1ff:fef4:125a/64), veth973e561 (fe80::7402:1eff:fea8:e7c/64), vethedb7c03 (fe80::d444:9bff:fe1a:c654/64), veth5161566 (fe80::b4ef:e7ff:fe25:f060/64), veth5656529 (fe80::ccdf:55ff:fe47:6322/64), veth209bfea (fe80::b4:2aff:fe6d:5707/64), veth81c1a3e (fe80::c8f8:dfff:fe17:3962/64), vetha0b38b9 (fe80::b0a7:57ff:fe30:f2ae/64), vethb439db3 (fe80::542d:11ff:fe62:317d/64)
announce_addresses 192.168.1.2, 2003:e1:e712:6600:f727:138b:c270:5a23, fe80::d7a:4dbb:f84b:d6c8
Recorder
oldest_recorder_run 27. Januar 2025 um 18:35
current_recorder_run 12. Februar 2025 um 11:18
estimated_db_size 1950.51 MiB
database_engine sqlite
database_version 3.47.1
Spotify
api_endpoint_reachable ok

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

I have a sensor that sums up from water daily sensor for the year. SO I have the water used data for the whole year. This sensor started on 2025-02-08 at around 11:00 am.

So I added the config like this

- platform: average
  name: 'Average water consumtion'
  start: '{{ now().timestamp() | timestamp_custom("%Y-") }}02-08 11:00:00+01:00'
  end: '{{ now()}}'
  entities:
    - sensor.wasser_yearly

At the moment the sensor.water_yearly is around 1.224 m3, we have now 2025-02-12,so around 4 days. But the average sensor shows a value of 0.72 m3. But it should something around 0.3 m3 if I am not wrong. So maybe the time of counting is wrong? how should it be changed so it gets more to the correct value? Calculating once per day should be correct I think.

Reproduction steps

  1. create an water sensor with some days of data
  2. create average sensor starting on date of creating of water sensor and end as now()
  3. calculated value will be wrong

Debug logs

nothing

Diagnostics dump

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions