System Health details
System Information
version |
core-2024.7.2 |
installation_type |
Home Assistant OS |
dev |
false |
hassio |
true |
docker |
true |
user |
root |
virtualenv |
false |
python_version |
3.12.4 |
os_name |
Linux |
os_version |
6.6.33-haos |
arch |
x86_64 |
timezone |
Europe/Berlin |
config_dir |
/config |
Home Assistant Community Store
GitHub API |
ok |
GitHub Content |
ok |
GitHub Web |
ok |
GitHub API Calls Remaining |
4757 |
Installed Version |
1.34.0 |
Stage |
running |
Available Repositories |
1651 |
Downloaded Repositories |
16 |
Home Assistant Cloud
logged_in |
false |
can_reach_cert_server |
ok |
can_reach_cloud_auth |
ok |
can_reach_cloud |
ok |
Home Assistant Supervisor
host_os |
Home Assistant OS 12.4 |
update_channel |
stable |
supervisor_version |
supervisor-2024.06.2 |
agent_version |
1.6.0 |
docker_version |
26.1.4 |
disk_total |
30.8 GB |
disk_used |
13.8 GB |
healthy |
true |
supported |
true |
host_connectivity |
true |
supervisor_connectivity |
true |
ntp_synchronized |
true |
virtualization |
kvm |
board |
ova |
supervisor_api |
ok |
version_api |
ok |
installed_addons |
NGINX Home Assistant SSL proxy (3.9.0), Zigbee2MQTT (1.39.0-1), File editor (5.8.0), Mosquitto broker (6.4.1), Advanced SSH & Web Terminal (18.0.0) |
Dashboards
dashboards |
3 |
resources |
1 |
views |
1 |
mode |
storage |
Miele
component_version |
2024.5.0 |
reach_miele_cloud |
ok |
Recorder
oldest_recorder_run |
July 5, 2024 at 19:13 |
current_recorder_run |
July 15, 2024 at 02:41 |
estimated_db_size |
435.22 MiB |
database_engine |
sqlite |
database_version |
3.45.3 |
Checklist
- [X] I have enabled debug logging for my installation.
- [X] I have filled out the issue template to the best of my ability.
- [X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
- [X] This issue is not a duplicate issue of any previous issues..
Describe the issue
I try to set up an entity for a car's mileage. For that, I use the following csv file:
statistic_id|unit|start|state|sum
sensor:kilometerstand|km|25.11.2008 00:00|47000|0
sensor:kilometerstand|km|01.01.2016 00:00|132670|0
sensor:kilometerstand|km|01.01.2017 00:00|141483|0
sensor:kilometerstand|km|01.01.2018 00:00|154747|0
sensor:kilometerstand|km|01.01.2019 00:00|162388|0
sensor:kilometerstand|km|01.01.2020 00:00|168462|0
sensor:kilometerstand|km|01.01.2021 00:00|169033|0
sensor:kilometerstand|km|14.07.2024 00:00|173248|0
I didn't get any error when using the service with the following settings:
service: import_statistics.import_from_file
data:
timezone_identifier: Europe/Berlin
decimal: false
filename: auto.csv
delimiter: "|"
But there aren't any changes in HA itself either. I also tried to use an previously created helper utility meter. That also didn't to anything.
Reproduction steps
- Put the csv file from the description into /homeassistant/auto.csv.
- Try to import this file with the settings from the description.
- Check if anything was imported into HA.
Debug logs
2024-07-15 03:01:09.364 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Running websocket_api script
2024-07-15 03:01:09.365 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service
2024-07-15 03:01:09.431 INFO (SyncWorker_11) [custom_components.import_statistics] Importing statistics from file: /config/auto.csv
2024-07-15 03:01:09.431 DEBUG (SyncWorker_11) [custom_components.import_statistics] Timezone_identifier: Europe/Berlin
2024-07-15 03:01:09.431 DEBUG (SyncWorker_11) [custom_components.import_statistics] Delimiter: |
2024-07-15 03:01:09.431 DEBUG (SyncWorker_11) [custom_components.import_statistics] Decimal separator: .
2024-07-15 03:01:09.439 DEBUG (SyncWorker_11) [custom_components.import_statistics] Columns:
2024-07-15 03:01:09.440 DEBUG (SyncWorker_11) [custom_components.import_statistics] Index(['statistic_id', 'unit', 'start', 'state', 'sum'], dtype='object')
2024-07-15 03:01:09.447 DEBUG (SyncWorker_11) [custom_components.import_statistics] Calling async_import_statistics / async_add_external_statistics with:
2024-07-15 03:01:09.447 DEBUG (SyncWorker_11) [custom_components.import_statistics] Metadata:
2024-07-15 03:01:09.447 DEBUG (SyncWorker_11) [custom_components.import_statistics] {'has_mean': False, 'has_sum': True, 'source': 'sensor', 'statistic_id': 'sensor:kilometerstand', 'name': None, 'unit_of_measurement': 'km'}
2024-07-15 03:01:09.448 DEBUG (SyncWorker_11) [custom_components.import_statistics] Statistics:
2024-07-15 03:01:09.448 DEBUG (SyncWorker_11) [custom_components.import_statistics] [{'start': datetime.datetime(2008, 11, 25, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 47000}, {'start': datetime.datetime(2016, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 132670}, {'start': datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 141483}, {'start': datetime.datetime(2018, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 154747}, {'start': datetime.datetime(2019, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 162388}, {'start': datetime.datetime(2020, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 168462}, {'start': datetime.datetime(2021, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 169033}, {'start': datetime.datetime(2024, 7, 14, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), 'sum': 0, 'state': 173248}]
Diagnostics dump
No response