File tree Expand file tree Collapse file tree
custom_components/powercalc/analytics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ async def _prepare_payload(self) -> dict:
163163 "install_date" : await self ._get_install_date (),
164164 "powercalc_version" : powercalc_integration .version ,
165165 "ha_version" : HA_VERSION ,
166+ "language" : self .hass .config .language ,
166167 "config_entry_count" : len (get_entries_excluding_global_config (self .hass )),
167168 "custom_profile_count" : await self ._get_custom_profile_count (),
168169 "has_global_gui_config" : global_config_entry is not None ,
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ No per-device identifiers are included.
8787 "ha_version": "2025.10.0.dev0",
8888 "install_id": "081ac191-2667-4242-8226-ecc66b1f7e9e",
8989 "install_date": "2023-01-15T12:34:56.789012",
90+ "language": "en",
9091 "group_sizes": {
9192 "2": 1,
9293 "5": 1
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ async def test_send_analytics_success(
9393 assert len (aioclient_mock .mock_calls ) == 1
9494 mock_call = aioclient_mock .mock_calls [0 ]
9595 posted_json = mock_call [2 ]
96+ assert posted_json ["language" ] == "en"
9697 assert posted_json ["custom_profile_count" ] > 50
9798 assert posted_json ["counts" ]["by_config_type" ] == {"yaml" : 2 }
9899 assert posted_json ["counts" ]["by_sensor_type" ] == {SensorType .VIRTUAL_POWER : 2 }
You can’t perform that action at this time.
0 commit comments