Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom_components/powercalc/analytics/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ async def _prepare_payload(self) -> dict:
"install_date": await self._get_install_date(),
"powercalc_version": powercalc_integration.version,
"ha_version": HA_VERSION,
"language": self.hass.config.language,
"config_entry_count": len(get_entries_excluding_global_config(self.hass)),
"custom_profile_count": await self._get_custom_profile_count(),
"has_global_gui_config": global_config_entry is not None,
Expand Down
1 change: 1 addition & 0 deletions docs/source/misc/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ No per-device identifiers are included.
"ha_version": "2025.10.0.dev0",
"install_id": "081ac191-2667-4242-8226-ecc66b1f7e9e",
"install_date": "2023-01-15T12:34:56.789012",
"language": "en",
"group_sizes": {
"2": 1,
"5": 1
Expand Down
1 change: 1 addition & 0 deletions tests/analytics/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ async def test_send_analytics_success(
assert len(aioclient_mock.mock_calls) == 1
mock_call = aioclient_mock.mock_calls[0]
posted_json = mock_call[2]
assert posted_json["language"] == "en"
assert posted_json["custom_profile_count"] > 50
assert posted_json["counts"]["by_config_type"] == {"yaml": 2}
assert posted_json["counts"]["by_sensor_type"] == {SensorType.VIRTUAL_POWER: 2}
Expand Down