90 Commits

Author SHA1 Message Date
8d95f0d95d add unit tests for common/url/search-params.ts (#26115) 2025-07-09 14:11:28 +03:00
5cf8b39703 Coerce all energy distribution values to the same unit (#26117) 2025-07-09 14:06:47 +03:00
8cc762d839 Fix use of numeric option for collator (#25917)
* fix(string): use numeric option for collator

* test: add natural sort comparison tests
2025-06-30 18:00:45 +02:00
e7a04eb3d2 Short-format negative and small numbers in energy-distribution-card (#25862) 2025-06-25 13:22:21 +00:00
f47336392c Fix/dhcp config network sort (#25799)
* Add ip sort method to compare helper

* Add ip sort functionality to dhcp config panel datatable

* Add type ip to DataTableColumnData

* Change ip sorting to padStart method for better readablity

* Rename ip compare method to clarify ipv4

* Enhance IP compare method to include ipv6

* Add compare IP test
2025-06-20 15:01:02 +03:00
8b87188075 Add navigate command to the external bus (#25516) 2025-05-19 13:22:19 +00:00
28e5a30772 Prioritize battery consumption before solar consumption (#25467) 2025-05-15 10:32:07 +03:00
84def48222 Add tests for common name utils (#25373) 2025-05-08 16:59:28 +03:00
821a0bc418 New solar-consumed-gauge algorithm (#25326)
* New solar-consumed-gauge algorithm

* update tests

* Apply suggestion

* reduce duplicate code
2025-05-07 17:35:24 +03:00
cd3e4f55e2 Fix typo in energy calculation (#25259)
* New energy calculation

* more tests and stricter tests. change priority order

* more test and fix error
2025-05-01 07:27:11 +03:00
f8d706277d New energy calculation formula (#25242)
* New energy calculation

* more tests and stricter tests. change priority order
2025-04-30 19:47:51 +03:00
92353ebed5 Centralize energy usage calculations (#25197)
* Centralize energy usage calculations

* addl tests

* test organization

* Update src/data/energy.ts

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* Centralize more equations

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2025-04-30 06:57:26 +03:00
536602580d Remove duplicated context files (#25212) 2025-04-29 11:51:05 +02:00
7a617600ad Add unit tests and docs for common/context (#25158) 2025-04-24 16:57:29 +02:00
4c6a5ed2e3 convert-color: color names should be case insensitive (#25140)
convert-color: colornames should be case insensitive
2025-04-23 08:14:53 +03:00
20d357fb13 Add tests for get duplicates function (#24994) 2025-04-11 08:47:42 +02:00
9f05f4df50 Short-format numbers in energy-distribution-card (#24716) 2025-03-24 12:43:11 +01:00
d4717f1293 Handle short form hex colors in conversion functions (#24642)
* Handle short form hex colors in conversion functions

* drop alpha codes
2025-03-16 09:13:13 +01:00
dda7de3301 Fix issues with develop and serve (#24602)
* fix issues with develop and serve

* fix get image data, use hassUrl

* save picture-upload

* Update bundje.cjs

* Prettier

* Fix profile picture in dev serve mode

* person badge too

---------

Co-authored-by: Wendelin <w@pe8.at>
2025-03-12 16:59:40 +01:00
616c1fda81 Rename entity filter to entity domain filter (#24587) 2025-03-10 13:34:15 -04:00
0a05dd8f71 Add more tests for common/entity (#24336)
* Use substring instead of deprecated substr

* Add more common entity tests
2025-02-20 20:11:53 +01:00
c7a46ec25b Improve ESLint config (#24290)
* Improve ESLint config
2025-02-18 17:30:36 +00:00
0256da511d Fix theme2hex with custom theme colors (#24282) 2025-02-18 08:04:46 +01:00
3ee3cfa6cb Add cache for markdown card and markdown element (#24217)
* Add cache for markdown card and markdown element

* Rename to expiration

* Only use cache logic for markdown card

* Add tests

* Improve tests
2025-02-17 09:01:44 +01:00
63a98155cd Add more unit tests for common/entity (#24182)
* Add new entity tests

* Improve canToggleDomain test
2025-02-14 21:55:23 +01:00
03a415beff Onboarding restore use core api (#23920)
* Fix type issues

* Extract backup-upload

* Add onboarding upload section

* Extract and use ha-backup-details

* Implement backup details and restore

* remove unused hassio onboarding calls

* Require hass in dialog-hassio-backup

* Add restore view

* Add formatDateTime without locale and config

* Add restore status

* Fix prettier

* Fix styles of backup details

* Remove unused localize

* Fix onboarding restore translations

* Hide data-picker on core only instance

* Split uploadBackup into 2 separate funcs

* Add formatDateTimeWithBrowserDefaults

* Fix selected data for core only

* Show error reasons on status page

* Use new backup info agents

* Add mem function for formatDateTimeWithBrowserDefaults

* Fix overflow on mobile

* Handle errors when in hassio mode

* Fix cancel restore texts

* Fix hassio localize type issue

* Remove unused onboarding localize in hassio backup restore

* improve format_date_time

* Fix tests

* Fix and simplify backup upload issues

* Use foreach instead of reduce

* Fix attributes, unused styles and properties

* Simplify supervisor warning

* Fix language type issues

* Fix ha-backup-data-picker

* Improve backup-details-restore

* Fix onboarding-restore issues

* Improve loadBackupInfo

* Revert uploadBackup changes

* Improve cancel restore

* Use destructive

* Update src/panels/config/backup/dialogs/dialog-upload-backup.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

* Show backup type not at onboarding

* Only show backup type in correct translationPanel

* Fix quotes

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-02-10 16:40:08 +01:00
853059ac73 Add tests for common/datetime (#23658) 2025-01-09 15:47:32 +01:00
3d1817a6b9 Spelling and grammar fixes (#23598) 2025-01-06 12:10:34 +01:00
523c38a83e Add tests for common/config (#23349)
* Add tests for common/config

* Revert version dev hook
2024-12-22 16:05:17 +01:00
0a28bbdd72 Improve picture select crop error handling (#23352)
* Improve crop editor error handling

* Add tests for data/image_upload

* Fix tests imports
2024-12-22 15:45:37 +01:00
b84e00b312 Unit Test for shiftDateRange (#23324)
Unit Test for Pull 23228

Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2024-12-19 15:42:31 +01:00
27ce395d68 Common-color-tests (#23258) 2024-12-12 14:44:17 +01:00
8f19c0abb0 Use localStorage with Web Storage API (#23172) 2024-12-10 11:14:15 +01:00
f8ce7c2ce1 Don't use duration formatting for second unit (#23132)
Don't use duration formatting for sec unit
2024-12-04 13:17:47 +01:00
af1622e306 Show unit for number domains (#23101)
* Show unit for number domains

* Remove duplicated code

* Allow monetary formatting

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* Update src/common/entity/compute_state_display.ts

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2024-12-04 11:25:29 +00:00
f7c8c6e3e8 Dont floor duration for milliseconds (#23028)
* Dont floor duration for milliseconds

* remove ms
2024-11-27 17:27:03 +00:00
3411967fd9 Only use duration poly-fill when necessary (#23030) 2024-11-27 17:13:29 +01:00
164944ceff Improve duration formatting (#23025) 2024-11-27 15:00:29 +01:00
a532b4461d Use explicit duration format for state formatting (#23017) 2024-11-27 12:49:21 +01:00
dd7987e199 Add unit tests for common/array files (#23006)
* add vitest coverage

* Add js doc to functions

* Add tests for common/array
2024-11-27 10:02:24 +02:00
bd0bfc1fbe Rspack (#22807)
* Add rspack

* Remove TransformAsyncModulesPlugin from rspack

* Migrate all webpack usage to rspack

* Migrate tests to vitest

* Fix test suites

* Remove chai dependency

* Fix compute_state_display tests

* Fix resolveTimeZone

* Reduces test pipeline

* Revert test ci

* optimize chunk filtering

* Migrate landing-page to rspack

* Update rspack dependencies

* Add rsdoctor

* Fix prod build bundle size

* Use rsdoctor for demo stats

* Remove unused webpack configs

* Update build-scripts/rspack.cjs

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* Fix eslint

* Update rspack

* Remove unused code

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2024-11-26 14:49:13 +01:00
84f7c62ee2 Add support for unit_of_measurement translation (#22868) 2024-11-20 18:44:44 +01:00
ce9993fd36 Use finishes_at in timer remaining calculation (#22169)
* Use finishes_at in timer remaining calculation

* lint

* fix test
2024-10-01 14:05:01 +02:00
f617426808 Bake numeric device classes into formatEntityState (#19878)
* Bake numeric device classes into formatEntityState

* Apply suggestions from code review

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-05-24 16:17:23 +02:00
d95bf64edf Add experimental sections view (#19846) 2024-02-22 20:51:48 +01:00
1cf928b425 Improve Lovelace types (#18652) 2023-11-15 11:13:49 +01:00
c48b620e03 Fix inconsistencies in slugify between frontend and core implementation (#18297) 2023-10-23 08:37:56 +00:00
6c7efc17c2 Fix more info type test (#17758) 2023-08-31 22:37:25 +02:00
fa1a6affa7 Use ES modules and dynamic import for Webpack latest builds (#16849) 2023-06-13 18:12:44 +02:00
780de42e4b Allow to show times in the UI in the timezone of the server (#16799) 2023-06-13 12:12:13 +02:00