Compare commits

...

257 Commits

Author SHA1 Message Date
J. Nick Koston
dd00b51f21 Adjust WebSocket ping timeout to 15 seconds
5 seconds was too low to prevent the UI from reloading
when connecting the WebSocket during startup or on
a high latancy connection

This problem presented as the UI reloading over
and over again because it could never respond
to the ping in time on high latancy connections.

At startup it usually only did this once so it
went unnoticed in most cases.

This ping was added in #18934
2025-02-20 11:46:59 -06:00
J. Nick Koston
64b886eea0 Reduce size of address column on Bluetooth Advertisement monitor 2025-01-29 12:51:56 -06:00
Bram Kragten
b95e87845f Merge branch 'rc' into dev 2025-01-29 16:46:26 +01:00
Bram Kragten
bc49ebc489 Bumped version to 20250129.0 2025-01-29 16:38:25 +01:00
Wendelin
c97d0ce68a Add translations for backup agents encryption (#23938)
* Add translations for backup agents encryption

* Update src/translations/en.json

* Split class map

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2025-01-29 15:31:55 +00:00
renovate[bot]
a0e7d6f1c6 Update dependency lint-staged to v15.4.3 (#23937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 16:23:04 +01:00
Petar Petrov
25d2a5ddac Open more-info on label click in echarts (#23921)
* Open more-info on label click in echarts

* check isExternalStatistic in energy devices click
2025-01-29 15:44:21 +01:00
Paul Bottein
a2f2d64f5c Allow to change encryption for each backup location (#23861)
* Add backup location settings page

* Add encryption settings

* Display unencrypted locations and backups

* Improve cloud detail page

* Fix encryption flag

* Fix restore backup

* Fix lint

* Fix translations

* Add warning

* Use agents in backup locations

* Feedback

* Use updated

* Improve encrypted/unencrypted status

* Improve code quality

* Remove hardcoded failed id

* Extend agent interface

* Use willupdate
2025-01-29 14:23:47 +01:00
Petar Petrov
fcdcbbda05 Fix statistics chart stacking and colors (#23922) 2025-01-29 12:46:59 +01:00
Paul Bottein
4b5c7fc2de Only restore config and database for core install (#23935) 2025-01-29 12:46:30 +01:00
Paul Bottein
dd64d88afe Use handle icon for drag and drop in energy devices settings (#23933)
* Use handle icon for drag and drop in energy devices settings

* Remove import
2025-01-29 11:04:09 +00:00
Wendelin
5feffd08ff Fix backup time supporting-text (#23931) 2025-01-29 09:08:26 +01:00
karwosts
543c7df3e0 Keyboard accessible menus in hass-tabs-subpage-data-table (#23927) 2025-01-29 08:23:27 +02:00
ildar170975
167f859f2a fix padding for error-log-card (#23923)
make padding similar to system-log-card
2025-01-29 08:22:24 +02:00
J. Nick Koston
c7d9699a24 Include addresses of Bluetooth devices in the connection slots tooltip (#23928) 2025-01-29 08:21:34 +02:00
ildar170975
a638cf443d fix overflow for ha-map (#23929) 2025-01-29 08:19:00 +02:00
Patrick Kortendick
438d1c13ef Fix misspelling for humidifier card description (#23924) 2025-01-29 05:20:01 +00:00
J. Nick Koston
cc8869b9f9 Show scanner name in the Bluetooth Advertisement Monitor (#23926) 2025-01-28 13:07:16 -10:00
J. Nick Koston
cbdb7406ad Add support for showing Bluetooth connection slot allocations (#23899) 2025-01-28 06:52:21 -10:00
Wendelin
f8d2560104 Revert "Add shortcut hint to assist dialog" (#23918)
Revert "Add shortcut hint to assist dialog (#23739)"

This reverts commit d121b33263.
2025-01-28 10:53:57 -05:00
Petar Petrov
cc48ae82d6 Fixes for echarts (#23906)
* show negative untracked energy again

* fix chart cards height

* fix timeline label width

* fix statistics chart legend

* fix layout of chart cards

* tweak timeline chart labels

* timeline label tweak

* css tweak

* fix legend colors in statistics chart

* dark mode fix

* fix for y axis with a long name

* listen for darkMode changes and update charts

* legend tweak for darkMode

* dark mode tweak

* hide insignificant echarts errors for now
2025-01-28 14:20:34 +00:00
karwosts
e1bda9b57d Use fixed positioning for ha-form-multi_select (#23781) 2025-01-28 15:13:19 +01:00
ildar170975
89e9316a40 Fix typo & layout in ha-assist-chip (#23785)
* fix typo fot slot name

* make font-size same as for label

* remove unneeded margin-top
2025-01-28 15:04:12 +01:00
Paul Bottein
85e4975206 Use name property when formatting backup location (#23916) 2025-01-28 13:53:02 +01:00
Ben Randall
142faba04d Update settings button icon on tables to mdi-table-cog. (#23915)
Update settings button icon on tables to mdi-table-cog.

The cog icon is used in a lot of places to indicate settings and it's generally clear what it's intent is.  However, the cog icon used by tables very often appears very close by the triple dots menu or just in the top right corner so it's very easy to mistakenly press that button intending to press the menu button, or to press it when looking for the appropriate settings button.

This changes the icon used by these buttons from mdi-code to mdi-table-cog to help clarify the intent of the button.
2025-01-28 11:24:08 +02:00
karwosts
c1c6d71ccf Fix keyboard in automation-picker menus (#23867) 2025-01-28 09:39:03 +02:00
renovate[bot]
5204a565cf Update dependency eslint to v9.19.0 (#23914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 09:37:55 +02:00
Petar Petrov
05b8a48ba8 Looser layout limits for graph cards (#23910) 2025-01-28 09:36:20 +02:00
renovate[bot]
41770a89b4 Update dependency element-internals-polyfill to v1.3.13 (#23912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 16:46:14 +00:00
renovate[bot]
b7d14d7950 Update babel monorepo to v7.26.7 (#23911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 17:34:34 +01:00
karwosts
4ccef6f28b Fix millisecond attributes (#23909)
fix millisecond attributes
2025-01-27 17:25:37 +02:00
karwosts
d1be441455 Re-remove time picker for Energy (#23891)
* Re-remove time picker for Energy

* flip polarity
2025-01-27 14:11:08 +00:00
Philipp
b3391b34e4 Increase generic entity row touch target (#23894) 2025-01-27 15:52:32 +02:00
Abílio Costa
9359e9d475 Reword incompatible media message (#23887) 2025-01-27 09:26:03 +02:00
Paul Bottein
5453da75ea Reintroduce backup switch when updating core and addons (#23814) 2025-01-27 08:25:28 +01:00
dependabot[bot]
bc21877008 Bump actions/stale from 9.0.0 to 9.1.0 (#23903)
Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 09:24:34 +02:00
dependabot[bot]
c9956c65e9 Bump actions/setup-node from 4.1.0 to 4.2.0 (#23902)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 09:24:01 +02:00
renovate[bot]
74814cc305 Update dependency @bundle-stats/plugin-webpack-filter to v4.18.2 (#23898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 18:42:16 +00:00
renovate[bot]
8f231d7b3e Update rspack monorepo to v1.2.2 (#23896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 19:33:12 +01:00
renovate[bot]
5b6818d72d Update dependency lint-staged to v15.4.2 (#23889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 19:32:59 +01:00
renovate[bot]
8c75865a02 Update vitest monorepo to v3.0.4 (#23897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 19:32:39 +01:00
J. Nick Koston
99d832ac77 Restore Bluetooth configuration panel (#23877)
* Restore Bluetooth configuration panel

* cleanup copypasta

* Apply suggestions from code review

* Update src/panels/config/integrations/integration-panels/bluetooth/bluetooth-config-dashboard-router.ts

* preen

* trim down updatePageEl
2025-01-26 08:11:21 +01:00
Simon Lamon
240e48f5c1 Include query params in url when default page is added (#23880)
Include query params if exists
2025-01-25 20:02:26 +01:00
Jan-Philipp Benecke
77fc11cda6 Use new improved save dialog when leaving script editor dirty (#23862)
* Use new improved save dialog when leaving script editor dirty

* Fix url
2025-01-25 19:14:47 +01:00
karwosts
f8f152f118 Add button filter to energy devices sortable (#23881)
Add filter to energy devices sortable
2025-01-25 18:42:05 +01:00
renovate[bot]
20a67cf73c Update rspack monorepo to v1.2.1 (#23884)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 17:45:34 +01:00
ocrease
dd11b3092e Preheating support in History Chart (#23878)
Use CLIMATE_HVAC_ACTION_TO_MODE to map hvac action to heat or cool so that history chart correctly shows preheating and defrosting as heat
2025-01-25 12:25:08 +01:00
renovate[bot]
7f3363621e Update dependency @bundle-stats/plugin-webpack-filter to v4.18.0 (#23879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 12:20:46 +01:00
Jan-Philipp Benecke
edce1901d7 Display year when automation was last triggered in automation list (#23864)
* Display year when automation was last triggered in automation list

* Use function
2025-01-24 17:13:01 +00:00
Jan-Philipp Benecke
546087066a Display year in entities list only when last year (#23865)
* Display year in entities list only when last year

* Make function

* Revert hyphen
2025-01-24 18:03:21 +01:00
renovate[bot]
a95c589a06 Update vitest monorepo to v3.0.3 (#23870)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 17:59:35 +01:00
renovate[bot]
5f6da9d959 Update rspack monorepo to v1.2.0 (#23871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 17:59:00 +01:00
renovate[bot]
bc94ca0a0a Pin dependency tslib to 2.8.1 (#23860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 08:32:09 +02:00
Eric Stern
dc8d483e8b Logbook card loading fix (#23853)
* the call to unsubscribe will never do anything

* await the subscription when subscribing to logbook

* removed unneeded if
wrapped call to subscribeLogbook in try/catch
remove return values from _subscribeLogbookPeriod
2025-01-24 08:31:30 +02:00
renovate[bot]
a329553ce1 Update typescript-eslint monorepo to v8.21.0 (#23863)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-23 22:10:20 +01:00
Petar Petrov
1f8cfdd0de Migrate from chart.js to echarts (#23809) 2025-01-23 15:51:48 +00:00
Jan-Philipp Benecke
62a9da2de2 Display year for created_at and modified_at of entities (#23772) 2025-01-23 13:36:23 +02:00
renovate[bot]
25ff96b9bf Update dependency eslint-config-prettier to v10 (#23764)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-23 13:31:03 +02:00
Matthias Alphart
caeb616dc6 Don't check for promise when processing DataEntryFlowStep (#23759) 2025-01-23 13:27:19 +02:00
karwosts
fb79e2cfb2 Fix keyboard for ha-config-entities bulk menus (#23776)
Fix keyboard for ha-config-entities menus
2025-01-23 13:15:23 +02:00
Paul Bottein
666316e44a Use area entities in area card for temperature and humidity (#23842)
Use area entities in area card for temperature and humidity instead of average
2025-01-23 12:26:58 +02:00
karwosts
1532093426 Support offset on input_datetime time trigger (#23855)
* Support offset on input_datetime time trigger

* no time entities
2025-01-23 12:23:27 +02:00
Jan-Philipp Benecke
2effb0935c Add helper text to inputs of time pattern trigger (#23844) 2025-01-23 09:40:13 +02:00
renovate[bot]
06a08bb4f2 Update dependency intl-messageformat to v10.7.14 (#23854)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-23 09:04:21 +02:00
Jan-Philipp Benecke
09102d34d6 Improve automation save dialog when leaving editor dirty (#23589)
* Improve automation save dialog when leaving editor dirty

* Make CI happy
2025-01-23 09:03:39 +02:00
Wendelin
27d683f6e8 Add additional backup schedule description (#23843)
* Add additional backup schedule description

* Use ha-icon-button for description

* Remove tip style

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2025-01-22 20:17:50 +01:00
Paul Bottein
b89bd0be3b Fix delete button for state content in iOS and Android (#23847) 2025-01-22 14:25:06 +00:00
Paul Bottein
51e6e6d230 Fix delete button for state content in iOS (#23839) 2025-01-22 08:16:35 -05:00
Norbert Rittel
9005f8faa9 Update hidden_explanation to include labels (#23473) 2025-01-22 09:52:53 +01:00
Jan-Philipp Benecke
7aa2abc9c2 Make add integration dialog keyboard accessible (#23829)
Make add integration keyboard accessible
2025-01-22 10:06:05 +02:00
dependabot[bot]
898fd51c7d Bump vite from 6.0.7 to 6.0.11 (#23834)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.0.7 to 6.0.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 10:04:27 +02:00
karwosts
b3141a0653 Remember selection "Don't Group" in data-tables (#23836) 2025-01-22 10:03:23 +02:00
Jan-Philipp Benecke
1025f73c36 Clear filter in add helper dialog when closing (#23832) 2025-01-21 21:40:52 +01:00
Simon Lamon
1cd44728df Temporarily disable Bluetooth panel to restore access to options flow, additional fixes (#23830) 2025-01-21 09:45:47 -10:00
Sören Beye
eaab19fb8c Don't hide location entities that are "home" in the MapViewStrategy (#23462) 2025-01-21 20:14:04 +02:00
Paul Bottein
c4b2896fac Add label for add badge button in masonry and sidebar view (#23827)
Add label for add badge button in mansonry and sidebar view
2025-01-21 19:45:06 +02:00
Simon Lamon
ca2a9f9171 Initial bluetooth integration panel (#23531)
* Initial bluetooth device page

* Update src/panels/config/integrations/integration-panels/bluetooth/bluetooth-device-page.ts

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update src/panels/config/integrations/integration-panels/bluetooth/bluetooth-device-page.ts

* Apply suggestions from code review

* Apply suggestions and implement dialog

* memoize

* Apply suggestions

* Clean up and fixes

* Adjust store usage

* Implement hassdialog

* Apply comments

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2025-01-21 19:43:33 +02:00
Paulus Schoutsen
9e868e144d Allow storing temperature/humidity entities on an area (#23822)
* Allow storing temperature/humidity entities on an area

* Update objects after improved types
2025-01-21 17:37:51 +01:00
Bram Kragten
fcb6da55d8 Check if we can decrypt backup on download (#23756)
Co-authored-by: Kevin Cathcart <kevincathcart@gmail.com>
Co-authored-by: Wendelin <w@pe8.at>
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-21 14:48:38 +01:00
Paul Bottein
87907b98bd Fix backup data picker translations (#23826) 2025-01-21 13:17:33 +01:00
Bram Kragten
7535d66373 Add time option for backup schedule (#23757)
Co-authored-by: Wendelin <w@pe8.at>
2025-01-21 11:58:07 +01:00
Jan-Philipp Benecke
e994e3565d Improve add cards dialog user experience (#23773)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-21 09:53:28 +01:00
Jan-Philipp Benecke
562589a6cb Fix flickering media play button (#23778) 2025-01-21 09:09:15 +01:00
renovate[bot]
e87f6d6d5e Update vitest monorepo to v3.0.2 (#23812)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-21 09:07:51 +01:00
karwosts
3feedb792a Multi textfield helper (#23649)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-01-20 12:20:36 +01:00
Douwe
fc290028c6 Update ha-assist-chat.ts (#23790)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-20 09:20:14 +01:00
Jan-Philipp Benecke
2f5fd6f0c7 Use destructive attribute from ha-button (#23786)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-20 08:54:22 +01:00
ildar170975
9a3ca59d77 Picture glance alignment fix (#23793) 2025-01-20 08:35:29 +01:00
ildar170975
f76c22cb5b system-log-card: make a header & card-content similar to error-log-card (#23799)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-20 08:26:18 +01:00
dependabot[bot]
aad94624e2 Bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (#23806) 2025-01-20 08:15:29 +01:00
renovate[bot]
076ab91199 Update dependency intl-messageformat to v10.7.12 (#23807) 2025-01-20 08:12:59 +01:00
Jan-Philipp Benecke
d121b33263 Add shortcut hint to assist dialog (#23739)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-20 08:12:52 +01:00
renovate[bot]
dbfcf310c3 Update vitest monorepo to v3 (major) (#23803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 08:05:24 +01:00
renovate[bot]
25ea6c2c55 Update dependency lint-staged to v15.4.1 (#23802)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 21:05:58 +01:00
renovate[bot]
b2b2c21477 Update dependency fs-extra to v11.3.0 (#23798)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 16:41:25 +01:00
renovate[bot]
09777db549 Update dependency lint-staged to v15.4.0 (#23800)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 16:41:13 +01:00
renovate[bot]
f108f65e39 Update dependency node-vibrant to v4.0.3 (#23797)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 16:41:04 +01:00
renovate[bot]
2ee9824bcc Update dependency node-vibrant to v4.0.2 (#23789)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-18 10:44:52 +00:00
Norbert Rittel
812461ea00 Add translatable string for "Learn how it works" (#23788)
* Add translatable string for "Learn how it works"

* Update assist-pref.ts adding localizable key
2025-01-18 11:37:22 +01:00
Jan-Philipp Benecke
c430c28c2a Add missing localization on info page (#23787) 2025-01-18 11:36:00 +01:00
Jan-Philipp Benecke
d67c463b98 Add clear button to Assist debug page (#23774)
* Add clear button to Assist debug page

* Move destructive to ha-button
2025-01-18 09:27:30 +02:00
renovate[bot]
8efaf2b031 Update typescript-eslint monorepo to v8.20.0 (#23771)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-17 08:30:15 +01:00
karwosts
5b038a4fef Add missing localize (#23770) 2025-01-17 08:10:53 +01:00
karwosts
2105793355 Don't close 2 dialogs from 1 escape keydown (more-info) (#23702) 2025-01-16 16:44:50 +01:00
Wendelin
21c2351137 Remove unused b64ToBlob (#23763) 2025-01-16 16:25:16 +01:00
renovate[bot]
ebd1bdd686 Update vaadinWebComponents monorepo to v24.6.2 (#23762)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 14:01:44 +01:00
Bram Kragten
05bd70dd64 Prevent race in dialog box (#23758)
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-16 12:46:10 +01:00
Jan-Philipp Benecke
e5d2f2d94b Make media play button in media browser more visible when hovering (#23760) 2025-01-16 10:53:16 +01:00
karwosts
57edb86c5c Option to sort todo lists (#23579)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-01-16 08:40:00 +00:00
Paulus Schoutsen
173d60b913 Externalize ha-assist-chat styling (#23713) 2025-01-16 08:49:34 +01:00
Wendelin
c17c1e4217 Use-consume-scene-editor (#23754)
* Add fullDevicesContext provider

* Use consume in ha-scene-editor

* Remove not needed device context and generate category
2025-01-15 17:06:59 +01:00
Paulus Schoutsen
d112872eb2 Add more info dialog for conversation agent (#23682)
* Add more info dialog for conversation agent

* Fixes

* Disable speech option for LLM testing

* Address comments

* New style more info

* Also reset errors on loading pipeline
2025-01-15 10:57:49 +01:00
Wendelin
e54f178b02 Fix-ha-form-float-validate (#23751)
* Use autoCaseNoun for domainName

* Fix ha-form-float validate

* Revert "Use autoCaseNoun for domainName"

This reverts commit ff6855149b.
2025-01-15 09:54:38 +00:00
Wendelin
7960da1872 Use autoCaseNoun for domainName (#23748) 2025-01-15 10:52:03 +01:00
Simon Lamon
6288154c53 Fix cast views not showing a background (#23724) 2025-01-15 10:48:05 +01:00
Yosi Levy
52d8e98cdb Overflow fix (#23652) 2025-01-15 08:52:20 +01:00
Jan-Philipp Benecke
1043db29be Add search to add helper dialog (#23728)
* Add search to add helper dialog

* Add missing scrollbar style

* Fix string

* Remove virtualizer & add alias
2025-01-15 09:13:08 +02:00
Jan-Philipp Benecke
e6cc920781 Use ha-formfield in ha-form-boolean (#23737) 2025-01-14 20:11:55 +00:00
Jan-Philipp Benecke
8bc78ba793 Focus search input on dev tools statistics page when using search shortcut (#23738) 2025-01-14 21:05:01 +01:00
Wendelin
e703750136 Add and fix stylistic eslint rules (#23735)
* Fix stylistic eslint rules

* Fix eslint issues
2025-01-14 21:00:14 +01:00
Wendelin
69a93ddb6e Fix background (#23736) 2025-01-14 14:41:43 +00:00
Mimi
630b48218b Make the title fonts consistent across different pages (#23688) 2025-01-14 11:30:41 +01:00
Mimi
54c78ecc4d Fix ERR_REQUIRE_ASYNC_MODULE error when executing gulp (#23687) 2025-01-14 11:29:34 +01:00
Bram Kragten
57a17b8663 Fix background on cast devices (#23731) 2025-01-14 12:28:32 +02:00
Petar Petrov
d3e832c09b Fix more-info chart rendering (#23619)
* Fix more-info chart rendering

* lint fix

* remove animation-container & _chartHeight

* don't change height on resize

* handle default height in ha-chart-base

* fix chart height in energy panel

* lint

* lint
2025-01-14 11:24:52 +01:00
Wendelin
abe8899f9b Update ts-eslint (#23723)
* Update ts-eslint

* Remove comments

* Remove unused ts-ignore

* Add undefined generic type instead of unknown

* Remove unused undefined type

* Fix type issues

* Use undefined instead of void for subscribed return type
2025-01-14 11:24:02 +01:00
renovate[bot]
922cd72be4 Update dependency eslint to v9.18.0 (#23730)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 10:50:55 +02:00
renovate[bot]
3f4ee97ede Update dependency @lit-labs/virtualizer to v2.0.15 (#23729)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 10:50:02 +02:00
Petar Petrov
6f9a385619 Fix navigation from stacked dialogs with the same name (#23698)
* Fix navigation from stacked dialogs

* lint fix

* Keep only 1 instance per dialog tag in the stack
2025-01-14 09:25:01 +01:00
karwosts
eda0ea077c Show yaml parsing errors in hui-element-editor (#23690) 2025-01-14 08:49:09 +02:00
Jan Bouwhuis
9934ea4b4f Replace label on refactored MQTT option flow button (#23317) 2025-01-13 20:47:26 +02:00
Wendelin
cc42d958ce Update node-vibrant to v4 (#23718) 2025-01-13 14:18:04 +01:00
renovate[bot]
2e1efecdf7 Update dependency ua-parser-js to v2 (#22926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 09:25:34 +01:00
dependabot[bot]
5fead1b03a Bump actions/upload-artifact from 4.5.0 to 4.6.0 (#23714)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-13 09:19:48 +01:00
renovate[bot]
730da177ef Update dependency jsdom to v26 (#23697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 09:18:36 +01:00
renovate[bot]
bd53d1076f Update dependency @codemirror/state to v6.5.1 (#23715)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 09:12:30 +01:00
renovate[bot]
e012a9e929 Update dependency glob to v11.0.1 (#23716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 09:12:00 +01:00
Norbert Rittel
95ac8eb5ab Use consistent "More info" for To-do-lists and automations etc. (#23459) 2025-01-13 09:11:11 +01:00
libe.net
6dbc04455f Newline behavior for date-range-picker history and logbook (#23710) 2025-01-13 08:45:38 +01:00
renovate[bot]
2b8fc04fdc Update dependency @codemirror/view to v6.36.2 (#23703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 08:54:27 +02:00
ildar170975
3baeb22423 Add outline for ha-color-picker (#23696)
Update ha-color-picker.ts
2025-01-13 08:53:44 +02:00
Simon Lamon
aae4ba7341 No matching link found for developer-tools/action (#23700) 2025-01-12 15:37:30 +02:00
Simon Lamon
46d62d55a3 Fix history translation in backup (#23701) 2025-01-12 15:35:38 +02:00
Simon Lamon
de027b6d93 Minor fixes for backup translations (#23691) 2025-01-12 09:24:35 +02:00
renovate[bot]
f1cc02b40f Update dependency @octokit/rest to v21.1.0 (#23695)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-12 09:22:48 +02:00
renovate[bot]
23c6155f9b Update dependency typescript to v5.7.3 (#23692)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-12 09:21:05 +02:00
renovate[bot]
b0e6c5dbaf Update dependency @codemirror/commands to v6.8.0 (#23689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-11 20:59:37 +01:00
renovate[bot]
8cb4452126 Update dependency @octokit/plugin-retry to v7.1.3 (#23680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-11 11:30:11 +01:00
renovate[bot]
0cd0f65d51 Update dependency core-js to v3.40.0 (#23681)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-11 11:30:06 +01:00
dependabot[bot]
3479879bd0 Bump softprops/action-gh-release from 2.1.0 to 2.2.1 (#23679)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 21:19:36 +00:00
renovate[bot]
60b9fbced7 Update dependency @types/leaflet to v1.9.16 (#23675)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 18:21:37 +01:00
renovate[bot]
7496998a69 Update dependency @rsdoctor/rspack-plugin to v0.4.13 (#23672)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 18:21:32 +01:00
renovate[bot]
c9db02ba2e Update vaadinWebComponents monorepo to v24.6.1 (#23673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 18:21:26 +01:00
renovate[bot]
08737366fc Update dependency marked to v15.0.6 (#23660)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 09:20:35 +02:00
Petar Petrov
707192feac Use statistics data in History graph card to fill gaps (#23612)
* Use statistics data in History graph card to fill gaps

* add convertStatisticsToHistory utility
2025-01-10 09:19:33 +02:00
Bram Kragten
4b03caa01a Make timeout for save automation/script longer (#23665) 2025-01-09 16:39:19 -08:00
Paul Bottein
166633cfa8 Fix preferred agent for backup download (#23659) 2025-01-09 17:26:42 +01:00
Wendelin
853059ac73 Add tests for common/datetime (#23658) 2025-01-09 15:47:32 +01:00
Wendelin
31ed0f7bea Fix backup summary label position (#23655) 2025-01-09 14:49:49 +01:00
Gord
57388ae429 Backup text changes for the english translation (#23656)
* Update backup text in en.json

* fix missing quote en.json
2025-01-09 11:46:58 +00:00
Paul Bottein
20203a3cef Fix backup translations key issues (#23654)
Co-authored-by: Wendelin <w@pe8.at>
2025-01-09 09:26:34 +01:00
Wendelin
9ec9c7e56b Simplify dashboard background upload (#23633) 2025-01-09 09:25:09 +01:00
Paul Bottein
788441499a Remove ! from backup translation (#23648) 2025-01-08 20:56:06 +00:00
Jan-Philipp Benecke
712817df65 Focus search input on integrations dashboard when using search shotcut (#23647)
Focus search input on integrations dashboard when using search shortcut
2025-01-08 20:29:51 +00:00
Wendelin
f8264e4500 Add backup translations (#23365)
* Add translations

* Add summary and progress translations

* Add backups and settings translations

* Add backups page translations

* Add onboarding card translations

* Add settings translations

* Add details translations

* Translate delete

* Add data picker translations

* Use local add-ons

* Add encryption key translations

* Add new, generate and upload translations

* Add translations for restore backup

* Fix ts issue

* Add missing keys

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2025-01-08 21:05:28 +01:00
Norbert Rittel
50fa8dd269 Use ICU string for proper countdown via "1 minute" (#23636) 2025-01-08 17:41:02 +01:00
Petar Petrov
fc20716ff2 Decrease min_columns to 8 for hui-statistics-graph-card (#23639)
Increase min_columns to 8 for hui-statistics-graph-card
2025-01-08 17:39:19 +01:00
Wendelin
c6aec2db7d Voice assistants config: Filter unavailable assists (#23637)
Filter unavailable assists from num of assist devices.
2025-01-08 17:22:43 +02:00
karwosts
f75f4b9733 Retain event data when moving/resizing schedule item (#23621)
* Retain event data when moving/resizing schedule item

* update from suggestion
2025-01-08 14:08:16 +00:00
karwosts
b1acf9a057 Enable Statistics Graph card to integrate with Energy Dashboard (V2) (#23478)
* Simplify date subtraction

* Enable Statistics Graph card to integrate with Energy Dashboard

Adds boolean option `energy_date_selection` to Statistics Graph card. If
true, the graph will set its time range to that specified by an Energy
Date Picker card on the same dashboard, similar to the plots on the
Energy Dashboard.

* Revert UI addition

PR reviewer suggested it was too confusing, especially without
dynamically hiding the overridden days_to_show option.

* Remove boolean param energy_date_selection

and instead activate when collection_key is specified

* Revert "Remove boolean param energy_date_selection"

This reverts commit 95cebdbbe3.

* Don't assume !20903 has merged

* updates

* refresh when collection_key changes

---------

Co-authored-by: Andrew Reiter <reiterandrew@gmail.com>
2025-01-08 15:36:19 +02:00
Norbert Rittel
221b3932ed Fix typo in "unprovison" key name and string for zwave (#23634)
* Fix typo in "unprovison" key name and string

* Fix "unprovison" in zwave_js-provisioned.ts
2025-01-08 15:35:07 +02:00
libe.net
c50f701160 Show logbook component in more info for non-numeric values (#22997)
* if isNumeric ignore CONTINUOUS_DOMAINS

* use isNumeric  logic from history.ts

* removed check for stateObj.attributes.unit_of_measurement

* pass numericDevicesClasses to computeShowLogBookComponent

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2025-01-08 08:17:39 +00:00
Norbert Rittel
85bebfc309 Fix two occurrences of lowercase "id" and two wrong uses of "an" (#23624)
Fix two lowercase "id" and two wrong uses of "an"
2025-01-07 21:04:05 +01:00
Wendelin
6e90afc5bd Improve background-editor background-attachment alignment (#23615) 2025-01-07 14:48:28 +01:00
Jan-Philipp Benecke
e137e695ec Set fixed width for automation save dialog (#23618) 2025-01-07 14:13:19 +01:00
Petar Petrov
7133dc5688 Fix tooltip scrolling (#23616) 2025-01-07 13:44:56 +01:00
Yosi Levy
617480472e Minor RTL Fix (#23611)
Fixes
2025-01-07 11:59:25 +01:00
karwosts
6ef799be60 Restore attributes removed from ha-entity-marker in ha-map (#23603)
* Restore attributes removed from ha-entity-marker in ha-map

* Use Reflect
2025-01-07 10:10:26 +02:00
renovate[bot]
2cf1b7b6e6 Update dependency @octokit/auth-oauth-device to v7.1.2 (#23601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 18:03:13 +01:00
Bram Kragten
ebcee7680a Fix tooltip more info (#23605) 2025-01-06 17:56:38 +01:00
Paul Bottein
ffff7970f5 Improve error handling in backup status banner (#23604)
* Improve error handling in backup status banner

* Fix completion

* Fix loading

* Check attempt and completion date first
2025-01-06 17:30:37 +01:00
Bram Kragten
2a2b6d33b8 Update bug_report.yml 2025-01-06 17:15:59 +01:00
Norbert Rittel
61ed889370 Add ICU strings for proper singular / plural in Search fields (#23530)
It does not happen that often that the lists of devices, entities, helpers etc. are filtered down to a single item.

But in that case the labels currently use incorrect plural which is more irritating in some languages but also wrong in English.

This commit fixes this by adding ICU syntax to all six strings so these work properly in English and all derived translations.

For languages that need a different wording for `zero` this also helps translators in extending the ICU syntax for that case.
2025-01-06 16:06:44 +01:00
Bram Kragten
4cc95938c8 Remove backup toggle from supervisor addon page when update available (#23602) 2025-01-06 14:13:07 +01:00
Petar Petrov
63c658e5b9 Rename base sankey chart tag so it doesn't conflict with the custom card (#23600) 2025-01-06 12:42:43 +00:00
Ville Skyttä
3d1817a6b9 Spelling and grammar fixes (#23598) 2025-01-06 12:10:34 +01:00
Simon Lamon
8be2ca5392 Move python 3.12 to python 3.13 (#23585) 2025-01-06 09:31:13 +01:00
Norbert Rittel
f043886273 Add localizable "Filtering by config entry" for Entities and Devices (#23544)
* Add localizable "Filtering by config entry" to en.json

This commit adds two strings for localizing "Filtering by config entry" to the Entities panel and, referenced from there, to the Devices panel.

* Replace "Filtering by config entry" with localizable key

* Replace "Filtering by config entry" with localizable key

* Add missing comma

* Add missing }

* Add missing }
2025-01-06 09:54:07 +02:00
Norbert Rittel
ff75c89ed4 Add missing localizations for Voice Assistants > Expose headers (#23452)
* Add missing localizations for Voice Assistants > Expose headers

* Add localizable labels to Icon and Remove columns

* Variant with all changes on a single line

* Prettier?

* Revert

* Line length limited to 80 chars
2025-01-06 08:49:22 +02:00
Norbert Rittel
a8803de6e3 Add missing ui.panel.config.labels.headers.description (#23517)
The header "Description" for the Labels list only shows up as optional in a narrow view like on mobile.

This commit adds the missing string for proper localization.
2025-01-06 08:47:37 +02:00
karwosts
e9f3f71be1 Option to hide create box on todo card (#23571) 2025-01-06 08:45:53 +02:00
renovate[bot]
334c87b194 Update formatjs monorepo (#23592)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-05 21:02:31 +01:00
renovate[bot]
8db4a76bb9 Update dependency marked to v15.0.5 (#23591)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-05 20:59:42 +01:00
Bram Kragten
87884ac747 Add change of encryption key warning (#23570) 2025-01-03 15:48:20 +01:00
Bram Kragten
4ffec51a5e Fix restoring backup during onboarding (#23569) 2025-01-03 15:26:50 +01:00
Bram Kragten
71e10d5d8e Fix restore progress check logic (#23568) 2025-01-03 15:02:59 +01:00
Bram Kragten
cfbcb74ac2 Backup onboarding: Show close button when welcome is skipped (#23567) 2025-01-03 11:29:03 +01:00
Bram Kragten
3ff5b832bc Close restore dialog if done (#23566) 2025-01-03 11:17:40 +01:00
Bram Kragten
1faf024c5b fix error display upload backup (#23565) 2025-01-03 11:17:27 +01:00
Bram Kragten
6d48e725c7 Fix tabs subpage height on desktop (#23564)
fix tabs subpage height on desktop
2025-01-03 11:08:00 +01:00
Bram Kragten
052744e3d1 Update and add backup my links (#23556)
* Update and add backup my links
2025-01-02 16:18:34 +00:00
Bram Kragten
2945a7b701 Add back zopfli compression (#23555) 2025-01-02 16:54:35 +01:00
Bram Kragten
caf8fdf4c7 Add show encryption key dialog (#23552) 2025-01-02 16:12:31 +01:00
Bram Kragten
f19ca78b89 always zoom timeline charts on x axis (#23554) 2025-01-02 16:11:50 +01:00
Bram Kragten
0fba0e2850 Move local location backup setting (#23548) 2025-01-02 16:04:17 +01:00
Philipp
15606a5a90 Fix media management delete button misalignment (#23534) 2025-01-02 15:03:04 +00:00
Sören Beye
c7df147908 Changes to the valueText should also rescale ha-gauge text (#23536)
Changes to the valueText should also recenter ha-gauge text
2025-01-02 15:56:03 +01:00
Bram Kragten
031658eef4 Match UI with core and don't allow restore config without db and vice … (#23553)
Match UI with core and dont allow restore config without db and vice versa
2025-01-02 15:53:57 +01:00
Bram Kragten
fa672ffbba Backup with db requires config, disabled next if no data is selected (#23549) 2025-01-02 15:38:11 +01:00
Bram Kragten
34bcd5e71c Backup text updates (#23547) 2025-01-02 15:35:22 +01:00
Bram Kragten
73854efa57 Update change encryption key dialog (#23551) 2025-01-02 15:13:53 +01:00
Bram Kragten
a371b842da Add warning when no backup location is selected (#23550)
* Add warning when no backup location is selected

* Move to bottom
2025-01-02 15:13:42 +01:00
karwosts
b439c5d213 Display an error if saving new script times out (#23527)
* Display an error if saving new automation times out

* changes

* update

* string tweak

* Fix save failed for scripts
2025-01-02 13:46:36 +01:00
Marcin
04a9c67112 Fix copy on button to clear the selected background image (#23546) 2025-01-02 13:44:34 +01:00
Bram Kragten
012bd0714c Add space for the fab on datatable without tabs (#23545)
Add space for the fab on backups datatable
2025-01-02 13:44:04 +01:00
renovate[bot]
4e10d140d9 Update Yarn to v4.6.0 (#23532)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-01 15:46:25 +01:00
Norbert Rittel
8df67b8eb1 Device info: Add localizable string for "Set up voice assistant" (#23533)
* Add localizable string for "Set up voice assistant" to en.json

* Replace "Set up voice assistant" with localizable string
2025-01-01 15:45:31 +01:00
Bram Kragten
fb09eba831 Handle no cloud subscription better in backups (#23523) 2024-12-31 22:39:50 +01:00
karwosts
35faeb651b Display an error if saving new automation times out (#23518) 2024-12-31 19:49:45 +01:00
Bram Kragten
8daea5b565 Use last completed automatic backup time instead of last available ba… (#23522)
* Use last completed automatic backup time instead of last available backup

* Update ha-backup-overview-summary.ts

* Update src/panels/config/backup/components/overview/ha-backup-overview-summary.ts

* Update ha-config-backup-overview.ts
2024-12-31 18:14:16 +01:00
Bram Kragten
cd69c4c361 Fix password incorrect check when restoring backup (#23525) 2024-12-31 17:48:34 +01:00
Bram Kragten
eaab47a667 Fix automation traces (#23524) 2024-12-31 17:02:57 +01:00
renovate[bot]
d08a28ab9e Update dependency lint-staged to v15.3.0 (#23521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-31 14:36:01 +01:00
Bram Kragten
455cd0485e Fix overflow of backup agents (#23514) 2024-12-30 17:43:05 +01:00
Bram Kragten
f5ec2dcbe2 Fix copy encryption key (#23515) 2024-12-30 17:42:31 +01:00
Bram Kragten
6b039a1073 Add fallback for devices without name (#23513) 2024-12-30 17:06:26 +01:00
Simon Lamon
94c03be7ae Add script hide picker again (#23512) 2024-12-30 16:21:22 +01:00
Simon Lamon
4bf0a23513 Fix manual backup disabled with all backup locations (#23511) 2024-12-30 11:05:00 +00:00
Bram Kragten
f01388473a Revert "Automation/Script editor border-radius fix (#23267)" (#23475) 2024-12-30 11:55:44 +01:00
Petar Petrov
1d0c3da294 Add getGridOptions to history and statistics graph cards (#23476) 2024-12-30 11:54:00 +01:00
Petar Petrov
be849887a1 Button to reset chart zoom (#23469) 2024-12-30 11:52:52 +01:00
Petar Petrov
e1a6f6f0e3 Fix helper dialog close and add failsafe for similar cases (#23468) 2024-12-30 11:51:21 +01:00
Simon Lamon
d0327915db View background settings: Change transparancy to opacity (#23450) 2024-12-30 11:49:08 +01:00
Jan-Philipp Benecke
351d318c89 Fix dialog header (#23507) 2024-12-30 11:12:31 +01:00
Timothy Kist
7d1ca2acf0 Remove space at end of link from HAOS storage tip (#23492) 2024-12-29 19:36:24 +01:00
karwosts
49c377b1c4 Fix backups fab spacer (#23490) 2024-12-28 17:00:28 +00:00
Norbert Rittel
3fd3c8003a History: Improve explanation of selections by including labels as 4th option (#23479)
Improve explanation of selections by including labels as 4th option

This commit adds labels as the 4th option for data sources in history and the error message when you select 'Add current view as card' in that state from the overflow menu.
2024-12-27 20:03:18 +01:00
Petar Petrov
ccbb2704d1 Fix custom DNS saving (#23477) 2024-12-27 13:50:55 +00:00
Norbert Rittel
34218f08ef Replace most occurrences of "click" for touch-friendly wording (#23471)
* Replace most occurrences of "click" for touch-friendly wording

Home Assistant should avoid the term "click" or "clicking" as it can be used on (mobile) touch screen devices or with non-mechanical touch pads as well.

This commit changes most occurrences in en.json to either use "select" or "press" depending on context.

For "when you click on log out" it can be dropped completely.

* Change "select" to "press" for two more
2024-12-27 14:42:38 +01:00
Simon Lamon
cf91e6a2a3 Calendar trigger: Handle optional offset better (#23474)
Calendar empty offset
2024-12-27 15:29:02 +02:00
Petar Petrov
ab9759c6dd Add default border-radius values to .disabled-bar 2024-12-27 13:47:10 +01:00
Petar Petrov
95adbfcc12 Revert "Automation/Script editor border-radius fix (#23267)"
This reverts commit e9b2a83411.
2024-12-27 13:44:05 +01:00
renovate[bot]
1b9cbe434d Update dependency rspack-manifest-plugin to v5.0.3 (#23472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-27 14:18:50 +02:00
Norbert Rittel
918aa562c5 Improve description of Suspend connection option (#23470)
* Improve description of Suspend connection option

This removes the use of "we" which is kind of off as no person is involved in the process.

It also moves the word "suspend" in the headline and better explains the purpose.

* add comma

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2024-12-27 11:27:06 +00:00
libe.net
2ff0cb58bc Fix Energy-Dashboard unexpected Period Calculation (#23458)
* if not whole month, better use days for the period

* fix Type undefined error

* Update src/data/energy.ts

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

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2024-12-27 11:35:00 +02:00
Norbert Rittel
a94460a0c7 Replace "Show settings" with just "Settings" for automations (#23466)
For automations / scenes / scripts the menu item to open the settings dialog is currently "Show settings".

The use of "Show" is misleading here as this usually pairs with "Hide". It's also inconsistent as for all other settings in Home Assistant the menu items, buttons or tooltips don't use "show".

Also note that it's just "Information" or "Traces" for similar other items in the same menu.
2024-12-27 10:40:23 +02:00
ildar170975
60e57748f7 developer-tools-template: allow "select all" for "rendered" (#23456)
* Update developer-tools-template.ts

* Update developer-tools-template.ts

* remove extensions
2024-12-27 08:49:31 +02:00
renovate[bot]
0ecb8a6866 Update dependency @codemirror/language to v6.10.8 (#23461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-27 08:41:42 +02:00
Jan-Philipp Benecke
d9dfea938e Fix header of config entry system options dialog (#23455)
Fix config entry system options dialog header
2024-12-26 16:18:54 +02:00
Norbert Rittel
6fe4f94d55 Fix misleading use of "hidden" and "not shown" for disabled entities (#23449)
* Fix misleading use of "hidden" for disabled entities

Entities can be either hidden (by turning off "Visible") or disabled (by turning off "Enabled"),

The stings file uses the very misleading key "hidden_entities" for the count of disabled entities plus the words "not shown" which also pair with "hidden" instead of "disabled".

This commit fixes this by using "disabled" for both the key and in the link shown here.

* Replace "hidden_entities" with "disabled_entities"

Entities can be either hidden (by turning off "Visible") or disabled (by turning off "Enabled"),

The strings file uses the very misleading key "hidden_entities" for the count of disabled entities plus the words "not shown" which also pair with "hidden" instead of "disabled".

This commit fixes this by using "disabled" for the key name as well.

* Re-add accidentally deleted comma
2024-12-26 16:16:50 +02:00
Norbert Rittel
01bec32fd6 Improve explanation of passive zones (#23443)
Currently the explanation for passive zones says that they "are not used as location for device trackers" which is misleading and does not fit the second sentence that says: "This is useful if you just want to use it for automations.

This commit clarifies that by changing to "not shown as" and fixes the plural / singular mismatch between the two sentences.
2024-12-26 16:14:53 +02:00
karwosts
5453d6f7f5 Fix dialog-person-detail tracker selection (#23454) 2024-12-25 18:26:57 +00:00
Jan-Philipp Benecke
a0799a409b Fix chip spacing in automation/script save dialog (#23451) 2024-12-25 11:56:26 +01:00
Bram Kragten
704e7f279f change default of backup actions card feature to no backup (#23444) 2024-12-25 01:57:05 +01:00
Norbert Rittel
1daaf50773 Add missing localization for "Deselect all" button in (#23448)
* Add missing localization for "Deselect all" button to en.json

* Add code for localizing "Deselect all" to dialog-media-manage.ts
2024-12-25 01:56:26 +01:00
Paulus Schoutsen
54eb7d169c Fix typo in backups overview (#23446) 2024-12-24 19:39:33 +01:00
Bram Kragten
33b410dea0 Update ha-backup-overview-summary.ts 2024-12-24 17:31:02 +01:00
796 changed files with 21761 additions and 19687 deletions

View File

@@ -1,5 +1,4 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
FROM mcr.microsoft.com/devcontainers/python:3.12
FROM mcr.microsoft.com/devcontainers/python:1-3.13
ENV \
DEBIAN_FRONTEND=noninteractive \

View File

@@ -74,7 +74,7 @@ body:
If known, otherwise leave blank.
- type: input
attributes:
label: In which browser are you experiencing the issue with?
label: In which browser are you experiencing the issue?
placeholder: Google Chrome 88.0.4324.150
description: >
Provide the full name and don't forget to add the version!

View File

@@ -26,7 +26,7 @@ jobs:
ref: dev
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -62,7 +62,7 @@ jobs:
ref: master
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn

View File

@@ -26,7 +26,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -60,7 +60,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -78,7 +78,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -89,7 +89,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: frontend-bundle-stats
path: build/stats/*.json
@@ -102,7 +102,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -113,7 +113,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: supervisor-bundle-stats
path: build/stats/*.json

View File

@@ -27,7 +27,7 @@ jobs:
ref: dev
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -63,7 +63,7 @@ jobs:
ref: master
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn

View File

@@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn

View File

@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn

View File

@@ -6,7 +6,7 @@ on:
- cron: "0 1 * * *"
env:
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
NODE_OPTIONS: --max_old_space_size=6144
permissions:
@@ -28,7 +28,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -57,14 +57,14 @@ jobs:
run: tar -czvf translations.tar.gz translations
- name: Upload build artifacts
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: wheels
path: dist/home_assistant_frontend*.whl
if-no-files-found: error
- name: Upload translations
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: translations
path: translations.tar.gz

View File

@@ -18,6 +18,6 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6.0.0
- uses: release-drafter/release-drafter@v6.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -6,7 +6,7 @@ on:
- published
env:
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
NODE_OPTIONS: --max_old_space_size=6144
# Set default workflow permissions
@@ -34,7 +34,7 @@ jobs:
uses: home-assistant/actions/helpers/verify-version@master
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -55,7 +55,7 @@ jobs:
script/release
- name: Upload release assets
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: |
dist/*.whl
@@ -76,7 +76,7 @@ jobs:
- name: Build wheels
uses: home-assistant/wheels@2024.11.0
with:
abi: cp312
abi: cp313
tag: musllinux_1_2
arch: amd64
wheels-key: ${{ secrets.WHEELS_KEY }}
@@ -92,7 +92,7 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -107,7 +107,7 @@ jobs:
- name: Tar folder
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz
@@ -121,7 +121,7 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4.2.2
- name: Setup Node
uses: actions/setup-node@v4.1.0
uses: actions/setup-node@v4.2.0
with:
node-version-file: ".nvmrc"
cache: yarn
@@ -136,6 +136,6 @@ jobs:
- name: Tar folder
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 90 days stale policy
uses: actions/stale@v9.0.0
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90

File diff suppressed because one or more lines are too long

View File

@@ -6,4 +6,4 @@ enableGlobalCache: false
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs

View File

@@ -9,7 +9,7 @@ export default [
"import/extensions": "off",
"import/no-dynamic-require": "off",
"global-require": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-require-imports": "off",
"prefer-arrow-callback": "off",
},
},

View File

@@ -0,0 +1,17 @@
import "./app.js";
import "./cast.js";
import "./clean.js";
import "./compress.js";
import "./demo.js";
import "./download-translations.js";
import "./entry-html.js";
import "./fetch-nightly-translations.js";
import "./gallery.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./hassio.js";
import "./landing-page.js";
import "./locale-data.js";
import "./rspack.js";
import "./service-worker.js";
import "./translations.js";

View File

@@ -3,7 +3,7 @@ import "@material/mwc-list/mwc-list";
import type { ActionDetail } from "@material/mwc-list/mwc-list";
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
import type { Auth, Connection } from "home-assistant-js-websocket";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { LitElement, css, html } from "lit";
import { customElement, property, state } from "lit/decorators";
import type { CastManager } from "../../../../src/cast/cast_manager";
@@ -203,74 +203,72 @@ class HcCast extends LitElement {
}
this.connection.close();
location.reload();
} catch (err: any) {
} catch (_err: any) {
alert("Unable to log out!");
}
}
static get styles(): CSSResultGroup {
return css`
.center-item {
display: flex;
justify-content: space-around;
}
static styles = css`
.center-item {
display: flex;
justify-content: space-around;
}
.action-item {
display: flex;
align-items: center;
justify-content: space-between;
}
.action-item {
display: flex;
align-items: center;
justify-content: space-between;
}
.question {
position: relative;
padding: 8px 16px;
}
.question {
position: relative;
padding: 8px 16px;
}
.question:before {
border-radius: 4px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
content: "";
background-color: var(--primary-color);
opacity: 0.12;
will-change: opacity;
}
.question:before {
border-radius: 4px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
content: "";
background-color: var(--primary-color);
opacity: 0.12;
will-change: opacity;
}
.connection,
.connection a {
color: var(--secondary-text-color);
}
.connection,
.connection a {
color: var(--secondary-text-color);
}
mwc-button ha-svg-icon {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
height: 18px;
}
mwc-button ha-svg-icon {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
height: 18px;
}
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;
color: var(--secondary-text-color);
}
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;
color: var(--secondary-text-color);
}
:host([hide-icons]) ha-icon {
display: none;
}
:host([hide-icons]) ha-icon {
display: none;
}
.spacer {
flex: 1;
}
.spacer {
flex: 1;
}
.card-content a {
color: var(--primary-color);
}
`;
}
.card-content a {
color: var(--primary-color);
}
`;
}
declare global {

View File

@@ -13,7 +13,7 @@ import {
ERR_INVALID_HTTPS_TO_HTTP,
getAuth,
} from "home-assistant-js-websocket";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, state } from "lit/decorators";
import type { CastManager } from "../../../../src/cast/cast_manager";
@@ -215,7 +215,7 @@ export class HcConnect extends LitElement {
let url: URL;
try {
url = new URL(value);
} catch (err: any) {
} catch (_err: any) {
this.error = "Invalid URL";
return;
}
@@ -288,41 +288,39 @@ export class HcConnect extends LitElement {
try {
saveTokens(null);
location.reload();
} catch (err: any) {
} catch (_err: any) {
alert("Unable to log out!");
}
}
static get styles(): CSSResultGroup {
return css`
.card-content a {
color: var(--primary-color);
}
.card-actions a {
text-decoration: none;
}
.error {
color: red;
font-weight: bold;
}
static styles = css`
.card-content a {
color: var(--primary-color);
}
.card-actions a {
text-decoration: none;
}
.error {
color: red;
font-weight: bold;
}
.error a {
color: darkred;
}
.error a {
color: darkred;
}
mwc-button ha-svg-icon {
margin-left: 8px;
}
mwc-button ha-svg-icon {
margin-left: 8px;
}
.spacer {
flex: 1;
}
.spacer {
flex: 1;
}
ha-textfield {
width: 100%;
}
`;
}
ha-textfield {
width: 100%;
}
`;
}
declare global {

View File

@@ -1,6 +1,6 @@
import type { Auth, Connection, HassUser } from "home-assistant-js-websocket";
import { getUser } from "home-assistant-js-websocket";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../../src/components/ha-card";
@@ -63,96 +63,94 @@ class HcLayout extends LitElement {
}
}
static get styles(): CSSResultGroup {
return css`
static styles = css`
:host {
display: flex;
min-height: 100%;
align-items: center;
justify-content: center;
flex-direction: column;
}
ha-card {
display: flex;
width: 100%;
max-width: 500px;
}
.layout {
display: flex;
flex-direction: column;
}
.card-header {
color: var(--ha-card-header-color, var(--primary-text-color));
font-family: var(--ha-card-header-font-family, inherit);
font-size: var(--ha-card-header-font-size, 24px);
letter-spacing: -0.012em;
line-height: 32px;
padding: 24px 16px 16px;
display: block;
margin: 0;
}
.hero {
border-radius: 4px 4px 0 0;
}
.subtitle {
font-size: 14px;
color: var(--secondary-text-color);
line-height: initial;
}
.subtitle a {
color: var(--secondary-text-color);
}
:host ::slotted(.card-content:not(:first-child)),
slot:not(:first-child)::slotted(.card-content) {
padding-top: 0px;
margin-top: -8px;
}
:host ::slotted(.section-header) {
font-weight: 500;
padding: 4px 16px;
text-transform: uppercase;
}
:host ::slotted(.card-content) {
padding: 16px;
flex: 1;
}
:host ::slotted(.card-actions) {
border-top: 1px solid #e8e8e8;
padding: 5px 16px;
display: flex;
}
img {
width: 100%;
}
.footer {
text-align: center;
font-size: 12px;
padding: 8px 0 24px;
color: var(--secondary-text-color);
}
.footer a {
color: var(--secondary-text-color);
}
@media all and (max-width: 500px) {
:host {
display: flex;
min-height: 100%;
align-items: center;
justify-content: center;
flex-direction: column;
justify-content: flex-start;
min-height: 90%;
margin-bottom: 30px;
}
ha-card {
display: flex;
width: 100%;
max-width: 500px;
}
.layout {
display: flex;
flex-direction: column;
}
.card-header {
color: var(--ha-card-header-color, var(--primary-text-color));
font-family: var(--ha-card-header-font-family, inherit);
font-size: var(--ha-card-header-font-size, 24px);
letter-spacing: -0.012em;
line-height: 32px;
padding: 24px 16px 16px;
display: block;
margin: 0;
}
.hero {
border-radius: 4px 4px 0 0;
}
.subtitle {
font-size: 14px;
color: var(--secondary-text-color);
line-height: initial;
}
.subtitle a {
color: var(--secondary-text-color);
}
:host ::slotted(.card-content:not(:first-child)),
slot:not(:first-child)::slotted(.card-content) {
padding-top: 0px;
margin-top: -8px;
}
:host ::slotted(.section-header) {
font-weight: 500;
padding: 4px 16px;
text-transform: uppercase;
}
:host ::slotted(.card-content) {
padding: 16px;
flex: 1;
}
:host ::slotted(.card-actions) {
border-top: 1px solid #e8e8e8;
padding: 5px 16px;
display: flex;
}
img {
width: 100%;
}
.footer {
text-align: center;
font-size: 12px;
padding: 8px 0 24px;
color: var(--secondary-text-color);
}
.footer a {
color: var(--secondary-text-color);
}
@media all and (max-width: 500px) {
:host {
justify-content: flex-start;
min-height: 90%;
margin-bottom: 30px;
}
}
`;
}
}
`;
}
declare global {

View File

@@ -1,4 +1,4 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import type { HomeAssistant } from "../../../../src/types";
@@ -24,31 +24,29 @@ class HcLaunchScreen extends LitElement {
`;
}
static get styles(): CSSResultGroup {
return css`
:host {
display: block;
height: 100vh;
background-color: #f2f4f9;
font-size: 24px;
}
.container {
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
height: 100%;
justify-content: space-evenly;
}
img {
max-width: 80%;
object-fit: cover;
}
.status {
color: #1d2126;
}
`;
}
static styles = css`
:host {
display: block;
height: 100vh;
background-color: #f2f4f9;
font-size: 24px;
}
.container {
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
height: 100%;
justify-content: space-evenly;
}
img {
max-width: 80%;
object-fit: cover;
}
.status {
color: #1d2126;
}
`;
}
declare global {

View File

@@ -1,10 +1,4 @@
import {
css,
type CSSResultGroup,
html,
LitElement,
type TemplateResult,
} from "lit";
import { css, html, LitElement, type TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
@@ -117,20 +111,18 @@ class HcLovelace extends LitElement {
return undefined;
}
static get styles(): CSSResultGroup {
return css`
hui-view-container {
display: flex;
position: relative;
min-height: 100vh;
box-sizing: border-box;
}
hui-view {
flex: 1 1 100%;
max-width: 100%;
}
`;
}
static styles = css`
hui-view-container {
display: flex;
position: relative;
min-height: 100vh;
box-sizing: border-box;
}
hui-view-container > * {
flex: 1 1 100%;
max-width: 100%;
}
`;
}
export interface CastViewChanged {

View File

@@ -3,7 +3,7 @@ import type { Lovelace } from "../../../src/panels/lovelace/types";
import { energyEntities } from "../stubs/entities";
import type { DemoConfig } from "./types";
export const demoConfigs: Array<() => Promise<DemoConfig>> = [
export const demoConfigs: (() => Promise<DemoConfig>)[] = [
() => import("./sections").then((mod) => mod.demoSections),
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),

View File

@@ -1,5 +1,4 @@
import { mdiTelevision } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, state } from "lit/decorators";
import type { CastManager } from "../../../src/cast/cast_manager";
@@ -67,37 +66,35 @@ class CastDemoRow extends LitElement implements LovelaceRow {
this.style.display = this._castManager ? "" : "none";
}
static get styles(): CSSResultGroup {
return css`
:host {
display: flex;
align-items: center;
}
ha-svg-icon {
padding: 8px;
color: var(--paper-item-icon-color);
}
.flex {
flex: 1;
overflow: hidden;
margin-left: 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
google-cast-launcher {
cursor: pointer;
display: inline-block;
height: 24px;
width: 24px;
}
`;
}
static styles = css`
:host {
display: flex;
align-items: center;
}
ha-svg-icon {
padding: 8px;
color: var(--paper-item-icon-color);
}
.flex {
flex: 1;
overflow: hidden;
margin-left: 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
google-cast-launcher {
cursor: pointer;
display: inline-block;
height: 24px;
width: 24px;
}
`;
}
declare global {

View File

@@ -32,6 +32,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
return this._hidden ? 0 : 2;
}
// eslint-disable-next-line @typescript-eslint/no-empty-function
public setConfig(_config: LovelaceCardConfig) {}
protected render() {

View File

@@ -131,6 +131,7 @@ export const mockHistory = (mockHass: MockHomeAssistant) => {
});
}, 1);
// eslint-disable-next-line @typescript-eslint/no-empty-function
return () => {};
}
);

View File

@@ -43,7 +43,7 @@ customElements.whenDefined("hui-root").then(() => {
const index = (ev as CustomEvent).detail.index;
try {
await setDemoConfig(this.hass, this.lovelace!, index);
} catch (err: any) {
} catch (_err: any) {
setDemoConfig(this.hass, this.lovelace!, selectedDemoConfigIndex);
alert("Failed to switch config :-(");
}

View File

@@ -15,6 +15,7 @@ export const mockPersistentNotification = (hass: MockHomeAssistant) => {
},
},
} as PersistentNotificationMessage);
// eslint-disable-next-line @typescript-eslint/no-empty-function
return () => {};
});
};

View File

@@ -15,7 +15,7 @@ import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
const generateMeanStatistics = (
start: Date,
end: Date,
// eslint-disable-next-line @typescript-eslint/default-param-last
// eslint-disable-next-line default-param-last
period: "5minute" | "hour" | "day" | "month" = "hour",
initValue: number,
maxDiff: number
@@ -52,7 +52,7 @@ const generateMeanStatistics = (
const generateSumStatistics = (
start: Date,
end: Date,
// eslint-disable-next-line @typescript-eslint/default-param-last
// eslint-disable-next-line default-param-last
period: "5minute" | "hour" | "day" | "month" = "hour",
initValue: number,
maxDiff: number
@@ -89,7 +89,7 @@ const generateSumStatistics = (
const generateCurvedStatistics = (
start: Date,
end: Date,
// eslint-disable-next-line @typescript-eslint/default-param-last
// eslint-disable-next-line default-param-last
_period: "5minute" | "hour" | "day" | "month" = "hour",
initValue: number,
maxDiff: number,

View File

@@ -11,6 +11,7 @@ export const mockTemplate = (hass: MockHomeAssistant) => {
result: msg.template,
listeners: { all: false, domains: [], entities: [], time: false },
});
// eslint-disable-next-line @typescript-eslint/no-empty-function
return () => {};
});
};

View File

@@ -22,5 +22,6 @@ export const mockTodo = (hass: MockHomeAssistant) => {
},
] as TodoItem[],
}));
// eslint-disable-next-line @typescript-eslint/no-empty-function
hass.mockWS("todo/item/subscribe", (_msg, _hass) => () => {});
};

View File

@@ -18,8 +18,9 @@ const compat = new FlatCompat({
export default [
...compat.extends(
"airbnb-base",
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/stylistic",
"plugin:wc/recommended",
"plugin:lit/all",
"plugin:lit-a11y/recommended",
@@ -50,8 +51,6 @@ export default [
ecmaFeatures: {
modules: true,
},
project: "./tsconfig.json",
},
},
@@ -148,15 +147,15 @@ export default [
},
],
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-vars": [
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
@@ -174,6 +173,16 @@ export default [
"lit-a11y/role-has-required-aria-attrs": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
camelcase: "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-empty-object-type": [
"error",
{
allowInterfaces: "always",
allowObjectTypes: "always",
},
],
"no-use-before-define": "off",
},
},
];

View File

@@ -177,26 +177,24 @@ export class DemoAutomationDescribeAction extends LitElement {
this._action = ev.detail.isValid ? ev.detail.value : undefined;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.action {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.action {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
declare global {

View File

@@ -98,26 +98,24 @@ export class DemoAutomationDescribeCondition extends LitElement {
this._condition = ev.detail.isValid ? ev.detail.value : undefined;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.condition {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.condition {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
declare global {

View File

@@ -121,26 +121,24 @@ export class DemoAutomationDescribeTrigger extends LitElement {
this._trigger = ev.detail.isValid ? ev.detail.value : undefined;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.trigger {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.trigger {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
span {
margin-right: 16px;
}
ha-yaml-editor {
width: 50%;
}
`;
}
declare global {

View File

@@ -58,22 +58,20 @@ export class DemoAutomationTraceTimeline extends LitElement {
hass.updateTranslations("config", "en");
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px;
}
.card-content {
display: flex;
}
button {
position: absolute;
top: 0;
right: 0;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px;
}
.card-content {
display: flex;
}
button {
position: absolute;
top: 0;
right: 0;
}
`;
}
declare global {

View File

@@ -68,28 +68,26 @@ export class DemoAutomationTrace extends LitElement {
this._selected = { ...this._selected, [sampleIdx]: ev.detail.path };
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px;
}
.card-content {
display: flex;
}
.card-content > * {
margin-right: 16px;
}
.card-content > *:last-child {
margin-right: 0;
}
button {
position: absolute;
top: 0;
right: 0;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px;
}
.card-content {
display: flex;
}
.card-content > * {
margin-right: 16px;
}
.card-content > *:last-child {
margin-right: 0;
}
button {
position: absolute;
top: 0;
right: 0;
}
`;
}
declare global {

View File

@@ -177,46 +177,44 @@ export class DemoHaAlert extends LitElement {
);
}
static get styles() {
return css`
:host {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
ha-card {
margin: 24px auto;
}
ha-alert {
display: block;
margin: 24px 0;
}
.condition {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.image {
display: inline-flex;
height: 100%;
align-items: center;
}
img {
max-height: 24px;
width: 24px;
}
mwc-button {
--mdc-theme-primary: var(--primary-text-color);
}
`;
}
static styles = css`
:host {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
ha-card {
margin: 24px auto;
}
ha-alert {
display: block;
margin: 24px 0;
}
.condition {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.image {
display: inline-flex;
height: 100%;
align-items: center;
}
img {
max-height: 24px;
width: 24px;
}
mwc-button {
--mdc-theme-primary: var(--primary-text-color);
}
`;
}
declare global {

View File

@@ -63,20 +63,18 @@ export class DemoHaBar extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.warning {
--ha-bar-primary-color: var(--warning-color);
}
.error {
--ha-bar-primary-color: var(--error-color);
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.warning {
--ha-bar-primary-color: var(--warning-color);
}
.error {
--ha-bar-primary-color: var(--error-color);
}
`;
}
declare global {

View File

@@ -103,19 +103,17 @@ export class DemoHaChips extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
flex-direction: column;
align-items: flex-start;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
flex-direction: column;
align-items: flex-start;
}
`;
}
declare global {

View File

@@ -48,14 +48,12 @@ export class DemoHaCircularProgress extends LitElement {
></ha-card>`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
`;
}
declare global {

View File

@@ -14,12 +14,12 @@ import "../../../../src/components/ha-card";
import "../../../../src/components/ha-svg-icon";
import "../../../../src/components/ha-control-button-group";
type Button = {
interface Button {
label: string;
icon?: string;
class?: string;
disabled?: boolean;
};
}
const buttons: Button[] = [
{
@@ -35,10 +35,10 @@ const buttons: Button[] = [
},
];
type ButtonGroup = {
interface ButtonGroup {
vertical?: boolean;
class?: string;
};
}
const buttonGroups: ButtonGroup[] = [
{},
@@ -137,53 +137,51 @@ export class DemoHaBarButton extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-button-icon-color: var(--primary-color);
--control-button-background-color: var(--primary-color);
--control-button-background-opacity: 0.2;
--control-button-border-radius: 18px;
height: 100px;
width: 100px;
}
.custom-group {
--control-button-group-thickness: 100px;
--control-button-group-border-radius: 36px;
--control-button-group-spacing: 20px;
}
.custom-group ha-control-button {
--control-button-border-radius: 18px;
--mdc-icon-size: 32px;
}
.vertical-buttons {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-switches > *:not(:last-child) {
margin-right: 4px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-button-icon-color: var(--primary-color);
--control-button-background-color: var(--primary-color);
--control-button-background-opacity: 0.2;
--control-button-border-radius: 18px;
height: 100px;
width: 100px;
}
.custom-group {
--control-button-group-thickness: 100px;
--control-button-group-border-radius: 36px;
--control-button-group-spacing: 20px;
}
.custom-group ha-control-button {
--control-button-border-radius: 18px;
--mdc-icon-size: 32px;
}
.vertical-buttons {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-switches > *:not(:last-child) {
margin-right: 4px;
}
`;
}
declare global {

View File

@@ -133,39 +133,37 @@ export class DemoHaCircularSlider extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
p.title {
margin-bottom: 12px;
}
ha-control-circular-slider {
--control-circular-slider-color: #ff9800;
}
ha-control-circular-slider[inverted] {
--control-circular-slider-color: #2196f3;
}
ha-control-circular-slider[dual] {
--control-circular-slider-high-color: #2196f3;
--control-circular-slider-low-color: #ff9800;
}
.field {
display: flex;
flex-direction: row;
align-items: center;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
p.title {
margin-bottom: 12px;
}
ha-control-circular-slider {
--control-circular-slider-color: #ff9800;
}
ha-control-circular-slider[inverted] {
--control-circular-slider-color: #2196f3;
}
ha-control-circular-slider[dual] {
--control-circular-slider-high-color: #2196f3;
--control-circular-slider-low-color: #ff9800;
}
.field {
display: flex;
flex-direction: row;
align-items: center;
}
`;
}
declare global {

View File

@@ -73,32 +73,30 @@ export class DemoHarControlNumberButtons extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
color: #2196f3;
--control-number-buttons-color: #2196f3;
--control-number-buttons-background-color: #2196f3;
--control-number-buttons-background-opacity: 0.1;
--control-number-buttons-thickness: 100px;
--control-number-buttons-border-radius: 36px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
color: #2196f3;
--control-number-buttons-color: #2196f3;
--control-number-buttons-background-color: #2196f3;
--control-number-buttons-background-opacity: 0.1;
--control-number-buttons-thickness: 100px;
--control-number-buttons-border-radius: 36px;
}
`;
}
declare global {

View File

@@ -8,19 +8,19 @@ import "../../../../src/components/ha-control-select-menu";
import "../../../../src/components/ha-list-item";
import "../../../../src/components/ha-svg-icon";
type SelectMenuOptions = {
interface SelectMenuOptions {
label: string;
value: string;
icon?: string;
};
}
type SelectMenu = {
interface SelectMenu {
label: string;
icon: string;
class?: string;
disabled?: boolean;
options: SelectMenuOptions[];
};
}
const selects: SelectMenu[] = [
{
@@ -112,32 +112,30 @@ export class DemoHaControlSelectMenu extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-button-icon-color: var(--primary-color);
--control-button-background-color: var(--primary-color);
--control-button-background-opacity: 0.2;
--control-button-border-radius: 18px;
height: 100px;
width: 100px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-button-icon-color: var(--primary-color);
--control-button-background-color: var(--primary-color);
--control-button-background-opacity: 0.2;
--control-button-border-radius: 18px;
height: 100px;
width: 100px;
}
`;
}
declare global {

View File

@@ -168,42 +168,40 @@ export class DemoHaControlSelect extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--mdc-icon-size: 24px;
--control-select-color: var(--state-fan-active-color);
--control-select-thickness: 130px;
--control-select-border-radius: 36px;
}
.vertical-selects {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-selects > *:not(:last-child) {
margin-right: 4px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--mdc-icon-size: 24px;
--control-select-color: var(--state-fan-active-color);
--control-select-thickness: 130px;
--control-select-border-radius: 36px;
}
.vertical-selects {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-selects > *:not(:last-child) {
margin-right: 4px;
}
`;
}
declare global {

View File

@@ -131,43 +131,41 @@ export class DemoHaBarSlider extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-slider-color: #ffcf4c;
--control-slider-background: #ffcf4c;
--control-slider-background-opacity: 0.2;
--control-slider-thickness: 130px;
--control-slider-border-radius: 36px;
}
.vertical-sliders {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-sliders > *:not(:last-child) {
margin-right: 4px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-slider-color: #ffcf4c;
--control-slider-background: #ffcf4c;
--control-slider-background-opacity: 0.2;
--control-slider-thickness: 130px;
--control-slider-border-radius: 36px;
}
.vertical-sliders {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-sliders > *:not(:last-child) {
margin-right: 4px;
}
`;
}
declare global {

View File

@@ -99,44 +99,42 @@ export class DemoHaControlSwitch extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-switch-on-color: var(--green-color);
--control-switch-off-color: var(--red-color);
--control-switch-thickness: 130px;
--control-switch-border-radius: 36px;
--control-switch-padding: 6px;
--mdc-icon-size: 24px;
}
.vertical-switches {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-switches > *:not(:last-child) {
margin-right: 4px;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--control-switch-on-color: var(--green-color);
--control-switch-off-color: var(--red-color);
--control-switch-thickness: 130px;
--control-switch-border-radius: 36px;
--control-switch-padding: 6px;
--mdc-icon-size: 24px;
}
.vertical-switches {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-switches > *:not(:last-child) {
margin-right: 4px;
}
`;
}
declare global {

View File

@@ -143,13 +143,11 @@ export class DemoHaExpansionPanel extends LitElement {
`;
}
static get styles() {
return css`
ha-expansion-panel {
margin: -16px;
}
`;
}
static styles = css`
ha-expansion-panel {
margin: -16px;
}
`;
}
declare global {

View File

@@ -61,14 +61,12 @@ export class DemoHaFaded extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
`;
}
declare global {

View File

@@ -124,6 +124,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},
@@ -135,6 +137,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},
@@ -146,6 +150,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},

View File

@@ -91,27 +91,25 @@ export class DemoHaHsColorPicker extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
align-items: center;
flex-direction: column;
}
ha-hs-color-picker {
width: 400px;
}
.value {
font-size: 22px;
font-weight: bold;
margin: 0 0 12px 0;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
align-items: center;
flex-direction: column;
}
ha-hs-color-picker {
width: 400px;
}
.value {
font-size: 22px;
font-weight: bold;
margin: 0 0 12px 0;
}
`;
}
declare global {

View File

@@ -95,25 +95,23 @@ export class DemoHaLabelBadge extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-left: 16px;
background-color: var(--markdown-code-background-color);
padding: 8px;
}
.badge {
display: flex;
flex-direction: row;
margin-bottom: 16px;
align-items: center;
}
`;
}
static styles = css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-left: 16px;
background-color: var(--markdown-code-background-color);
padding: 8px;
}
.badge {
display: flex;
flex-direction: row;
margin-bottom: 16px;
align-items: center;
}
`;
}
declare global {

View File

@@ -123,6 +123,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},
@@ -134,6 +136,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},
@@ -145,6 +149,8 @@ const AREAS: AreaRegistryEntry[] = [
picture: null,
aliases: [],
labels: [],
temperature_entity_id: null,
humidity_entity_id: null,
created_at: 0,
modified_at: 0,
},

View File

@@ -48,27 +48,25 @@ export class DemoHaTip extends LitElement {
);
}
static get styles() {
return css`
:host {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
ha-tip {
margin-bottom: 14px;
}
ha-card {
margin: 24px auto;
}
`;
}
static styles = css`
:host {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
ha-tip {
margin-bottom: 14px;
}
ha-card {
margin: 24px auto;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeNumeric extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeSeconds extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeShortYear extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeShort extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeDateTime extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 900px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -90,28 +90,26 @@ export class DemoDateTimeDate extends LitElement {
`;
}
static get styles() {
return css`
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeTimeSeconds extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeTimeWeekday extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 800px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 800px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -100,32 +100,30 @@ export class DemoDateTimeTime extends LitElement {
`;
}
static get styles() {
return css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
static styles = css`
ha-control-select {
max-width: 800px;
margin: 12px auto;
}
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
declare global {

View File

@@ -321,13 +321,13 @@ function createEntity(
};
}
type EntityRowData = {
interface EntityRowData {
stateObj: HassEntity;
entity_id: string;
state: string;
device_class?: string;
domain: string;
};
}
function createRowData(stateObj: HassEntity): EntityRowData {
return {
@@ -429,17 +429,15 @@ export class DemoEntityState extends LitElement {
`;
}
static get styles() {
return css`
.color {
display: block;
height: 20px;
width: 20px;
border-radius: 10px;
background-color: rgb(--color);
}
`;
}
static styles = css`
.color {
display: block;
height: 20px;
width: 20px;
border-radius: 10px;
background-color: rgb(--color);
}
`;
}
declare global {

View File

@@ -76,14 +76,12 @@ export class DemoMiscMarkdown extends LitElement {
`;
}
static get styles() {
return css`
ha-card {
margin: 12px;
padding: 12px;
}
`;
}
static styles = css`
ha-card {
margin: 12px;
padding: 12px;
}
`;
}
declare global {

View File

@@ -135,12 +135,12 @@ const configFlows: DataEntryFlowProgressExtended[] = [
},
];
const configEntries: Array<{
const configEntries: {
items: ConfigEntryExtended[];
is_custom?: boolean;
disabled?: boolean;
highlight?: string;
}> = [
}[] = [
{ items: [loadedEntry] },
{ items: [configPanelEntry] },
{ items: [optionsFlowEntry] },
@@ -349,26 +349,24 @@ export class DemoIntegrationCard extends LitElement {
this.isCloud = !this.isCloud;
}
static get styles() {
return css`
.container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-gap: 8px 8px;
padding: 8px 16px 16px;
margin-bottom: 16px;
}
static styles = css`
.container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-gap: 8px 8px;
padding: 8px 16px 16px;
margin-bottom: 16px;
}
.container > * {
max-width: 500px;
}
.container > * {
max-width: 500px;
}
ha-formfield {
margin: 8px 0;
display: block;
}
`;
}
ha-formfield {
margin: 8px 0;
display: block;
}
`;
}
declare global {

View File

@@ -1,16 +1,4 @@
import { globIterate } from "glob";
import { availableParallelism } from "node:os";
import "./build-scripts/gulp/index.mjs";
process.env.UV_THREADPOOL_SIZE = availableParallelism();
const gulpImports = [];
for await (const gulpModule of globIterate("build-scripts/gulp/*.?(c|m)js", {
dotRelative: true,
})) {
gulpImports.push(import(gulpModule));
}
// Since all tasks are currently registered with gulp.task(), this is enough
// If any are converted to named exports, need to loop and aggregate exports here
await Promise.all(gulpImports);

View File

@@ -1,7 +1,7 @@
import type { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
import "@material/mwc-list/mwc-list-item";
import { mdiDotsVertical } from "@mdi/js";
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
import type { PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
@@ -211,35 +211,33 @@ export class HassioAddonStore extends LitElement {
this._filter = e.detail.value;
}
static get styles(): CSSResultGroup {
return css`
hassio-addon-repository {
margin-top: 24px;
}
.search {
position: sticky;
top: 0;
z-index: 2;
}
search-input {
display: block;
--mdc-text-field-fill-color: var(--sidebar-background-color);
--mdc-text-field-idle-line-color: var(--divider-color);
}
.advanced {
padding: 12px;
display: flex;
flex-wrap: wrap;
color: var(--primary-text-color);
}
.advanced a {
margin-left: 0.5em;
margin-inline-start: 0.5em;
margin-inline-end: initial;
color: var(--primary-color);
}
`;
}
static styles = css`
hassio-addon-repository {
margin-top: 24px;
}
.search {
position: sticky;
top: 0;
z-index: 2;
}
search-input {
display: block;
--mdc-text-field-fill-color: var(--sidebar-background-color);
--mdc-text-field-idle-line-color: var(--divider-color);
}
.advanced {
padding: 12px;
display: flex;
flex-wrap: wrap;
color: var(--primary-text-color);
}
.advanced a {
margin-left: 0.5em;
margin-inline-start: 0.5em;
margin-inline-end: initial;
color: var(--primary-color);
}
`;
}
declare global {

View File

@@ -299,7 +299,7 @@ class HassioAddonConfig extends LitElement {
if (this.addon.schema && this._canShowSchema && !this._yamlMode) {
this._valid = true;
this._configHasChanged = true;
this._options! = ev.detail.value;
this._options = ev.detail.value;
} else {
this._configHasChanged = true;
this._valid = ev.detail.isValid;

View File

@@ -151,7 +151,7 @@ class HassioAddonNetwork extends LitElement {
private async _configChanged(ev: CustomEvent): Promise<void> {
this._configHasChanged = true;
this._config! = ev.detail.value;
this._config = ev.detail.value;
}
private async _resetTapped(ev: CustomEvent): Promise<void> {

View File

@@ -1,5 +1,5 @@
import { mdiHelpCircle } from "@mdi/js";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../src/components/ha-svg-icon";
@@ -64,86 +64,84 @@ class HassioCardContent extends LitElement {
`;
}
static get styles(): CSSResultGroup {
return css`
:host {
direction: ltr;
}
static styles = css`
:host {
direction: ltr;
}
ha-svg-icon {
margin-right: 24px;
margin-left: 8px;
margin-top: 12px;
float: left;
color: var(--secondary-text-color);
}
ha-svg-icon.update {
color: var(--warning-color);
}
ha-svg-icon.running,
ha-svg-icon.installed {
color: var(--success-color);
}
ha-svg-icon.hassupdate,
ha-svg-icon.backup {
color: var(--paper-item-icon-color);
}
ha-svg-icon.not_available {
color: var(--error-color);
}
.title {
color: var(--primary-text-color);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.addition {
color: var(--secondary-text-color);
overflow: hidden;
position: relative;
height: 2.4em;
line-height: 1.2em;
}
.icon_image img {
max-height: 40px;
max-width: 40px;
margin-top: 4px;
margin-right: 16px;
float: left;
}
.icon_image.stopped,
.icon_image.not_available {
filter: grayscale(1);
}
.dot {
position: absolute;
background-color: var(--warning-color);
width: 12px;
height: 12px;
top: 8px;
right: 8px;
border-radius: 50%;
}
.topbar {
position: absolute;
width: 100%;
height: 2px;
top: 0;
left: 0;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.topbar.installed {
background-color: var(--primary-color);
}
.topbar.update {
background-color: var(--accent-color);
}
.topbar.unavailable {
background-color: var(--error-color);
}
`;
}
ha-svg-icon {
margin-right: 24px;
margin-left: 8px;
margin-top: 12px;
float: left;
color: var(--secondary-text-color);
}
ha-svg-icon.update {
color: var(--warning-color);
}
ha-svg-icon.running,
ha-svg-icon.installed {
color: var(--success-color);
}
ha-svg-icon.hassupdate,
ha-svg-icon.backup {
color: var(--paper-item-icon-color);
}
ha-svg-icon.not_available {
color: var(--error-color);
}
.title {
color: var(--primary-text-color);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.addition {
color: var(--secondary-text-color);
overflow: hidden;
position: relative;
height: 2.4em;
line-height: 1.2em;
}
.icon_image img {
max-height: 40px;
max-width: 40px;
margin-top: 4px;
margin-right: 16px;
float: left;
}
.icon_image.stopped,
.icon_image.not_available {
filter: grayscale(1);
}
.dot {
position: absolute;
background-color: var(--warning-color);
width: 12px;
height: 12px;
top: 8px;
right: 8px;
border-radius: 50%;
}
.topbar {
position: absolute;
width: 100%;
height: 2px;
top: 0;
left: 0;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.topbar.installed {
background-color: var(--primary-color);
}
.topbar.update {
background-color: var(--accent-color);
}
.topbar.unavailable {
background-color: var(--error-color);
}
`;
}
declare global {

View File

@@ -15,7 +15,7 @@ import type { LocalizeFunc } from "../../../src/common/translations/localize";
declare global {
interface HASSDomEvents {
"backup-uploaded": { backup: HassioBackup };
"backup-cleared": void;
"backup-cleared": undefined;
}
}

View File

@@ -1,5 +1,5 @@
import { mdiFolder, mdiPuzzle } from "@mdi/js";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, query } from "lit/decorators";
import { atLeastVersion } from "../../../src/common/config/version";
@@ -283,52 +283,50 @@ export class SupervisorBackupContent extends LitElement {
this.homeAssistant = !this.homeAssistant;
}
static get styles(): CSSResultGroup {
return css`
.partial-picker ha-formfield {
display: block;
}
.partial-picker ha-checkbox {
--mdc-checkbox-touch-target-size: 32px;
}
.partial-picker {
display: block;
margin: 0px -6px;
}
supervisor-formfield-label {
display: inline-flex;
align-items: center;
}
hr {
border-color: var(--divider-color);
border-bottom: none;
margin: 16px 0;
}
.details {
color: var(--secondary-text-color);
}
.section-content {
display: flex;
flex-direction: column;
margin-left: 30px;
margin-inline-start: 30px;
margin-inline-end: initial;
}
ha-formfield.password {
display: block;
margin: 0 -14px -16px;
}
.backup-types {
display: flex;
margin-left: -13px;
margin-inline-start: -13px;
margin-inline-end: initial;
}
.sub-header {
margin-top: 8px;
}
`;
}
static styles = css`
.partial-picker ha-formfield {
display: block;
}
.partial-picker ha-checkbox {
--mdc-checkbox-touch-target-size: 32px;
}
.partial-picker {
display: block;
margin: 0px -6px;
}
supervisor-formfield-label {
display: inline-flex;
align-items: center;
}
hr {
border-color: var(--divider-color);
border-bottom: none;
margin: 16px 0;
}
.details {
color: var(--secondary-text-color);
}
.section-content {
display: flex;
flex-direction: column;
margin-left: 30px;
margin-inline-start: 30px;
margin-inline-end: initial;
}
ha-formfield.password {
display: block;
margin: 0 -14px -16px;
}
.backup-types {
display: flex;
margin-left: -13px;
margin-inline-start: -13px;
margin-inline-end: initial;
}
.sub-header {
margin-top: 8px;
}
`;
public backupDetails():
| HassioPartialBackupCreateParams

View File

@@ -1,4 +1,4 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../src/components/ha-svg-icon";
@@ -30,29 +30,27 @@ class SupervisorFormfieldLabel extends LitElement {
`;
}
static get styles(): CSSResultGroup {
return css`
:host {
display: flex;
align-items: center;
}
.label {
margin-right: 4px;
margin-inline-end: 4px;
margin-inline-start: initial;
}
.version {
color: var(--secondary-text-color);
}
.icon {
max-height: 22px;
max-width: 22px;
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
}
`;
}
static styles = css`
:host {
display: flex;
align-items: center;
}
.label {
margin-right: 4px;
margin-inline-end: 4px;
margin-inline-start: initial;
}
.version {
color: var(--secondary-text-color);
}
.icon {
max-height: 22px;
max-width: 22px;
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
}
`;
}
declare global {

View File

@@ -1,4 +1,4 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
@@ -31,46 +31,41 @@ class SupervisorMetric extends LitElement {
</ha-settings-row>`;
}
static get styles(): CSSResultGroup {
return css`
ha-settings-row {
padding: 0;
height: 54px;
width: 100%;
}
ha-settings-row > div[slot="description"] {
white-space: normal;
color: var(--secondary-text-color);
display: flex;
justify-content: space-between;
}
ha-bar {
--ha-bar-primary-color: var(
--hassio-bar-ok-color,
var(--success-color)
);
}
.target-warning {
--ha-bar-primary-color: var(
--hassio-bar-warning-color,
var(--warning-color)
);
}
.target-critical {
--ha-bar-primary-color: var(
--hassio-bar-critical-color,
var(--error-color)
);
}
.value {
width: 48px;
padding-right: 4px;
padding-inline-start: initial;
padding-inline-end: 4px;
flex-shrink: 0;
}
`;
}
static styles = css`
ha-settings-row {
padding: 0;
height: 54px;
width: 100%;
}
ha-settings-row > div[slot="description"] {
white-space: normal;
color: var(--secondary-text-color);
display: flex;
justify-content: space-between;
}
ha-bar {
--ha-bar-primary-color: var(--hassio-bar-ok-color, var(--success-color));
}
.target-warning {
--ha-bar-primary-color: var(
--hassio-bar-warning-color,
var(--warning-color)
);
}
.target-critical {
--ha-bar-primary-color: var(
--hassio-bar-critical-color,
var(--error-color)
);
}
.value {
width: 48px;
padding-right: 4px;
padding-inline-start: initial;
padding-inline-end: 4px;
flex-shrink: 0;
}
`;
}
declare global {

View File

@@ -28,7 +28,7 @@ export class DialogHassioBackupUpload
await this.updateComplete;
}
public closeDialog(): void {
public closeDialog() {
if (this._dialogParams && !this._dialogParams.onboarding) {
if (this._dialogParams.reloadBackup) {
this._dialogParams.reloadBackup();
@@ -36,6 +36,7 @@ export class DialogHassioBackupUpload
}
this._dialogParams = undefined;
fireEvent(this, "dialog-closed", { dialog: this.localName });
return true;
}
protected render() {

View File

@@ -77,8 +77,9 @@ class HassioBackupDialog
fireEvent(this, "dialog-closed", { dialog: this.localName });
}
public closeDialog(): void {
public closeDialog() {
this._dialog?.close();
return true;
}
private _localize(key: BackupOrRestoreKey) {

View File

@@ -82,10 +82,11 @@ export class DialogHassioNetwork
await this.updateComplete;
}
public closeDialog(): void {
public closeDialog() {
this._params = undefined;
this._processing = false;
fireEvent(this, "dialog-closed", { dialog: this.localName });
return true;
}
protected render() {

View File

@@ -92,7 +92,7 @@ class HassioMyRedirect extends LitElement {
let url: string;
try {
url = this._createRedirectUrl(redirect);
} catch (err: any) {
} catch (_err: any) {
this._error = this.supervisor.localize("my.error");
return;
}

View File

@@ -1,4 +1,4 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import type { Supervisor } from "../../src/data/supervisor/supervisor";
@@ -39,15 +39,13 @@ class HassioPanel extends LitElement {
`;
}
static get styles(): CSSResultGroup {
return css`
:host {
--app-header-background-color: var(--sidebar-background-color);
--app-header-text-color: var(--sidebar-text-color);
--app-header-border-bottom: 1px solid var(--divider-color);
}
`;
}
static styles = css`
:host {
--app-header-background-color: var(--sidebar-background-color);
--app-header-text-color: var(--sidebar-text-color);
--app-header-border-bottom: 1px solid var(--divider-color);
}
`;
}
declare global {

View File

@@ -1,5 +1,5 @@
import { mdiMenu } from "@mdi/js";
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
import type { PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../../src/common/dom/fire_event";
@@ -158,7 +158,7 @@ class HassioIngressView extends LitElement {
try {
addon = await fetchHassioAddonInfo(this.hass, addonSlug);
} catch (err: any) {
} catch (_err: any) {
await this.updateComplete;
await showAlertDialog(this, {
text:
@@ -219,7 +219,7 @@ class HassioIngressView extends LitElement {
});
this._fetchData(addonSlug);
return;
} catch (e) {
} catch (_err) {
await showAlertDialog(this, {
text:
this.supervisor.localize("ingress.error_starting_addon") ||
@@ -264,7 +264,7 @@ class HassioIngressView extends LitElement {
try {
session = await createSessionPromise;
} catch (err: any) {
} catch (_err: any) {
if (this._sessionKeepAlive) {
clearInterval(this._sessionKeepAlive);
}
@@ -285,7 +285,7 @@ class HassioIngressView extends LitElement {
this._sessionKeepAlive = window.setInterval(async () => {
try {
await validateHassioSession(this.hass, session);
} catch (err: any) {
} catch (_err: any) {
session = await createHassioSession(this.hass);
}
}, 60000);
@@ -325,51 +325,49 @@ class HassioIngressView extends LitElement {
fireEvent(this, "hass-toggle-menu");
}
static get styles(): CSSResultGroup {
return css`
iframe {
display: block;
width: 100%;
height: 100%;
border: 0;
}
static styles = css`
iframe {
display: block;
width: 100%;
height: 100%;
border: 0;
}
.header + iframe {
height: calc(100% - 40px);
}
.header + iframe {
height: calc(100% - 40px);
}
.header {
display: flex;
align-items: center;
font-size: 16px;
height: 40px;
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box;
--mdc-icon-size: 20px;
}
.header {
display: flex;
align-items: center;
font-size: 16px;
height: 40px;
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box;
--mdc-icon-size: 20px;
}
.main-title {
margin: var(--margin-title);
line-height: 20px;
flex-grow: 1;
}
.main-title {
margin: var(--margin-title);
line-height: 20px;
flex-grow: 1;
}
ha-icon-button {
pointer-events: auto;
}
ha-icon-button {
pointer-events: auto;
}
hass-subpage {
--app-header-background-color: var(--sidebar-background-color);
--app-header-text-color: var(--sidebar-text-color);
--app-header-border-bottom: 1px solid var(--divider-color);
}
`;
}
hass-subpage {
--app-header-background-color: var(--sidebar-background-color);
--app-header-text-color: var(--sidebar-text-color);
--app-header-border-bottom: 1px solid var(--divider-color);
}
`;
}
declare global {

View File

@@ -33,7 +33,7 @@ class HassioCoreInfo extends LitElement {
@state() private _metrics?: HassioStats;
protected render(): TemplateResult | void {
protected render(): TemplateResult | undefined {
const metrics = [
{
description: this.supervisor.localize("system.core.cpu_usage"),

View File

@@ -49,7 +49,7 @@ class HassioHostInfo extends LitElement {
@property({ attribute: false }) public supervisor!: Supervisor;
protected render(): TemplateResult | void {
protected render(): TemplateResult | undefined {
const primaryIpAddress = this.supervisor.host.features.includes("network")
? this._primaryIpAddress(this.supervisor.network!)
: "";

View File

@@ -44,7 +44,7 @@ class HassioSupervisorInfo extends LitElement {
@state() private _metrics?: HassioStats;
protected render(): TemplateResult | void {
protected render(): TemplateResult | undefined {
const metrics = [
{
description: this.supervisor.localize("system.supervisor.cpu_usage"),

View File

@@ -65,7 +65,7 @@ class HassioSupervisorLog extends LitElement {
await this._loadData();
}
protected render(): TemplateResult | void {
protected render(): TemplateResult | undefined {
return html`
<ha-card outlined>
${this._error

View File

@@ -23,7 +23,7 @@ class HassioSystem extends LitElement {
@property({ attribute: false }) public route!: Route;
protected render(): TemplateResult | void {
protected render(): TemplateResult | undefined {
return html`
<hass-tabs-subpage
.hass=${this.hass}

View File

@@ -9,6 +9,7 @@ import {
} from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { atLeastVersion } from "../../../src/common/config/version";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-alert";
@@ -18,7 +19,11 @@ import "../../../src/components/ha-checkbox";
import "../../../src/components/ha-faded";
import "../../../src/components/ha-icon-button";
import "../../../src/components/ha-markdown";
import "../../../src/components/ha-md-list";
import "../../../src/components/ha-md-list-item";
import "../../../src/components/ha-svg-icon";
import "../../../src/components/ha-switch";
import type { HaSwitch } from "../../../src/components/ha-switch";
import type { HassioAddonDetails } from "../../../src/data/hassio/addon";
import {
fetchHassioAddonChangelog,
@@ -121,6 +126,8 @@ class UpdateAvailableCard extends LitElement {
const changelog = changelogUrl(this._updateType, this._version_latest);
const createBackupTexts = this._computeCreateBackupTexts();
return html`
<ha-card
outlined
@@ -160,6 +167,30 @@ class UpdateAvailableCard extends LitElement {
)}
</p>
</div>
${createBackupTexts
? html`
<hr />
<ha-md-list>
<ha-md-list-item>
<span slot="headline">
${createBackupTexts.title}
</span>
${createBackupTexts.description
? html`
<span slot="supporting-text">
${createBackupTexts.description}
</span>
`
: nothing}
<ha-switch
slot="end"
id="create-backup"
></ha-switch>
</ha-md-list-item>
</ha-md-list>
`
: nothing}
`
: html`<ha-circular-progress
aria-label="Updating"
@@ -227,6 +258,48 @@ class UpdateAvailableCard extends LitElement {
}
}
private _computeCreateBackupTexts():
| { title: string; description?: string }
| undefined {
// Addon backup
if (
this._updateType === "addon" &&
atLeastVersion(this.hass.config.version, 2025, 2, 0)
) {
const version = this._version;
return {
title: this.supervisor.localize("update_available.create_backup.addon"),
description: this.supervisor.localize(
"update_available.create_backup.addon_description",
{ version: version }
),
};
}
// Old behavior
if (this._updateType && ["core", "addon"].includes(this._updateType)) {
return {
title: this.supervisor.localize(
"update_available.create_backup.generic"
),
};
}
return undefined;
}
get _shouldCreateBackup(): boolean {
if (this._updateType && !["core", "addon"].includes(this._updateType)) {
return false;
}
const createBackupSwitch = this.shadowRoot?.getElementById(
"create-backup"
) as HaSwitch;
if (createBackupSwitch) {
return createBackupSwitch.checked;
}
return true;
}
get _version(): string {
return this._updateType
? this._updateType === "addon"
@@ -341,14 +414,22 @@ class UpdateAvailableCard extends LitElement {
}
private async _update() {
if (this._shouldCreateBackup && this.supervisor.info.state === "freeze") {
this._error = this.supervisor.localize("backup.backup_already_running");
return;
}
this._error = undefined;
this._updating = true;
try {
if (this._updateType === "addon") {
await updateHassioAddon(this.hass, this.addonSlug!);
await updateHassioAddon(
this.hass,
this.addonSlug!,
this._shouldCreateBackup
);
} else if (this._updateType === "core") {
await updateCore(this.hass);
await updateCore(this.hass, this._shouldCreateBackup);
} else if (this._updateType === "os") {
await updateOS(this.hass);
} else if (this._updateType === "supervisor") {
@@ -403,6 +484,17 @@ class UpdateAvailableCard extends LitElement {
border-bottom: none;
margin: 16px 0 0 0;
}
ha-md-list {
padding: 0;
margin-bottom: -16px;
}
ha-md-list-item {
--md-list-item-leading-space: 0;
--md-list-item-trailing-space: 0;
--md-item-overflow: visible;
}
`,
];
}

View File

@@ -1,4 +1,4 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import type { Supervisor } from "../../../src/data/supervisor/supervisor";
@@ -38,20 +38,18 @@ class UpdateAvailableDashboard extends LitElement {
history.back();
}
static get styles(): CSSResultGroup {
return css`
hass-subpage {
--app-header-background-color: var(--primary-background-color);
--app-header-text-color: var(--sidebar-text-color);
}
update-available-card {
margin: auto;
margin-top: 16px;
margin-bottom: 24px;
max-width: 600px;
}
`;
}
static styles = css`
hass-subpage {
--app-header-background-color: var(--primary-background-color);
--app-header-text-color: var(--sidebar-text-color);
}
update-available-card {
margin: auto;
margin-top: 16px;
margin-bottom: 24px;
max-width: 600px;
}
`;
}
declare global {

View File

@@ -230,7 +230,7 @@ class LandingPageLogs extends LitElement {
this._startLogStream();
return;
}
} catch (err) {
} catch (_err) {
// ignore and continue with observer logs
}
this._loadObserverLogs();

View File

@@ -126,7 +126,7 @@ class HaLandingPage extends LandingPageBaseElement {
"selectedLanguage",
JSON.stringify(language)
);
} catch (err: any) {
} catch (_err: any) {
// Ignore
}
}

View File

@@ -26,25 +26,25 @@
"license": "Apache-2.0",
"type": "module",
"dependencies": {
"@babel/runtime": "7.26.0",
"@babel/runtime": "7.26.7",
"@braintree/sanitize-url": "7.1.1",
"@codemirror/autocomplete": "6.18.4",
"@codemirror/commands": "6.7.1",
"@codemirror/language": "6.10.7",
"@codemirror/commands": "6.8.0",
"@codemirror/language": "6.10.8",
"@codemirror/legacy-modes": "6.4.2",
"@codemirror/search": "6.5.8",
"@codemirror/state": "6.5.0",
"@codemirror/view": "6.36.1",
"@codemirror/state": "6.5.1",
"@codemirror/view": "6.36.2",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.17.1",
"@formatjs/intl-displaynames": "6.8.8",
"@formatjs/intl-durationformat": "0.7.1",
"@formatjs/intl-datetimeformat": "6.17.2",
"@formatjs/intl-displaynames": "6.8.9",
"@formatjs/intl-durationformat": "0.7.2",
"@formatjs/intl-getcanonicallocales": "2.5.4",
"@formatjs/intl-listformat": "7.7.8",
"@formatjs/intl-locale": "4.2.8",
"@formatjs/intl-numberformat": "8.15.1",
"@formatjs/intl-pluralrules": "5.4.1",
"@formatjs/intl-relativetimeformat": "11.4.8",
"@formatjs/intl-listformat": "7.7.9",
"@formatjs/intl-locale": "4.2.9",
"@formatjs/intl-numberformat": "8.15.2",
"@formatjs/intl-pluralrules": "5.4.2",
"@formatjs/intl-relativetimeformat": "11.4.9",
"@fullcalendar/core": "6.1.15",
"@fullcalendar/daygrid": "6.1.15",
"@fullcalendar/interaction": "6.1.15",
@@ -55,7 +55,7 @@
"@lit-labs/context": "0.4.1",
"@lit-labs/motion": "1.0.7",
"@lit-labs/observers": "2.0.4",
"@lit-labs/virtualizer": "2.0.14",
"@lit-labs/virtualizer": "2.0.15",
"@lrnwebcomponents/simple-tooltip": "8.0.2",
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
@@ -91,44 +91,41 @@
"@polymer/polymer": "3.5.2",
"@replit/codemirror-indentation-markers": "6.5.3",
"@thomasloven/round-slider": "0.6.0",
"@vaadin/combo-box": "24.6.0",
"@vaadin/vaadin-themable-mixin": "24.6.0",
"@vibrant/color": "3.2.1-alpha.1",
"@vibrant/core": "3.2.1-alpha.1",
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
"@vaadin/combo-box": "24.6.2",
"@vaadin/vaadin-themable-mixin": "24.6.2",
"@vibrant/color": "4.0.0",
"@vue/web-component-wrapper": "1.3.0",
"@webcomponents/scoped-custom-element-registry": "0.0.9",
"@webcomponents/webcomponentsjs": "2.8.0",
"app-datepicker": "5.1.1",
"barcode-detector": "2.3.1",
"chart.js": "4.4.7",
"chartjs-plugin-zoom": "2.2.0",
"color-name": "2.0.0",
"comlink": "4.4.2",
"core-js": "3.39.0",
"core-js": "3.40.0",
"cropperjs": "1.6.2",
"date-fns": "4.1.0",
"date-fns-tz": "3.2.0",
"deep-clone-simple": "1.1.1",
"deep-freeze": "0.0.1",
"dialog-polyfill": "0.5.6",
"element-internals-polyfill": "1.3.12",
"echarts": "5.6.0",
"element-internals-polyfill": "1.3.13",
"fuse.js": "7.0.0",
"google-timezones-json": "1.2.0",
"gulp-zopfli-green": "6.0.2",
"hls.js": "patch:hls.js@npm%3A1.5.7#~/.yarn/patches/hls.js-npm-1.5.7-f5bbd3d060.patch",
"home-assistant-js-websocket": "9.4.0",
"idb-keyval": "6.2.1",
"intl-messageformat": "10.7.10",
"intl-messageformat": "10.7.14",
"js-yaml": "4.1.0",
"leaflet": "1.9.4",
"leaflet-draw": "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch",
"lit": "2.8.0",
"lit-html": "2.8.0",
"luxon": "3.5.0",
"marked": "15.0.4",
"marked": "15.0.6",
"memoize-one": "6.0.0",
"node-vibrant": "3.2.1-alpha.1",
"node-vibrant": "4.0.3",
"punycode": "2.3.1",
"qr-scanner": "1.4.2",
"qrcode": "1.5.4",
@@ -140,7 +137,7 @@
"tinykeys": "3.0.0",
"tsparticles-engine": "2.12.0",
"tsparticles-preset-links": "2.12.0",
"ua-parser-js": "1.0.40",
"ua-parser-js": "2.0.0",
"vis-data": "7.1.9",
"vis-network": "9.1.9",
"vue": "2.7.16",
@@ -155,20 +152,20 @@
"xss": "1.0.15"
},
"devDependencies": {
"@babel/core": "7.26.0",
"@babel/core": "7.26.7",
"@babel/helper-define-polyfill-provider": "0.6.3",
"@babel/plugin-proposal-decorators": "7.25.9",
"@babel/plugin-transform-runtime": "7.25.9",
"@babel/preset-env": "7.26.0",
"@babel/preset-env": "7.26.7",
"@babel/preset-typescript": "7.26.0",
"@bundle-stats/plugin-webpack-filter": "4.17.0",
"@bundle-stats/plugin-webpack-filter": "4.18.2",
"@lokalise/node-api": "13.0.0",
"@octokit/auth-oauth-device": "7.1.1",
"@octokit/plugin-retry": "7.1.2",
"@octokit/rest": "21.0.2",
"@rsdoctor/rspack-plugin": "0.4.12",
"@rspack/cli": "1.1.8",
"@rspack/core": "1.1.8",
"@octokit/auth-oauth-device": "7.1.2",
"@octokit/plugin-retry": "7.1.3",
"@octokit/rest": "21.1.0",
"@rsdoctor/rspack-plugin": "0.4.13",
"@rspack/cli": "1.2.2",
"@rspack/core": "1.2.2",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "6.0.20",
"@types/chromecast-caf-sender": "1.0.11",
@@ -176,7 +173,7 @@
"@types/glob": "8.1.0",
"@types/html-minifier-terser": "7.0.2",
"@types/js-yaml": "4.0.9",
"@types/leaflet": "1.9.15",
"@types/leaflet": "1.9.16",
"@types/leaflet-draw": "1.0.11",
"@types/lodash.merge": "4.6.9",
"@types/luxon": "3.4.2",
@@ -186,17 +183,16 @@
"@types/tar": "6.1.13",
"@types/ua-parser-js": "0.7.39",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@vitest/coverage-v8": "2.1.8",
"@typescript-eslint/eslint-plugin": "8.21.0",
"@typescript-eslint/parser": "8.21.0",
"@vitest/coverage-v8": "3.0.4",
"babel-loader": "9.2.1",
"babel-plugin-template-html-minifier": "4.1.0",
"browserslist-useragent-regexp": "4.1.3",
"del": "8.0.0",
"eslint": "9.17.0",
"eslint": "9.19.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-import-resolver-webpack": "0.13.10",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-lit": "1.15.0",
@@ -204,17 +200,17 @@
"eslint-plugin-unused-imports": "4.1.4",
"eslint-plugin-wc": "2.2.0",
"fancy-log": "2.0.0",
"fs-extra": "11.2.0",
"glob": "11.0.0",
"fs-extra": "11.3.0",
"glob": "11.0.1",
"gulp": "5.0.0",
"gulp-brotli": "3.0.0",
"gulp-json-transform": "0.5.0",
"gulp-rename": "2.0.0",
"html-minifier-terser": "7.2.0",
"husky": "9.1.7",
"jsdom": "25.0.1",
"jsdom": "26.0.0",
"jszip": "3.10.1",
"lint-staged": "15.2.11",
"lint-staged": "15.4.3",
"lit-analyzer": "2.0.3",
"lodash.merge": "4.6.2",
"lodash.template": "4.5.0",
@@ -222,13 +218,13 @@
"object-hash": "3.0.0",
"pinst": "3.0.0",
"prettier": "3.4.2",
"rspack-manifest-plugin": "5.0.2",
"rspack-manifest-plugin": "5.0.3",
"sinon": "19.0.2",
"tar": "7.4.3",
"terser-webpack-plugin": "5.3.11",
"ts-lit-plugin": "2.0.2",
"typescript": "5.7.2",
"vitest": "2.1.8",
"typescript": "5.7.3",
"vitest": "3.0.4",
"webpack-stats-plugin": "1.1.3",
"webpackbar": "7.0.0",
"workbox-build": "patch:workbox-build@npm%3A7.1.1#~/.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch"
@@ -242,7 +238,8 @@
"clean-css": "5.3.3",
"@lit/reactive-element": "1.6.3",
"@fullcalendar/daygrid": "6.1.15",
"globals": "15.14.0"
"globals": "15.14.0",
"tslib": "2.8.1"
},
"packageManager": "yarn@4.5.3"
"packageManager": "yarn@4.6.0"
}

View File

@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20250109.2"
version = "20250129.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
authors = [
{name = "The Home Assistant Authors", email = "hello@home-assistant.io"}
]
requires-python = ">=3.11.0"
requires-python = ">=3.13.0"
[project.urls]
"Homepage" = "https://github.com/home-assistant/frontend"

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
// Needs to remain CommonJS until eslint-import-resolver-webpack supports ES modules
const rspack = require("./build-scripts/rspack.cjs");
const env = require("./build-scripts/env.cjs");

View File

@@ -232,7 +232,7 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
try {
url = new URL(this.redirectUri);
} catch (err) {
} catch (_err) {
this._error = "Invalid redirect URI";
return;
}
@@ -328,7 +328,7 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
try {
window.localStorage.setItem("selectedLanguage", JSON.stringify(language));
} catch (err: any) {
} catch (_err: any) {
// Ignore
}
}

View File

@@ -32,7 +32,7 @@ export class CastManager {
// If the cast connection is connected to our Hass.
public status?: ReceiverStatusMessage;
private _eventListeners: { [event: string]: CastEventListener[] } = {};
private _eventListeners: Record<string, CastEventListener[]> = {};
constructor(auth?: Auth) {
this.auth = auth;

View File

@@ -10,8 +10,9 @@ type NonNullUndefined<T> = T extends undefined
*/
export function ensureArray(value: undefined): undefined;
export function ensureArray(value: null): null;
export function ensureArray<T>(value: T | T[]): NonNullUndefined<T>[];
export function ensureArray<T>(value: T | readonly T[]): NonNullUndefined<T>[];
export function ensureArray<T>(
value: T | T[] | readonly T[]
): NonNullUndefined<T>[];
export function ensureArray(value) {
if (value === undefined || value === null || Array.isArray(value)) {
return value;

View File

@@ -66,7 +66,7 @@ export function loadTokens() {
} else {
tokenCache.tokens = null;
}
} catch (err: any) {
} catch (_err: any) {
tokenCache.tokens = null;
}
}

View File

@@ -4,6 +4,6 @@ import type { HomeAssistant } from "../../types";
export const componentsWithService = (
hass: HomeAssistant,
service: string
): Array<string> =>
): string[] =>
hass &&
Object.keys(hass.services).filter((key) => service in hass.services[key]);

View File

@@ -22,7 +22,9 @@ export const createDurationData = (
hours: Number(parts[0]) || 0,
minutes: Number(parts[1]) || 0,
seconds: seconds_whole,
milliseconds: Math.floor((seconds - seconds_whole) * 1000),
milliseconds: Math.floor(
Number((seconds - seconds_whole).toFixed(4)) * 1000
),
};
}
return { seconds: duration };

View File

@@ -65,6 +65,18 @@ const formatShortDateTimeMem = memoizeOne(
})
);
export const formatShortDateTimeWithConditionalYear = (
dateObj: Date,
locale: FrontendLocaleData,
config: HassConfig
) => {
const now = new Date();
if (now.getFullYear() === dateObj.getFullYear()) {
return formatShortDateTime(dateObj, locale, config);
}
return formatShortDateTimeWithYear(dateObj, locale, config);
};
// August 9, 2021, 8:23:15 AM
export const formatDateTimeWithSeconds = (
dateObj: Date,

View File

@@ -31,11 +31,9 @@ class StorageClass {
public storage: globalThis.Storage;
private _storage: { [storageKey: string]: any } = {};
private _storage: Record<string, any> = {};
private _listeners: {
[storageKey: string]: Callback[];
} = {};
private _listeners: Record<string, Callback[]> = {};
public addFromStorage(storageKey: any): void {
if (!this._storage[storageKey]) {
@@ -87,7 +85,7 @@ class StorageClass {
} else {
this.storage.setItem(storageKey, JSON.stringify(value));
}
} catch (err: any) {
} catch (_err: any) {
// Safari in private mode doesn't allow localstorage
} finally {
if (this._listeners[storageKey]) {

Some files were not shown because too many files have changed in this diff Show More