I run HA and InfluxDB in Docker containers and am struggling a bit to get a clean setup for storing relevant historic data in a state table. After trying several things with default_measurement and tags_attributes I give up and hope to get some help here.
I am testing it with a fresh install of HA 2026.2 and InfluxDB3 Enterprise (At-Home version), with just a few sensor entities, like sensor.sun_... and sensor.my_iphone_.... I want the measurements stored in one table (state) for maximum efficiency but HA creates not only the state table but also two tables % and ° based on unit of measurements in InfluxDB.
The state table is looking good, except that I would like to get rid of the column named Low Power Mode. “SELECT * FROM state” gives:
+----------------+--------------------+----------------+---------------------------------+----------------------------------+--------------+--------------------+--------------------+-----------------+--------------+-------------------------+-------+-------------------+
| Low Power Mode | altitude | domain | entity_id | friendly_name | gps_accuracy | latitude | longitude | source_type_str | state | time | value | vertical_accuracy |
+----------------+--------------------+----------------+---------------------------------+----------------------------------+--------------+--------------------+--------------------+-----------------+--------------+-------------------------+-------+-------------------+
...
The % table stores iPhone and Watch battery level sensors, which I would like to store in the state table as well. “SELECT * FROM ‘%’” gives:
+--------+---------------------------------+----------------------------------+-------------------------+---------------------+-------+
| domain | entity_id | friendly_name | time | unit_of_measurement | value |
+--------+---------------------------------+----------------------------------+-------------------------+---------------------+-------+
...
And the ° table stores sun sensors I also would like to store in the state table. “SELECT * FROM ‘°’” gives:
+--------+---------------------+---------------------+-------------------------+---------------------+--------+
| domain | entity_id | friendly_name | time | unit_of_measurement | value |
+--------+---------------------+---------------------+-------------------------+---------------------+--------+
| sensor | sun_solar_azimuth | Sun Solar azimuth | 2026-03-18T18:20:37.395 | ° | 275.33 |
| sensor | sun_solar_azimuth | Sun Solar azimuth | 2026-03-18T18:22:37.396 | ° | 275.73 |
| sensor | sun_solar_azimuth | Sun Solar azimuth | 2026-03-18T18:24:37.398 | ° | 276.13 |
...
The influxdb parameterts in configuration.yaml are:
influxdb:
max_retries: 3
api_version: 2
ssl: false
host: influxdb3
port: 8181
token: !secret influx_token
organization: default
bucket: home_assistant
default_measurement: state
precision: ms
tags_attributes:
- friendly_name
- unit_of_measurement
ignore_attributes:
- icon
- low_power_mode
- "Low power mode"
- battery_level
- device_class
- state_class
include:
domains:
- sensor
- device_tracker
exclude:
entity_globs:
- sensor.sun_next_*
- sensor.backup_*
- sensor.*_iphone_app_version
- sensor.*_iphone_location_permission
- sensor.*_iphone_focus
- sensor.*_iphone_battery_state
- sensor.*_iphone_watch_battery_state
- sensor.*_iphone_battery_level
- sensor.*_iphone_watch_battery_level
entities:
- sensor.time
- sensor.date
- sensor.date_time
-
I know that part of this configuration will migrate to the UI and internal configuration database but the key parameters involved in this table configuration seem to stay in configuration.yaml for now.
So, the question is, why does HA create two additional tables with names based on the unit of measurement of the entries. I see entries from the sensor domain in all three tables. What am I missing here?