mirror of
https://github.com/home-assistant/frontend.git
synced 2026-09-28 16:04:00 +01:00
* Fix trigger 'for' choose * fix stub * try something else * merge duration-selector with create_duration_data * handle negatives * default ms to false for selector * Handle hidden duration units in ha-duration-input createDurationData grew three flags describing which fields the duration input renders, but the input already owns enableDay, enableMillisecond, enableSecond and allowNegative. Fold the units it does not render there instead, so createDurationData keeps its single-argument signature. This handles days and milliseconds symmetrically, and covers every ha-duration-input consumer rather than only ha-selector-duration: ha-form-positive_time_period_dict passes .data straight through without enable-day and dropped days in exactly the same way. A leading "-" negates the whole period in cv.time_period_str, so the sign is now always distributed across all parts. The calendar trigger is the only caller that can see a negative value and does its own sign handling, so it takes the absolute value of every part instead of just hours, and copies the duration first since createDurationData returns dict values by reference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * cleanup calendar trigger * Refine duration type check for object values Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Bram Kragten <mail@bramkragten.nl> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>