J. Nick Koston
bf7ede1d43
Make mock_token_hex strict on unexpected nbytes
...
Raise ValueError for unexpected nbytes values so tests fail clearly
if production code starts calling token_hex with an incorrect size.
2026-02-08 07:24:11 -06:00
J. Nick Koston
43448d55f1
Guard against None firmware_bin_path and mock subprocess in tests
...
- Add None check for storage_json.firmware_bin_path before computing
base_dir (covers configs from StorageJSON.from_wizard()).
- Mock async_run_system_command in path traversal tests so paths that
pass validation but don't exist return 404 deterministically.
- Add test for firmware_bin_path=None case.
2026-02-08 07:23:24 -06:00
J. Nick Koston
e362e6fe2f
Fix multiple_dots test for Windows path resolution
...
On Windows, ....//secrets.yaml escapes the base directory (403),
while on Unix it stays inside (404). Use sys.platform to set the
expected status code per platform.
2026-02-08 07:22:08 -06:00
J. Nick Koston
82d9616f1b
Add explicit binascii.Error catch and bad-padding test
...
binascii.Error is already a subclass of ValueError, but listing it
explicitly makes the intent clear. Added test for incorrect base64
padding (e.g. "Basic abc").
2026-02-08 07:18:29 -06:00
J. Nick Koston
a167332518
Fix password_hash type and add HA add-on regression test
...
Initialize password_hash as b"" (bytes) to match password_hash()
return type, preventing TypeError in hmac.compare_digest when
HA add-on auth is enabled without a password.
2026-02-08 07:14:20 -06:00
J. Nick Koston
1b7efdd051
Match cnonce length to hash algorithm digest size
...
Use nonce_size // 2 as token_hex argument so MD5 auth produces
a 32-char cnonce and SHA256 auth produces a 64-char cnonce,
matching the original protocol behavior.
Rename mock_random fixture to mock_token_hex and use separate
mock cnonce constants per hash algorithm.
2026-02-08 07:11:56 -06:00
J. Nick Koston
caff93d7b8
Add test coverage for secrets.choice in fallback PSK generation
...
Verifies that wizard_file uses secrets.choice (not random.choice)
to generate the 12-character fallback hotspot password.
2026-02-08 07:08:25 -06:00
J. Nick Koston
806a86a6ad
Add test coverage for is_authenticated base64 handling
...
Tests malformed base64, invalid UTF-8, missing colon separator,
valid credentials, wrong credentials, and auth-disabled cases.
2026-02-08 07:06:24 -06:00
J. Nick Koston
42126bae72
Add test coverage for check_password
...
Tests correct credentials, wrong password, wrong username,
both wrong, and auth-disabled cases.
2026-02-08 07:03:29 -06:00
J. Nick Koston
803b9a7a18
Update path traversal tests for resolve/relative_to behavior
...
Real traversals that escape the base directory now return 403.
Paths like '....' that resolve inside the base directory but
don't exist return 404.
2026-02-08 07:01:37 -06:00
J. Nick Koston
a8fd6c132e
Update tests to mock secrets.token_hex instead of random.random
...
The cnonce generation was changed to use secrets.token_hex(32),
so the test mocks and assertions need to match.
2026-02-08 06:59:32 -06:00
J. Nick Koston
94d6ca22b2
Merge branch 'voice-assistant-timer-vector' into integration
2026-02-08 03:28:43 -06:00
J. Nick Koston
8677f3db03
Add timer automation tests for voice_assistant
2026-02-08 02:27:23 -06:00
J. Nick Koston
a43e3e5948
[dashboard] Close WebSocket after process exit to prevent zombie connections ( #13834 )
2026-02-07 15:19:20 -06:00
J. Nick Koston
f64f71b9ac
Merge remote-tracking branch 'upstream/dev' into integration
2026-02-07 15:13:45 -06:00
schrob
9de91539e6
[epaper_spi] Add Waveshare 1.54-G ( #13758 )
2026-02-08 06:24:57 +11:00
J. Nick Koston
51b0661d9d
Merge branch 'scheduler-inplace-cleanup' into integration
2026-02-07 19:56:42 +01:00
J. Nick Koston
6a383a62b8
Merge branch 'scheduler-inplace-cleanup' into integration
2026-02-07 19:52:42 +01:00
tronikos
9bc93415d8
fix
2026-02-07 03:07:09 -08:00
tronikos
1aa4891c83
fix
2026-02-07 01:44:43 -08:00
tronikos
52af92d4b5
Add On/Off and Away mode support to template platform
...
Implemented support for On/Off and Away modes in the template water heater
platform, including optimistic control and lambda-based state reporting.
Refactored the base 'WaterHeaterCall' to replace the 'state_' bitmask with
'optional<bool>' for 'on' and 'away' fields. This change was necessary to
enable partial (delta) updates. The previous bitmask implementation did not
distinguish between a field being "set to false" and "not set at all,"
causing unintended state resets (e.g., turning the device off when only
adjusting temperature).
2026-02-07 01:35:37 -08:00
J. Nick Koston
0fa7050b1c
remove temp test
2026-02-07 10:01:57 +01:00
J. Nick Koston
fa1554cac0
[scheduler] Eliminate heap allocation in full_cleanup_removed_items_
...
Replace the temporary std::vector copy with in-place compaction using a
read/write pointer pattern. This avoids a heap allocation+deallocation
cycle during scheduler cleanup, reducing heap fragmentation on
long-running ESP devices.
The new approach compacts valid items forward in the existing vector,
recycles removed items as they are encountered, then resizes the vector
(no reallocation since size only shrinks). Same O(n) complexity, same
behavior, zero allocations.
2026-02-07 09:54:43 +01:00
J. Nick Koston
daebc2cc39
Merge branch 'dashboard-ws-close-on-exit' into integration
2026-02-07 06:15:23 +01:00
J. Nick Koston
6b089a611c
[dashboard] Close WebSocket after process exit to prevent zombie connections
...
When a subprocess exited, _proc_on_exit sent the exit event but never
closed the server-side WebSocket. This left zombie connections open
until the client eventually disconnected.
2026-02-07 06:14:44 +01:00
J. Nick Koston
bd6d43de52
Merge branch 'ssd1306-progmem-tables' into integration
2026-02-06 21:28:11 +01:00
tronikos and J. Nick Koston
eb7aa3420f
Add target_temperature to the template water heater ( #13661 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-02-06 21:23:42 +01:00
J. Nick Koston
b1d2eaa54b
Merge remote-tracking branch 'upstream/dev' into integration
2026-02-06 12:59:35 +01:00
7afd0eb1aa
[esp32_ble] include sdkconfig.h before ESP-Hosted preprocessor guards ( #13787 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-06 11:36:55 +00:00
J. Nick Koston
d6466bdbc7
Merge branch 'ard_chunked_http_request' into integration
2026-02-06 11:23:51 +01:00
Jonathan Swoboda and Claude Opus 4.5
8e461db301
[ota] Fix CLI upload option shown when only http_request platform configured ( #13784 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-06 04:09:48 -05:00
J. Nick Koston
1bf04d22dc
Merge branch 'wifi_callbacks_main_loop_8266' into integration
2026-02-06 09:58:20 +01:00
Marek Beran
ed4f00d4a3
[vbus] Add DeltaSol BS/2 support with sensors and binary sensors ( #13762 )
2026-02-05 23:11:14 -08:00
J. Nick Koston
b9bb444bf0
Merge remote-tracking branch 'upstream/dev' into integration
2026-02-05 11:37:00 +01:00
J. Nick Koston
be44d4801f
[esp32] Reduce Arduino build size by 44% and build time by 36% ( #13623 )
2026-02-05 10:52:43 +01:00
J. Nick Koston
89fc5ebc97
Fix bare hostname ping fallback in dashboard ( #13760 )
2026-02-05 06:18:03 +01:00
schrob
67dfa5e2bc
[epaper_spi] Validate BUSY pin as input instead of output ( #13764 )
2026-02-04 23:39:03 +00:00
Copilot
4a579700a0
[cover] Add operation-based triggers and fix repeated trigger firing ( #13471 )
2026-02-05 06:52:14 +11:00
J. Nick Koston
f3f9911b62
Merge branch 'bare_hostname_ping_fallback' into integration
2026-02-04 17:54:52 +01:00
J. Nick Koston
2c874167a1
Fix bare hostname ping fallback in dashboard
2026-02-04 17:49:09 +01:00
J. Nick Koston
92cd779c19
Merge remote-tracking branch 'upstream/dev' into integration
2026-02-04 17:08:56 +01:00
Jonathan Swoboda and Claude Opus 4.5
ba18a8b3e3
[adc] Fix ESP32-C2 ADC calibration to use line fitting ( #13756 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-04 11:44:17 +00:00
J. Nick Koston
bc7dba2bb6
Merge branch 'copilot/update-cover-component-triggers' into integration
2026-02-04 10:58:55 +01:00
dependabot[bot] and J. Nick Koston
4d05cd3059
Bump ruff from 0.14.14 to 0.15.0 ( #13752 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-02-04 09:24:05 +00:00
J. Nick Koston
43b6e7962d
Merge branch 'dependabot/pip/ruff-0.15.0' into integration
2026-02-04 09:31:37 +01:00
J. Nick Koston
f5f5e2bdae
cleanup
2026-02-04 09:28:18 +01:00
pre-commit-ci-lite[bot]
c05f0589fc
[pre-commit.ci lite] apply automatic fixes
2026-02-04 08:22:15 +00:00
clydebarrow
0a5abac71b
Merge branch 'dev' of https://github.com/esphome/esphome into copilot/update-cover-component-triggers
2026-02-04 09:03:50 +11:00
J. Nick Koston and clydebarrow
d0017ded5b
[template] Split TemplateSelect into TemplateSelectWithSetAction to save RAM ( #13685 )
...
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com >
2026-02-03 11:48:31 +00:00
J. Nick Koston
f4d7d06c41
[dlms_meter] Rename test UART package key to match directory name ( #13743 )
2026-02-03 11:23:05 +00:00