1. Is it related to Long Term Statistics (LTS)?
Yes
1a. If it is related to Long Term Statistics (LTS) then please attach your CSV file(s) of entities
I didn't
2. Your YAML Code
type: custom:statistics-graph-chart-card
card_header: Hourly
card_icon: mdi:clock
card_icon_color: "#2c819b"
animate_graph: true
show_interval_picker: true
interval_picker_position: right
interval_options:
- 24H
- 3D
- 7D
- 14D
- 30D
- 90D
- 6M
- 1Y
height: 220
x_axis_font_size: 7
x_axis_date_color: "#2c819b"
x_axis_interval: 4h
datetime_format: hh:mm A
x_grid_style: solid
y_grid_style: solid
group_by: hour
entities:
- statistic_id: snopud:energy_consumption_1000000002
name: Consumption
icon: mdi:lightning-bolt
unit: kWh
decimals: 2
graph_type: bar
aggregate_func: change
primary_state_as: sum
show_second_state_as: max
show_trend_icon: false
state_size: 22px
color: threshold
state_adaptive_color: true
color_thresholds:
enabled: true
direction: horizontal
transition: hard
values:
- value: 0
color: "#2ecc71"
- value: 1
color: "#2c819b"
- value: 4.5
color: "#f39c12"
- value: 5
color: "#e74c3c"
legend_stats:
- min
- avg
- max
- sum
annotations: []
show_now_line: true
now_line_style: dashed
now_line_color: var(--accent-color)
y_axis_round_ticks: true
3. Bug Description
Bug Description
When using the card with an external/imported statistic (EXT LTS type, e.g. snopud:energy_consumption_1000000002), two WebSocket errors are logged in Home Assistant on every page load per card instance. The card renders and functions correctly despite the errors. This appears to be purely a backend metadata lookup issue.
To Reproduce:
Add a Statistics Graph Chart Card using only statistic_id pointing to an external statistic (EXT LTS - one with no backing HA entity, e.g. SnoPUD, Gazpar, or Linky integrations) or similar external utility integrations.
Open the dashboard
Check Home Assistant logs
Behavior:
Two errors per card instance logged in HA every time the dashboard is loaded:
homeassistant.components.websocket_api.http.connection
Error handling message: not a valid value for dictionary value @ data['statistic_type']. Got None (invalid_format)
With 9 cards on a dashboard, this produces 18 errors per load. Confirmed reproducible with a single card instance.
The card already correctly identifies EXT LTS statistics and badges them in the UI. The metadata lookup should be skipped or handled differently for this type.
CSV not available:
My External statistic has no export option in Developer Tools
Environment:
Home Assistant version: 2026.4.0
Statistics Graph Chart Card version: [2.29]
External statistic domain: snopud: (SnoPUD utility integration)
Statistic ID: snopud:energy_consumption_1000000002
No entity field used — statistic_id only
1. Is it related to Long Term Statistics (LTS)?
Yes
1a. If it is related to Long Term Statistics (LTS) then please attach your CSV file(s) of entities
I didn't
2. Your YAML Code
3. Bug Description
Bug Description
When using the card with an external/imported statistic (EXT LTS type, e.g. snopud:energy_consumption_1000000002), two WebSocket errors are logged in Home Assistant on every page load per card instance. The card renders and functions correctly despite the errors. This appears to be purely a backend metadata lookup issue.
To Reproduce:
Add a Statistics Graph Chart Card using only statistic_id pointing to an external statistic (EXT LTS - one with no backing HA entity, e.g. SnoPUD, Gazpar, or Linky integrations) or similar external utility integrations.
Open the dashboard
Check Home Assistant logs
Behavior:
Two errors per card instance logged in HA every time the dashboard is loaded:
homeassistant.components.websocket_api.http.connection
Error handling message: not a valid value for dictionary value @ data['statistic_type']. Got None (invalid_format)
With 9 cards on a dashboard, this produces 18 errors per load. Confirmed reproducible with a single card instance.
The card already correctly identifies EXT LTS statistics and badges them in the UI. The metadata lookup should be skipped or handled differently for this type.
CSV not available:
My External statistic has no export option in Developer Tools
Environment:
Home Assistant version: 2026.4.0
Statistics Graph Chart Card version: [2.29]
External statistic domain: snopud: (SnoPUD utility integration)
Statistic ID: snopud:energy_consumption_1000000002
No entity field used — statistic_id only