Compare commits

..

828 Commits

Author SHA1 Message Date
Bram Kragten
d72e8c35d8 20240627.0 (#21192) 2024-06-27 20:02:18 +02:00
Paul Bottein
da2865d8bf Fix size of cards inside stack cards (#21190)
* Fix size of cards inside stack cards

* Apply style everywhere

* Fix stack

* Fix grid stack

* Set block only for square
2024-06-27 19:31:55 +02:00
Bram Kragten
fd64d17d88 Bumped version to 20240627.0 2024-06-27 19:30:48 +02:00
Paul Bottein
5273293cd6 Add last updated property to tile card state content (#21191) 2024-06-27 18:46:39 +02:00
Bram Kragten
49c42fc757 Add support for native QR code scanner (#21187) 2024-06-27 17:15:33 +02:00
Paul Bottein
7603fa3aa8 Don't set hass to undefined in lovelace cards. (#21189)
* Wait for hass and config before building the card

* Don't use setter

* Improve code readability

* Use hasupdated

* Rename build to load
2024-06-27 16:49:10 +02:00
karwosts
7aa005e0ce Fix device integration filter for entityless devices (#21136)
* Fix device integration filter for entityless devices

* code review
2024-06-27 12:40:09 +02:00
renovate[bot]
b2a55dd737 Update dependency @types/chromecast-caf-receiver to v6.0.16 (#21183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-27 06:34:34 +02:00
Paul Bottein
5bc3ad4c63 20240626.2 (#21181) 2024-06-26 23:19:57 +02:00
Paul Bottein
ccad1afcf0 Bumped version to 20240626.2 2024-06-26 23:18:57 +02:00
Paul Bottein
530745d20d Revert "20240626.1" (#21180)
Revert "20240626.1 (#21179)"

This reverts commit a16cae0671.
2024-06-26 23:18:27 +02:00
Paul Bottein
a16cae0671 20240626.1 (#21179)
* Fix undefined value in search (#21175)

* Fix hass object in nested hui-card (#21178)

* Bumped version to 20240626.1
2024-06-26 23:09:42 +02:00
Paul Bottein
231c923776 Bumped version to 20240626.1 2024-06-26 23:08:56 +02:00
Paul Bottein
b08b67179e Fix hass object in nested hui-card (#21178) 2024-06-26 21:05:47 +00:00
Paul Bottein
d9f1b06199 Fix undefined value in search (#21175) 2024-06-26 20:37:07 +02:00
Bram Kragten
8d0c4e4a52 20240626.0 (#21171) 2024-06-26 12:49:50 +02:00
Bram Kragten
4b7526c8a3 Merge branch 'master' into dev 2024-06-26 12:38:37 +02:00
Bram Kragten
6267ab5ed3 Bumped version to 20240626.0 2024-06-26 12:36:57 +02:00
Paul Bottein
ae94231800 Use resize controller for weather card (#19806)
* Use resize controller for weather card

* Don't use observe
2024-06-26 12:35:49 +02:00
Bram Kragten
7d28f3f585 Allow to hide and sort columns in data tables (#21168)
* Allow to hide and sort columns in data tables

* fix unused

* store
2024-06-26 11:51:32 +02:00
Bram Kragten
adea384f40 Update logo_x.svg 2024-06-26 11:50:18 +02:00
Bram Kragten
55b66250f4 Take convert of blueprint automation and script (#21151)
* substituteBlueprint

* WIP ux

* Simplify feature

* Add take control to scripts

* Add translations and catch error

* Clean import

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-06-26 11:24:47 +02:00
Philip Allgaier
182111912c Rename "Twitter" to "X (formerly Twitter)" (#20694)
* Rename "Twitter" to "X (formerly Twitter)"

* Add translations

* Show x logo on light mode

---------

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-06-26 11:13:52 +02:00
renovate[bot]
8a0924bf1f Update dependency typescript to v5.5.2 (#21144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-26 10:50:25 +02:00
Simon Lamon
94dc9308ea Replace octal escape sequences (#21156)
* replace octal escape characters

* Add disable eslint
2024-06-26 10:19:52 +02:00
Paul Bottein
f42a9ac070 Ignore diacritics (accents) in search (#21150)
* Ignore diacritics in search

* Rename variable
2024-06-26 10:07:31 +02:00
Paul Bottein
1acada625f Improve user and person dialogs (#21162)
* Improve user dialog

* Update person dialog

* Improve add user dialog

* Fix secondary option
2024-06-26 10:03:43 +02:00
Paul Bottein
128dbbcfef Better resizing support for thermostat card (#21120)
* Better resizing support for thermostat card

* Use resize controller

* Fix typings

* Don't use query

* Use render to set style
2024-06-26 10:03:10 +02:00
Bram Kragten
57d8544dbf Add menu with remove option to application credentials (#21139) 2024-06-26 09:47:46 +02:00
Bram Kragten
76daa2bb7f Add support for sections in filters (#21157) 2024-06-25 20:01:10 +02:00
renovate[bot]
9cbb51549b Update dependency @types/mocha to v10.0.7 (#21163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-25 12:42:54 +00:00
Paul Bottein
bd1ede4145 Fix grid size picker size (#21161) 2024-06-25 12:24:04 +02:00
Paul Bottein
321a085c0e Resize card editor (#21115) 2024-06-24 22:10:31 +02:00
Bram Kragten
6a3041988a Allow to change username (#21152) 2024-06-24 18:51:43 +02:00
renovate[bot]
23fcdf876c Update dependency @codemirror/view to v6.28.2 (#21154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 12:24:01 -04:00
Bram Kragten
00f325e961 Support expandable in initial form data (#21153) 2024-06-24 17:30:43 +02:00
renovate[bot]
d00b3cfc61 Update Yarn to v4.3.1 (#21149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 13:33:19 +02:00
karwosts
4cc9e74ea8 Fix 'Move to view' operation (#21142) 2024-06-24 11:56:06 +02:00
dependabot[bot]
a56b9a96ce Bump softprops/action-gh-release from 2.0.5 to 2.0.6 (#21148)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 08:37:48 +02:00
renovate[bot]
d4b5f4bc14 Update dependency @octokit/rest to v21 (#21146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-23 23:22:08 -04:00
renovate[bot]
cf1523ee73 Update dependency @types/chromecast-caf-receiver to v6.0.15 (#21138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-23 12:54:15 +02:00
renovate[bot]
f5d571ca84 Update dependency webpack to v5.92.1 (#21134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 20:54:24 +02:00
karwosts
362e92f313 Add some weather attribute icons and units (#21133) 2024-06-22 15:42:26 +02:00
Jan-Philipp Benecke
5ddf72b973 Add preview to Threshold config & option flow (#19845)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-06-22 13:32:40 +02:00
renovate[bot]
6e78c28f51 Update dependency @codemirror/autocomplete to v6.16.3 (#21130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 09:10:52 +02:00
renovate[bot]
772f0bb669 Update dependency tar to v7.4.0 (#21129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 08:51:43 +02:00
renovate[bot]
846c2a848f Update dependency glob to v10.4.2 (#21127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 08:51:08 +02:00
renovate[bot]
8495757005 Update dependency @braintree/sanitize-url to v7.0.3 (#21126) 2024-06-21 22:09:25 -04:00
karwosts
9960d38b91 Offer to delete no-longer-recorded statistics (#21119) 2024-06-21 11:18:24 +02:00
Simon Lamon
d3222f8bb0 Various fixes in dialogs (#20935)
* allow escape and scrim action for repair dialogs

* improve delete entity dialogs

* reiterate refresh token dialog wordings (kept refresh token for now)

* improve device delete dialogs

* Improve deletable text and invalidation
2024-06-21 11:15:01 +02:00
Simon Lamon
2e5cce5409 Replace paper-listbox in cast frontend (#19954)
* hc-cast

* Update cast/src/launcher/layout/hc-cast.ts

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

* Update cast/src/launcher/layout/hc-cast.ts

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

* Update cast/src/launcher/layout/hc-cast.ts

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

* Fixes

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-06-21 11:13:13 +02:00
Paul Bottein
f78946447f Show card preview inside section in card editor (#21065)
* Show card inside section in card editor

* Replace edit mode by preview

* Add backward compatibility for custom cards

* Re-order props
2024-06-21 11:12:18 +02:00
Jay Turner
eb0579ddc5 Use EnergyCardBaseConfig where appropriate (#20896)
* Use EnergyCardBaseConfig where appropriate

* Update type key

* Rename class

* Run prettier
2024-06-21 11:11:41 +02:00
Steve Repsher
686424fc70 Add CoreJS polyfills to modern build (#20676) 2024-06-21 11:07:39 +02:00
renovate[bot]
039e9b40bd Update typescript-eslint monorepo to v7.13.1 (#21121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-20 14:41:07 -04:00
karwosts
8272bef890 Sort filter-domains on translated name (#21116) 2024-06-19 17:31:04 +02:00
Kevin Jahrens
62528b2413 Fix back paths (#21112)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-06-19 07:08:14 +00:00
renovate[bot]
fa24f529e0 Lock file maintenance (#21114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-19 08:58:38 +02:00
dependabot[bot]
43a54f6cda Bump ws from 7.5.9 to 7.5.10 (#21111) 2024-06-18 20:56:53 -04:00
Paulus Schoutsen
9c153bbd58 Split out service entities (#21076)
* Hide notify entiites from generated dashboard

* Split out service entities on device info page

* Update src/panels/lovelace/common/generate-lovelace-config.ts

* Split service -> notify/assist
2024-06-18 08:58:45 +02:00
Bram Kragten
27afe9ecb7 Wrap code editor for template selector (#21104)
* Wrap code editor for template selector
2024-06-17 19:15:55 +00:00
dependabot[bot]
72f989e2bd Bump actions/checkout from 4.1.6 to 4.1.7 (#21102) 2024-06-17 10:19:48 +02:00
renovate[bot]
a6ef46565f Update dependency @codemirror/view to v6.28.1 (#21099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-16 09:43:11 +02:00
renovate[bot]
a35ac09688 Update dependency lint-staged to v15.2.7 (#21098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 20:55:19 +02:00
Douwe
27024135ea Update hui-grid-section.ts (#21088)
Add variable to align title
2024-06-15 18:21:42 +02:00
Franck Nijhof
8759ed740a Make the radius of the home zone configurable (#21096) 2024-06-15 14:41:09 +02:00
Franck Nijhof
bb3e8ae33d Update home-assistant-js-websocket to 9.4.0 (#21097) 2024-06-15 08:03:55 -04:00
renovate[bot]
b5b60c9bf0 Update vaadinWebComponents monorepo to v24.4.0 (#21089)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 00:12:37 -04:00
renovate[bot]
3b6a2cf7d8 Update dependency @codemirror/view to v6.28.0 (#21081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 00:09:09 -04:00
renovate[bot]
7e10e14102 Update dependency lint-staged to v15.2.6 (#21092)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-14 21:21:25 +02:00
renovate[bot]
a580abab4a Update dependency webpack to v5.92.0 (#21090)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-14 20:21:11 +02:00
renovate[bot]
11523c08c4 Update Yarn to v4.3.0 (#21084) 2024-06-14 12:29:02 -04:00
renovate[bot]
7a8988528b Update dependency prettier to v3.3.2 (#21087)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-14 08:42:55 +02:00
renovate[bot]
2a6380f083 Update typescript-eslint monorepo to v7.13.0 (#21082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-14 08:29:55 +02:00
Paul Bottein
f43319a3ae Bumped version to 20240610.1 2024-06-13 20:49:43 +02:00
Paul Bottein
e8eefaf1d3 Fix current mode not selected in card feature (#21063) 2024-06-13 20:46:50 +02:00
Steve Repsher
06d82a4925 Do not inject Intl polyfill into ecma402-abstract package (#21074) 2024-06-13 20:45:50 +02:00
Paulus Schoutsen
4991d52fcc Hide notify entities from generated dashboard (#21075)
Hide notify entiites from generated dashboard
2024-06-13 20:45:35 +02:00
Simon Lamon
0b391eafcf Fix diagnostic download not downloading (#21078) 2024-06-13 20:45:12 +02:00
Paul Bottein
0bb34830f8 Fix selected state for selected config entries (#21079) 2024-06-13 20:45:02 +02:00
Paul Bottein
29881c8bb4 Fix selected state for selected config entries (#21079) 2024-06-13 18:26:45 +02:00
Simon Lamon
56254ddf03 Fix diagnostic download not downloading (#21078) 2024-06-13 13:31:30 +02:00
Paulus Schoutsen
007ba70641 Hide notify entities from generated dashboard (#21075)
Hide notify entiites from generated dashboard
2024-06-13 08:04:27 +02:00
Steve Repsher
3e1227b064 Do not inject Intl polyfill into ecma402-abstract package (#21074) 2024-06-12 14:45:57 -04:00
Matthias Alphart
067e179f26 Translation support for device automation extra fields (#20567)
* Translation support for device trigger extra fields

* Prefer component translation over default

* Move device trigger extra_fields translations to backend

* move translations for extra_fields of conditions and actions too
2024-06-12 14:09:50 +02:00
AlCalzone
9a3f7df25e Z-Wave: Prevent closing the Add Device dialog when user input is required (#20999)
* prevent closing the Z-Wave Add node dialog when user input is required

* ask user for confirmation before leaving page during bootstrapping

* fix: no non-null assertion
2024-06-12 13:48:40 +02:00
Paul Bottein
c7b4e8f37c Fix current mode not selected in card feature (#21063) 2024-06-12 13:40:44 +02:00
Paul Bottein
bfa8b886ab Make update actions sticky on more info (#21053) 2024-06-12 13:39:04 +02:00
Paul Bottein
433c00b73a Move card loading logic into hui-card (#21018)
* Move card rebuild to hui-card

* Use hui card in stack card

* add once to event

* Do not use state

* Use hui card in conditional card

* Use editMode instead of lovelace in hui card

* Fix edit mode

* Use hui-card in card dialog and panel todo

* Fix edit mode

* Fix types

* Migrate entity filter card

* Update demo card

* Fix UI view

* Allow edit mode attribute

* Remove unused condition

* Remove unused section preview code

* Remove useless check for config
2024-06-12 13:38:21 +02:00
Stefan Agner
a497f42f73 Move send credentials to phone to main Thread configuration panel (#21066)
Move send credentials to phone to main view

Currently the button is hidden in the more info dialog, and even there
it seems that it is currently not rendered correctly.

This moves the button to the main view, make it more obvious while
still keeping it out of the way if the feature is not applicable.
2024-06-12 13:35:29 +02:00
Stefan Agner
165723cb5b Clarify Thread credentials transfer direction (#21067)
"Import credentials" on a phone can be missunderstood as importing
credentials from Home Assistant to the phone, but this is not what
this command is doing.

Use "Send credentials to Home Assistant" to make it clear what the
direction of the transfer is.
2024-06-12 13:32:51 +02:00
Bruno Pantaleão Gonçalves
42b5fa696a Fix "canImportKeychain" boolean for thread panel (#21062) 2024-06-11 10:04:13 +02:00
renovate[bot]
59062d96a8 Update dependency @rollup/plugin-commonjs to v26 (#21037)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-10 21:56:01 +02:00
Paulus Schoutsen
d36bbfe07d Hide hidden updates from sidebar/settings (#21058) 2024-06-10 15:52:24 -04:00
Bram Kragten
4a8bb5034d Merge branch 'dev' 2024-06-10 19:50:24 +02:00
Bram Kragten
0d489213a4 Bumped version to 20240610.0 2024-06-10 19:50:10 +02:00
koostamas
c54acc9369 Fix automation describeCondition for number state type (#21052)
When using a number state condition in an automation, the UI used an incorrect evaluation when trying to describe the condition which made the label default to the default value.
To fix this, I just changed the evaluation to check directly for `undefined` value.
2024-06-10 19:19:26 +02:00
Simon Lamon
562bc084f0 Revert fullcalendar back to v6.1.11 (#21039)
* Drop fullcalendar back to v6.1.11

* Add resolution
2024-06-10 09:23:53 +02:00
karwosts
6fce2f35a5 Add a title to triggered dialog (#21046) 2024-06-09 21:33:58 +02:00
karwosts
f4e24bed2e Fix cancel button in section edit (#21045) 2024-06-09 12:54:38 +00:00
renovate[bot]
09969c0e2d Update babel monorepo to v7.24.7 (#21035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 19:52:09 +02:00
renovate[bot]
4b0181774b Update CodeMirror (#21022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 19:51:08 +02:00
renovate[bot]
272db5e9e8 Update dependency @rollup/plugin-replace to v5.0.7 (#21036)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 19:50:43 +02:00
renovate[bot]
9ae3a824d9 Update dependency prettier to v3.3.1 (#21033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 12:29:12 +02:00
renovate[bot]
9db55c9391 Update dependency @lit-labs/virtualizer to v2.0.13 (#21029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 09:42:52 +02:00
renovate[bot]
59697127c0 Update dependency @rollup/plugin-replace to v5.0.6 (#21031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-08 08:50:00 +02:00
renovate[bot]
565600e945 Update dependency @codemirror/view to v6.26.4 (#21021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-07 16:08:38 +02:00
karwosts
721eebf367 Add floor selector to script fields (#21016) 2024-06-07 13:02:58 +02:00
renovate[bot]
f5ae842167 Update typescript-eslint monorepo to v7.12.0 (#21014) 2024-06-06 20:35:13 -04:00
renovate[bot]
3575734ed0 Update dependency @codemirror/language to v6.10.2 (#21008) 2024-06-06 20:34:16 -04:00
karwosts
4e8de1f64d Todo button menu: add stop propagation (#20996) 2024-06-05 11:43:21 +02:00
Bram Kragten
a8366c6416 Merge branch 'dev' 2024-06-05 11:42:10 +02:00
Bram Kragten
cd73b8ac29 Bumped version to 20240605.0 2024-06-05 11:41:51 +02:00
Paul Bottein
74eca6b1f5 Increase check update timeout to 15s (#20998) 2024-06-05 10:13:28 +02:00
Paulus Schoutsen
9ef0bd6e46 Fix Assist styling (#20997) 2024-06-05 09:53:40 +02:00
renovate[bot]
53eb7f771f Update dependency prettier to v3.3.0 (#20992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 20:27:20 +02:00
Bram Kragten
8ff8c01bba Merge branch 'dev' 2024-06-04 16:47:15 +02:00
Bram Kragten
cd62f064cb Bumped version to 20240604.0 2024-06-04 16:47:00 +02:00
Paul Bottein
db82b856e0 Fix filter card visibility when show empty is false (#20985) 2024-06-04 16:46:38 +02:00
Paul Bottein
ab340e13e9 Fix max option saving using keyboard for script mode (#20984) 2024-06-04 16:46:08 +02:00
Paul Bottein
22c54b3fea Fix card editor size on mobile (#20976) 2024-06-04 16:45:54 +02:00
Alex van den Hoogen
2dd7e598d5 Add missing hui-root callback, fixes #20854 (#20975)
* Add missing hui-root callback, fixes #20854

* Set scroll event listener on hui-root to passive
2024-06-04 14:03:04 +02:00
Raman Gupta
d1ce06e368 Fix parameter name in zwave_js WS API (#20981) 2024-06-04 11:21:52 +02:00
Bram Kragten
52f3ff3306 20240603.0 (#20974) 2024-06-03 18:56:01 +02:00
Bram Kragten
9717304b68 Bumped version to 20240603.0 2024-06-03 18:43:00 +02:00
Bram Kragten
c646f3c39a Save search filter in session storage (#20973)
* Save search filter in session storage

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-06-03 18:42:34 +02:00
Paul Bottein
0297ec5a7b Add visibility editor to card editor (#20926)
* Add visibility editor to card editor

* Add translations

* AI suggestion
2024-06-03 18:23:47 +02:00
Paul Bottein
e48286c2a0 Fix conditional card visiblity inside section (#20966)
* Fix conditional card visiblity inside section

* Remove _ from protected method
2024-06-03 18:23:30 +02:00
Brynley McDonald
f2b2da9877 Fix filters for entity/device from integrations dashboard (#20953) 2024-06-03 17:50:40 +02:00
Simon Lamon
250f87cfd8 Improve error messages in config entries (#20934)
* Improve error messages and test completely

* Add css back

* Revert ha-alert changes

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

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-06-03 16:29:47 +02:00
Paul Bottein
9f6afb162a Make lovelace optional in card and section (#20970) 2024-06-03 16:05:41 +02:00
Paul Bottein
0add65feff Use event for section visibility instead of mutation observer (#20967) 2024-06-03 15:54:40 +02:00
Paul Bottein
c08d9a9166 Fix card display in view panel (#20972) 2024-06-03 15:49:31 +02:00
ildar170975
d9a9038cec Update ha-entity-marker.ts: add CSS variable for border-radius (#20914)
* Update ha-entity-marker.ts

* fix whitespace
2024-06-03 15:40:46 +02:00
Paul Bottein
6bee3ef45c Fix fallback icon color in dark mode (#20969) 2024-06-03 14:16:18 +02:00
Paul Bottein
3a855f95ad Fix broken config switch in demo (#20971) 2024-06-03 13:37:32 +02:00
Paulus Schoutsen
e7f3393ec6 Tweak styles Assist dialog (#20960) 2024-06-03 11:42:43 +02:00
karwosts
d7cb4cb537 Revert "Filter unrecorded entities from history panel (#19621)" (#20941)
This reverts commit d88670034a.
2024-06-03 10:03:30 +02:00
renovate[bot]
c55720c933 Update dependency @codemirror/autocomplete to v6.16.2 (#20965)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 07:49:47 +00:00
dependabot[bot]
f78e757485 Bump relative-ci/agent-action from 2.1.10 to 2.1.11 (#20964)
Bumps [relative-ci/agent-action](https://github.com/relative-ci/agent-action) from 2.1.10 to 2.1.11.
- [Release notes](https://github.com/relative-ci/agent-action/releases)
- [Commits](https://github.com/relative-ci/agent-action/compare/v2.1.10...v2.1.11)

---
updated-dependencies:
- dependency-name: relative-ci/agent-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 09:39:01 +02:00
renovate[bot]
fa03c58a93 Update dependency tar to v7.2.0 (#20952)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 15:21:42 +02:00
renovate[bot]
49f1ad633f Update dependency @codemirror/autocomplete to v6.16.1 (#20948) 2024-06-01 22:39:12 -04:00
renovate[bot]
d449e10120 Update dependency eslint-plugin-lit to v1.14.0 (#20950) 2024-06-01 22:37:39 -04:00
renovate[bot]
474c8c243e Update dependency ua-parser-js to v1.0.38 (#20939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 14:49:31 -04:00
renovate[bot]
e9e53e9451 Update dependency workbox-build to v7.1.1 (#20937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 14:29:02 +02:00
renovate[bot]
cfa84f30be Update typescript-eslint monorepo to v7.11.0 (#20932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 00:41:51 -04:00
karwosts
7416ae7dfd Fix double unsubscribe in todo list card (#20928) 2024-05-30 20:21:39 +02:00
Bram Kragten
10a5c4dfb4 20240530.0 (#20925) 2024-05-30 16:27:39 +02:00
Bram Kragten
6f1fa139e7 Bumped version to 20240530.0 2024-05-30 16:08:31 +02:00
Paulus Schoutsen
b38a348957 Disable beta menu instead of hiding (#20906) 2024-05-30 15:29:28 +02:00
Simon Lamon
f97971faf6 Improve refresh token dialogs (#20917)
* Improve refresh token dialogs

* Remove this
2024-05-30 10:39:15 +02:00
Steve Repsher
c5ae9e8497 Remove eslint-plugin-disable (#20902) 2024-05-30 09:49:40 +02:00
Paul Bottein
c00287c401 Fix config entry menu (#20908) 2024-05-29 23:49:20 +02:00
Bram Kragten
1a2daf8a7a 20240529.0 (#20901) 2024-05-29 18:27:40 +02:00
Bram Kragten
c0e048023d format webpack.cjs 2024-05-29 18:04:24 +02:00
Bram Kragten
431f4937c1 Update webpack.cjs 2024-05-29 17:55:40 +02:00
Bram Kragten
0a55220837 Merge branch 'master' into dev 2024-05-29 17:53:04 +02:00
Paul Bottein
13f01492b4 Add visibility option to dashboard cards (#20840)
* Create hui card

* Add compatiblity with helpers

* Improve layout options

* Fix conditional card

* Add missing import

* Add visibility option in config

* Fix conditions

* Fix case with multiple conditions

* Remove useless set hass
2024-05-29 17:50:16 +02:00
Bram Kragten
ce5bcf61f9 Bumped version to 20240529.0 2024-05-29 17:49:29 +02:00
Bram Kragten
d31a777135 use image selector for view background (#20898)
* use image selector for view background

* make config future proof

* improvements
2024-05-29 17:29:09 +02:00
Paul Bottein
5cc08cfe0b Fix area card editor when an entity have an unknown device (#20900) 2024-05-29 14:29:04 +00:00
Steve Repsher
3eea7dc6cd Use valid locale for translation test (#20899) 2024-05-29 15:44:56 +02:00
karwosts
a629f01300 Collapsible blueprint input sections (#19946)
* Deduplicate blueprint editor code

* Collapsible blueprint sections

* add description

* renamed collapsed

* unused import

* unused import

* Don't allow collapsing sections with required

* Update to new schema
2024-05-29 15:44:11 +02:00
renovate[bot]
f1345af526 Update dependency @bundle-stats/plugin-webpack-filter to v4.13.2 (#20897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-29 12:44:04 +00:00
karwosts
064c51f487 Add a picture uploader to picture-card-editor (#18695)
* Add a picture uploader to picture-card-editor

* add imageSelector

* lint

* Add delete button to picture-upload

* updates from feedback

* fix lint

* Update en.json

* Update selector.ts

* remove delete
2024-05-29 14:32:53 +02:00
karwosts
d88670034a Filter unrecorded entities from history panel (#19621)
* Filter unrecorded entities from history panel

* cache result

* Cache excluded entities instead of recorded entities
2024-05-29 14:32:22 +02:00
Georgi Stanojevski
5fab1969a8 Add Macedonian (Македонски) to the frontend. (#20701)
Following: https://developers.home-assistant.io/docs/translations/#maintainer-steps-to-add-a-new-language

Steps 1 and 2.

- It has the "mk" code in the IANA subtag registry.
- Adding it in src/translations/translationMetadata.json
2024-05-29 14:13:45 +02:00
Simon Lamon
b3e14d449e Show detailed config entry error inline (#20764)
* Put config entry error inline

* Fixes (show configure button and don't make them interactive)
2024-05-29 14:07:52 +02:00
Steve Repsher
97206ee8fe Inject element polyfills where used using Babel (#20689) 2024-05-29 14:02:40 +02:00
Steve Repsher
7748315fc3 Inject Intl polyfills where used (#20798)
* Inject Intl polyfills where used

* Replace Intl polyfill in localize method with loading intl-messageformat asynchronously

* Remove spurious feature tests for Intl
2024-05-29 14:01:21 +02:00
Paul Bottein
e059ca146b Script change icon (#20885)
* Add icon to rename dialog

* Check in entity registry

* Only use icon for script
2024-05-29 13:57:13 +02:00
Jay Turner
56cabeb497 Fix type value on Interface for the energy-usage-graph (#20895) 2024-05-29 10:33:12 +00:00
Paul Bottein
7a7bd87f50 Unify usage of dashboard title (#20853) 2024-05-29 12:29:52 +02:00
Adam Kapos
ff9c794659 Add UI for setting view background (#20708)
* Add UI for setting view background

* Update eslint-plugin-unused-imports to fix parse failure

* Changes from review
2024-05-29 12:23:54 +02:00
Bram Kragten
2921161336 Save data table filters in session storage (#20894)
* Save data table filters in session storage

* typing fix

* remove url logic, rename storage key
2024-05-29 12:20:30 +02:00
G Johansson
91e5fcacd5 Add default code to alarm_control_panel (#20062)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-05-29 11:05:46 +02:00
Raman Gupta
febbf34de6 Change Z-Wave JS API model to match zwave-js (#20793)
* Change Z-Wave JS API model to match zwave-js

* fix qrprovisioninginformation

* remove additional properties from QRProvisioningInformation
2024-05-29 09:25:09 +02:00
Bram Kragten
5a2977f4d4 Add collapse & expand all groups (#20891)
* Add collapse & expand all groups

* review suggestion
2024-05-29 09:16:26 +02:00
Paul Bottein
7a7a355765 Allowing toggle of expiration date for refresh token (#20846)
* Allowing removal of expiration date for refresh token

* Adjust wording and add icon

* Update current

* Update src/translations/en.json

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>

* Update wording

* Allow enable and disable

* Better type

* Better handle errors

* Use relative date

* Update src/panels/profile/ha-refresh-tokens-card.ts

* Update API

---------

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-05-29 09:12:08 +02:00
Paul Bottein
ccebae84a7 Use list for change mode dialog (#20890)
* Use list for change mode dialog

* Add listbox role

* Remove unused import
2024-05-28 18:23:12 +02:00
renovate[bot]
f96f38ee82 Update dependency lint-staged to v15.2.5 (#20892)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 10:46:59 -04:00
renovate[bot]
d4056e6a32 Update dependency @bundle-stats/plugin-webpack-filter to v4.13.1 (#20889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 09:31:17 +02:00
renovate[bot]
389a7a6ed9 Update dependency eslint-plugin-unused-imports to v4 (#20884)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 14:04:45 -04:00
renovate[bot]
05aecaaaf1 Update babel monorepo to v7.24.6 (#20883)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 15:47:29 +02:00
karwosts
085131d546 Rename energy 'Today' button to 'Now' (#20871) 2024-05-27 14:13:55 +02:00
renovate[bot]
c2737d5cec Update dependency @bundle-stats/plugin-webpack-filter to v4.13.0 (#20877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 14:11:34 +02:00
renovate[bot]
29ae46d775 Update dependency @material/web to v1.5.0 (#20878)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 14:09:55 +02:00
Yosi Levy
dfee3ba089 RTL fixes (#20880) 2024-05-27 14:09:29 +02:00
renovate[bot]
1dbb70b964 Update dependency glob to v10.4.1 (#20881)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 08:39:34 +02:00
renovate[bot]
1eecc5c0e2 Update dependency glob to v10.4.0 (#20879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-27 08:22:11 +02:00
Franck Nijhof
81c0bcff0b Add sequence action building block (#20874)
* Add sequence action building block

* This is a non-conditional action

* Render sequence in automation traces graph

* Render trace timeline

* Process review comment
2024-05-26 14:54:05 -04:00
karwosts
6ccbeb8a75 Fix entity picker delete button (#20875) 2024-05-26 15:29:57 +02:00
renovate[bot]
f59ed0a72b Update dependency @rollup/plugin-commonjs to v25.0.8 (#20873) 2024-05-25 21:45:51 -04:00
renovate[bot]
a9f00ded0f Update fullcalendar monorepo to v6.1.13 (#20869)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-25 16:10:53 +00:00
renovate[bot]
74730ba201 Update dependency lint-staged to v15.2.4 (#20868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 22:12:56 +02:00
renovate[bot]
95b2f7d821 Update dependency glob to v10.3.16 (#20867)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 22:07:19 +02:00
renovate[bot]
661b14da54 Update formatjs monorepo (#20847)
* Update formatjs monorepo

* Update dependency @formatjs/intl-locale to v4

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 18:49:48 +02:00
Steve Repsher
41e34c0d61 Inject ResizeObserver polyfill where needed (#20754) 2024-05-24 12:21:46 -04:00
Simon Lamon
5d044a06eb Remove empty electricity grid state (#20794)
* Remove empty grid state

* Apply feedback

* AI review
2024-05-24 16:40:47 +02:00
karwosts
f617426808 Bake numeric device classes into formatEntityState (#19878)
* Bake numeric device classes into formatEntityState

* Apply suggestions from code review

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-05-24 16:17:23 +02:00
karwosts
3c3d54243c Fix pick-theme-row and behavior of default theme mode (#20783) 2024-05-24 16:06:22 +02:00
Paul Bottein
afc624bf4b Remove strict connection (#20861) 2024-05-24 15:50:45 +02:00
AlCalzone
0991628843 Z-Wave JS: Title-Case "S2 Access Control" (#20850)
* Z-Wave JS: Title-Case "S2 Access Control"

* Apply sentence case to example description
2024-05-24 13:23:17 +00:00
Paul Bottein
34b9c7b9d1 Fix long title for section in add card dialog (#20863) 2024-05-24 15:10:17 +02:00
karwosts
d52641b495 Device trigger - sync value with initialHaFormData (#20810)
Device trigger - sync yaml with initialHaFormData
2024-05-24 15:06:40 +02:00
renovate[bot]
80c7fd2bf2 Update typescript-eslint monorepo to v7.10.0 (#20858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-23 21:36:30 +02:00
Steve Repsher
e0062cf190 Inject ElementInternals polyfill where needed (#20818) 2024-05-23 14:25:58 -04:00
karwosts
7d2cee650d Sort yaml reloads on translated domain (#20857) 2024-05-23 16:26:03 +02:00
c0ffeeca7
66560b1f1c Apply sentence-style capitalization to headings (#20855) 2024-05-23 15:22:06 +02:00
NP v/d Spek
a500b582e3 Modify the way the update shows available updates (#20773)
* Modify the way the update shows available updates

* Update src/data/update.ts

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* Update src/data/update.ts

* Update src/translations/en.json

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-05-22 16:15:17 +02:00
Adam Kapos
19f94ff8cc Fix app-theme-color not following header color (#20758)
* Fix app-theme-color not following header color

* Revert incorrect fix for #20671 that only applies when a primary color is set by the user
2024-05-22 15:26:13 +02:00
AlCalzone
0b6994d402 Z-Wave JS: Sort security classes from highest to lowest (#20851) 2024-05-22 14:18:09 +02:00
karwosts
9fe8f507ec Add configurable actions to Gauge Card (#20833)
* Add actions to gauge card

* struct support

* tap_action in UI

* Apply suggestions from code review

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* typo

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-05-22 14:10:22 +02:00
Simon Lamon
2113cf5280 Trim search inputs (#20825) 2024-05-22 10:39:32 +02:00
Paul Bottein
ae9e1b724f Fix voice assistant expose datatable storage key (#20843) 2024-05-21 19:20:29 +02:00
karwosts
9b28c7cf69 Script editor updates (match automation editor) (#20791)
* Show descriptions in script editor

* Script editor updates (match automation editor)

* review feedback
2024-05-21 19:01:51 +02:00
renovate[bot]
d9bac06806 Update formatjs monorepo (#20838)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 12:29:21 -04:00
karwosts
b1e37cb1e1 Missing checkbox in zwave dialog (#20841) 2024-05-21 11:56:55 -04:00
Paul Bottein
a2a89502d8 Add visibility option to sections (conditional section) (#20805)
* Add first version of section visibility option

* Move visibility logic into view

* Simplify section view structure

* Don't add hidden section to dom

* Move visilibity logic to hui-section

* Setup section editor

* Add visibility view

* Add basic settings editor

* Improve visibility editor

* Update conditional base

* Feedbacks

* Better typings
2024-05-21 10:43:23 +02:00
Paul Bottein
4cc5d2d04b Improve open and opening state for lock (#20808)
* Add open and opening color

* Split isAvailable into multiple function

* Use done wording
2024-05-21 09:19:36 +02:00
renovate[bot]
79abcca3b3 Update dependency @braintree/sanitize-url to v7.0.2 (#20836)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-20 19:54:15 +02:00
renovate[bot]
043f383a35 Update dependency chart.js to v4.4.3 (#20835)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-20 13:25:08 -04:00
dependabot[bot]
d4dd767941 Bump actions/checkout from 4.1.5 to 4.1.6 (#20829) 2024-05-20 08:29:31 +02:00
renovate[bot]
174f1991b1 Lock file maintenance (#20823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 03:04:28 +00:00
renovate[bot]
e15495a626 Update dependency eslint-plugin-lit to v1.13.0 (#20775)
* Update dependency eslint-plugin-lit to v1.13.0

* Set attribute-names rule to warning

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2024-05-19 02:49:44 +00:00
renovate[bot]
a8a9a797cb Update dependency sinon to v18 (#20822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-18 21:57:01 -04:00
karwosts
914dbc1e28 Reset select-selector to undefined when cleared (#20821) 2024-05-18 17:28:59 +02:00
Jan-Philipp Benecke
111816f08a Use domain translation in filter for domain search (#20763)
* Use domain translation in filter for domain search
2024-05-18 10:15:29 +02:00
renovate[bot]
1b4534890c Update dependency @lokalise/node-api to v12.5.0 (#20819)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-18 10:02:44 +02:00
renovate[bot]
ed6542469d Update dependency core-js to v3.37.1 (#20815) 2024-05-17 08:30:47 -04:00
renovate[bot]
3774a3d6ba Update typescript-eslint monorepo to v7.9.0 (#20812)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-16 16:32:31 -04:00
Bram Kragten
bfa293ae3a Allow storing thread credentials in phone keychain (#20743)
* Allow storing thread credentials in phone keychain

* Update dialog-thread-dataset.ts

* use preferred of dataset if available
2024-05-16 10:01:40 +02:00
renovate[bot]
9264adb799 Update vaadinWebComponents monorepo to v24.3.13 (#20802)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-16 09:19:36 +02:00
renovate[bot]
829ea4a9e4 Update dependency @types/chromecast-caf-sender to v1.0.10 (#20801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-16 09:04:29 +02:00
Paul Bottein
be26f8bc24 Add grouping by area and domain in voice assistant expose data table (#20797) 2024-05-15 11:41:09 +02:00
renovate[bot]
c864b34a9a Update dependency glob to v10.3.15 (#20795)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-15 08:55:31 +02:00
Cody C
099ea61a94 Add checks to energy dashboard for when preferences are empty (#19765)
* Forbid completing energy dashboard setup unless at least one statistic is selected
* If energy setup was completed but there are no sources available, start setup wizard again
2024-05-13 20:57:37 +02:00
karwosts
3ebe6027be Minor fixes to energy sources behavior (#20785) 2024-05-13 18:41:51 +02:00
karwosts
f5f2a5ad5b Show descriptions in script editor (#20765)
* Show descriptions in script editor

* descriptions in blueprints also
2024-05-13 14:19:47 +02:00
Paulus Schoutsen
d046700d06 Show tag ID if no name, sort by last updated on mobile (#20788) 2024-05-13 09:56:23 +02:00
dependabot[bot]
2ad84b2832 Bump softprops/action-gh-release from 2.0.4 to 2.0.5 (#20790)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 09:13:29 +02:00
dependabot[bot]
f9ccb9fc72 Bump actions/checkout from 4.1.4 to 4.1.5 (#20789)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 09:12:12 +02:00
renovate[bot]
6d3940db1e Update dependency glob to v10.3.14 (#20784)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-12 19:08:52 +02:00
renovate[bot]
20d174431d Update dependency chai to v5.1.1 (#20781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-12 13:06:07 +02:00
renovate[bot]
1900710e06 Update Yarn to v4.2.2 (#20778) 2024-05-11 15:41:07 -04:00
renovate[bot]
ed86a48e1c Update dependency sinon to v17.0.2 (#20772)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 15:08:14 -04:00
renovate[bot]
d2bdb52926 Update vaadinWebComponents monorepo to v24.3.12 (#20761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-09 14:21:35 +02:00
G Johansson
9c57c9f151 Support open / opening state in LockEntity (#19944) 2024-05-08 21:01:57 +02:00
karwosts
9e9cb15a42 Minor improvements to service call descriptions. (#20733)
* Minor improvements to service call descriptions.
2024-05-08 18:04:38 +02:00
renovate[bot]
6421a9443d Update dependency intl-messageformat to v10.5.12 (#20755)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-08 12:50:05 +02:00
Paulus Schoutsen
f2b43ddad8 Allow adding card from history panel (#19582)
* Allow adding card from history panel

* Better empty entities check
2024-05-07 17:11:27 +02:00
Yosi Levy
e55b59d9b7 Logical property style fixes (#20752)
logical prop fixes
2024-05-07 15:35:34 +02:00
Paul Bottein
4a77359a06 Use Material 3 ripple (#20751)
* Use material web ripple component

* Improve button style

* Use css animation instead of ripple for action

* Use ha ripple in all components

* Remove unused label
2024-05-07 15:30:45 +02:00
renovate[bot]
505d7b6ddb Update dependency tar to v7.1.0 (#20748) 2024-05-07 08:23:16 +02:00
Steve Repsher
79cdc43699 Enhance webpack transform async plugin to use babel runtime (with fix) (#20745) 2024-05-06 18:06:21 -04:00
renovate[bot]
8ff9823cd7 Update dependency @octokit/rest to v20.1.1 (#20746)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 20:42:37 +02:00
Paul Bottein
3488c60818 Fix tile card margin on old devices (#20742) 2024-05-06 19:49:52 +02:00
Bram Kragten
b2af21ba5c Bumped version to 20240501.1 2024-05-06 17:50:01 +02:00
Paul Bottein
12a61a0021 Remove alarm modes list when adding a alarm modes card feature (#20688) 2024-05-06 17:49:30 +02:00
Simon Lamon
649917cdde Always save custom display name in energy dashboard when hitting Enter (#20702)
Change to Input event
2024-05-06 17:49:14 +02:00
karwosts
3ed27ee853 Add spacer for FAB under the zone list (#20706) 2024-05-06 17:48:58 +02:00
karwosts
c1d3a76917 Energy CSV download should not require admin (#20704) 2024-05-06 17:48:38 +02:00
Paul Bottein
571ed6b9e9 Revert usage of babel runtime for legacy bundle (#20741)
Revert usage of babel runtine for legacy bundle
2024-05-06 17:48:21 +02:00
Paulus Schoutsen
a347315fa7 Fix showing options button on conversation agent picker (#20736) 2024-05-06 17:47:59 +02:00
Simon Lamon
57d1405115 Show ungrouped group when there are results (#20716) 2024-05-06 17:47:41 +02:00
Yosi Levy
e5ff6bd2f5 Font updates in new filters (#20482)
* Style changes

* Fixes
2024-05-06 17:47:21 +02:00
Yosi Levy
43a422cdca Font updates in new filters (#20482)
* Style changes

* Fixes
2024-05-06 15:39:36 +02:00
Douwe
11f2bef05c Add header text align theme variable to stack cards (#20563)
* Update hui-stack-card.ts

Added variable

* Update hui-stack-card.ts

Updated the variable, so that it would not be in line with the rest of the variables. In this way, the variable only works for hui-stack titles.

* Update hui-stack-card.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-05-06 13:35:36 +00:00
karwosts
ff9f331287 Expand createDomains to more selectors (#20714)
Expand createDomains to more pickers
2024-05-06 15:26:13 +02:00
Steve Repsher
cdf64ccdaa Refactor translation merges to use native transform stream (#20666) 2024-05-06 15:17:01 +02:00
Simon Lamon
8b220acca2 Show ungrouped group when there are results (#20716) 2024-05-06 15:07:22 +02:00
Paul Bottein
8fdb7fa1d5 Update newsletter link (#20740)
* Update newsletter link

* Update src/panels/config/dashboard/ha-config-dashboard.ts

* Update src/onboarding/dialogs/community-dialog.ts
2024-05-06 14:57:51 +02:00
Paulus Schoutsen
008c842431 Fix showing options button on conversation agent picker (#20736) 2024-05-06 12:24:22 +02:00
Paul Bottein
bc41de0d9c Revert usage of babel runtime for legacy bundle (#20741)
Revert usage of babel runtine for legacy bundle
2024-05-06 12:12:19 +02:00
renovate[bot]
7310c9cf6d Update Yarn to v4.2.1 (#20735) 2024-05-05 21:49:14 -04:00
Steve Repsher
84b436c08e Fix self-injection for custom polyfills (#20718)
* Fix self-injection for custom polyfills

* Update build-scripts/bundle.cjs

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-03 16:37:40 -04:00
renovate[bot]
1925a47bdc Update dependency eslint-plugin-unused-imports to v3.2.0 (#20715)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 16:05:13 +00:00
renovate[bot]
438a426458 Update babel monorepo to v7.24.5 (#20707) 2024-05-02 21:25:29 -04:00
karwosts
f923deb71d Energy CSV download should not require admin (#20704) 2024-05-02 21:08:54 +02:00
renovate[bot]
e79bc71ab7 Update typescript-eslint monorepo to v7.8.0 (#20703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-02 21:04:03 +02:00
karwosts
11b0990d2b Add spacer for FAB under the zone list (#20706) 2024-05-02 21:02:57 +02:00
Simon Lamon
870cb0c65f Always save custom display name in energy dashboard when hitting Enter (#20702)
Change to Input event
2024-05-02 20:03:36 +02:00
Paul Bottein
deda2009f8 Remove alarm modes list when adding a alarm modes card feature (#20688) 2024-05-02 19:22:43 +02:00
renovate[bot]
b2797ab8da Update dependency gulp to v5 (#20601)
* Update dependency gulp to v5

* Fix premature cloasing of hash stream

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2024-05-01 15:13:28 +02:00
renovate[bot]
644dcb0381 Update dependency systemjs to v6.15.1 (#20682)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 13:12:18 +02:00
Bram Kragten
c65f4f7a6e Revert "Remove strict connections" (#20685)
Revert "Remove strict connections (#20662)"

This reverts commit 1df92fa863.
2024-05-01 12:53:01 +02:00
Bram Kragten
e2266aa671 Merge branch 'dev' 2024-05-01 12:04:10 +02:00
Bram Kragten
68a79490dc Bumped version to 20240501.0 2024-05-01 12:03:26 +02:00
Paul Bottein
6febe8552e Allow to reorder alarm modes in card feature (#20684) 2024-05-01 11:55:06 +02:00
Bram Kragten
f611f23f6f Make sure lovelace theme background is set on it's container (#20683) 2024-05-01 11:24:40 +02:00
Bram Kragten
ef4f11fdf8 20240430.0 (#20681) 2024-04-30 23:58:58 +02:00
Bram Kragten
627e06663b Bumped version to 20240430.0 2024-04-30 23:44:32 +02:00
Paul Bottein
ab01633069 Fix ha settings row display in more info settings (#20680) 2024-04-30 21:12:53 +00:00
Bram Kragten
17dcc90638 Update entity status filter and grouping (#20679) 2024-04-30 23:04:48 +02:00
Paul Bottein
d0df029ff1 Update check update icon and add toast when checking update (#20677)
* Update check update icon

* Add toast when checking for update
2024-04-30 19:21:30 +00:00
Paul Bottein
86a7e69812 Allow to reorder and filter options in select options card feature (#20675) 2024-04-30 21:14:49 +02:00
Adam Kapos
af9417f2a6 Add theme support for dialog surface background (#20653)
* Add theme support for dialog surface background

* Change from review

* Change from review

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

* Run prettier

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-30 21:12:36 +02:00
Paul Bottein
7120ad99b9 Add customize mode option to card features with modes (#20670)
* Add customize mode options to card features with modes

* Better type

* Fix water heater and humidifier

* Clean schema
2024-04-30 18:38:51 +02:00
Adam Kapos
334c245b65 Fix visual differences between regular and energy dashboards (#20654)
* Fix visual differences between regular and energy dashboards

* Order padding properties the same way between energy and lovelace

* Change from code review
2024-04-30 15:07:54 +02:00
Nicooow
bcb72d83b8 Fix an inconsistency in dark mode (#20671)
* add app-theme-color var

* Fix Prettier format

* Fix regression on default dark theme

* prevent duplicate calculation
2024-04-30 12:03:19 +00:00
karwosts
c99e0e846b More config/entities status filters (#20638) 2024-04-30 12:32:32 +02:00
J. Nick Koston
ec3f63e8a3 Fallback to raw config entry reason if localize returns an empty string (#20668)
Show config entry reason if localize returns an empty string
2024-04-30 12:25:45 +02:00
karwosts
1bc33a30ec Display version info for custom integrations (#20652)
* Display version info for custom integrations

* no width
2024-04-30 12:23:20 +02:00
krazos
8cca233b7c Update unlock icon for tile card lock features (#20667)
Update unlock icon for tile card lock features so it's easier to see the difference between lock and unlock buttons
2024-04-29 20:53:33 +02:00
karwosts
a78608bfb4 Reorderable card-feature modes (#20647)
* Reorderable card-feature modes

* unused var in getStubConfig
2024-04-29 17:48:01 +02:00
Bram Kragten
e7c1ac94af 20240429.0 (#20665) 2024-04-29 17:44:33 +02:00
Bram Kragten
1a797b3415 Bumped version to 20240429.0 2024-04-29 17:36:46 +02:00
Bram Kragten
2b27a4da2b Show abort reason when no translation (#20664) 2024-04-29 17:35:30 +02:00
Bram Kragten
1df92fa863 Remove strict connections (#20662)
* Remove strict connections

* Update cloud-remote-pref.ts
2024-04-29 16:42:23 +02:00
Bram Kragten
cdde85315a fix list items cloud account (#20663) 2024-04-29 14:26:14 +00:00
Paul Bottein
dc67f9faf4 Fix cloud page design on mobile (#20661) 2024-04-29 16:03:02 +02:00
dependabot[bot]
3ad1be50a2 Bump actions/upload-artifact from 4.3.2 to 4.3.3 (#20658)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 12:38:02 +02:00
dependabot[bot]
8aadfe7d28 Bump actions/checkout from 4.1.3 to 4.1.4 (#20659)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 12:33:17 +02:00
renovate[bot]
cff54b73a4 Update dependency @lokalise/node-api to v12.4.1 (#20643)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-27 20:01:32 +02:00
Philip Allgaier
b54cfeb0c0 Hide "Browse Media" button for unavailable media players (#20629)
* Hide "Browse Media" button for unavailable media players
2024-04-27 14:36:42 +02:00
renovate[bot]
cefe612b11 Update dependency @octokit/plugin-retry to v7.1.1 (#20641)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-27 11:16:55 +02:00
renovate[bot]
4bc874b497 Update workbox monorepo to v7.1.0 (#20642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-27 11:16:43 +02:00
Philip Allgaier
f3abaa8e02 Align lawn-mower and vacuum more-info layouts (#20632) 2024-04-26 14:07:38 +02:00
Philip Allgaier
21a563fe98 Add details for offset format to sun trigger (#20625)
Add details for offset to sun trigger
2024-04-26 14:05:04 +02:00
Paul Bottein
1acbcccd62 20240426.0 (#20636) 2024-04-26 11:42:26 +02:00
Paul Bottein
35d6c638ab Bumped version to 20240426.0 2024-04-26 11:40:38 +02:00
Bram Kragten
68f8239708 Update cloud remote settings (#20619)
* Update cloud remote settings

* Change again

* Update cloud-remote-pref.ts

* Update UI

* Add missing translations

* use hr and simplify condition

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-04-26 11:36:03 +02:00
renovate[bot]
0db64cca0b Update dependency @babel/helper-define-polyfill-provider to v0.6.2 (#20627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 23:37:11 -04:00
renovate[bot]
accfda5f4b Update typescript-eslint monorepo to v7.7.1 (#20628) 2024-04-25 20:51:55 -04:00
Philip Allgaier
c97c20f57d Add mock area registry to demo to fix card picker (#20626) 2024-04-25 18:50:16 +00:00
Philip Allgaier
2725d0191d Disable counter more-info dec/inc buttons when min/max reached (#20624) 2024-04-25 20:49:20 +02:00
renovate[bot]
852cc62398 Update dependency @types/leaflet to v1.9.12 (#20623)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 17:56:27 +02:00
David F. Mulcahey
654e3ce437 Fix ZHA UI issues (#20622) 2024-04-25 16:16:00 +02:00
Bram Kragten
20a3a00aec add inital data for language selector (#20620)
* add inital data for language selector

* Update compute-initial-ha-form-data.ts
2024-04-25 15:25:18 +02:00
Bram Kragten
22b927d666 make sure we always have trigger and action (#20621)
* make sure we always have trigger and action

* script too
2024-04-25 15:24:33 +02:00
Philip Allgaier
709d6be2e3 Fix wrong chevron icon direction for groups in data tables (#20617)
Fix chevron icon for groups in data table
2024-04-25 11:28:36 +02:00
Bram Kragten
64f54d9aaa 20240424.1 (#20609) 2024-04-24 14:45:22 +02:00
Bram Kragten
fbda9ca418 Bumped version to 20240424.1 2024-04-24 14:30:36 +02:00
Paul Bottein
4e97e3763e Use theme mode property for ha-map (#20606)
* Use theme mode property for ha-map

* Use theme mode in ha-location-editor

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-24 14:28:33 +02:00
Bram Kragten
4c9c52d27d Add filter for domains to entity settings (#20605) 2024-04-24 13:53:14 +02:00
Bram Kragten
87bcd3e471 Add multiselect area to automation/scene/script (#20604) 2024-04-24 10:10:43 +00:00
Paul Bottein
7e9b01b56d Fix text alignment for open lock card feature (#20603)
Fix text aligment for open lock card feature
2024-04-24 09:36:17 +00:00
karwosts
713763fc21 Fix visual map issues (#20541)
* Fix visual map issues (#15587)

- hover background color of zoom control in dark mode
- map light mode when dark theme is used
- background color of zoom control with map dark mode when light theme is used

* Fix breaking change (#15587)

* Change theme mode selection to use dropdown (#15587)

- Additionally fixed unpleasant horizontal scrollbar in map editor

* Add yaml migration, fix force light/dark options

---------

Co-authored-by: Christoph Wen <wen.christoph@gmail.com>
2024-04-24 11:35:37 +02:00
renovate[bot]
5b7ab1bfcb Update dependency cropperjs to v1.6.2 (#20600)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-24 11:28:58 +02:00
Bram Kragten
8712adbf8d 20240424.0 (#20602) 2024-04-24 11:21:24 +02:00
Bram Kragten
4b0d19b615 Fix duplicate imports from merge 2024-04-24 11:14:55 +02:00
Bram Kragten
90e5d259af Merge branch 'master' into dev 2024-04-24 11:13:34 +02:00
Bram Kragten
af3a331f57 Bumped version to 20240424.0 2024-04-24 11:09:48 +02:00
Bram Kragten
67c60a4aa8 Add strict connection cloud settings (#20585)
* Add strict connection cloud settings

* Change static page to guard page

* saving files helps...

* Add create link button

* use correct service
2024-04-24 11:06:15 +02:00
Bram Kragten
62de16bb8e Implement storing sorting and grouping for all tables (#20594) 2024-04-24 11:06:00 +02:00
Marc Geurts
d9b71e754d Add lock features for tile card (#20539)
* Added lock features for tile card

* Change success label
2024-04-24 10:30:34 +02:00
Matthias Alphart
5fc950f09f Fix ha-filter-states clear filter behaviour (#20599)
Fix ha-filter-states clear filter behaviour
2024-04-24 10:28:17 +02:00
J. Nick Koston
0725c7b160 Restore getHassTranslationsPre109 (#20597)
* Revert "Remove legacy state translations (#20536)"

This reverts commit e376efc579.

* keep
2024-04-24 10:26:24 +02:00
Steve Repsher
469dbbcccc Rollback gulp to version 4 (#20598) 2024-04-24 10:25:52 +02:00
Bram Kragten
ffdd661b1f Make fallback translations work (#20596) 2024-04-24 07:31:29 +02:00
Bram Kragten
81922f5a3e Save and restore collapsed groups (#20591) 2024-04-23 21:00:17 +02:00
renovate[bot]
7e25366897 Update dependency @types/chromecast-caf-receiver to v6.0.14 (#20589)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 18:04:44 +02:00
Bram Kragten
8ab61b5468 Add title when text in datatable doesnt fit (#20590) 2024-04-23 13:50:44 +02:00
Bram Kragten
8239f6dd60 Update hass-tabs-subpage-data-table.ts 2024-04-22 20:28:21 +02:00
Bram Kragten
45dce18e4d typo 2024-04-22 20:15:52 +02:00
Bram Kragten
a428ad0655 Add bulk area assignment to device dashboard (#20581)
* Add bulk area assignment to device dashboard

* Update ha-config-devices-dashboard.ts
2024-04-22 18:35:58 +02:00
Bram Kragten
1b54d51e4a Add option for custom group order to data table (#20582) 2024-04-22 18:28:50 +02:00
Bram Kragten
eb1354d229 Allow groups in data table to be collapsed (#20579) 2024-04-22 18:27:46 +02:00
Bram Kragten
4d21f9e80c Allow to group entities by domain (#20580)
Allow group entities by domain
2024-04-22 18:27:13 +02:00
Paul Bottein
62f46baacf Fix more info slider in iOS (#20586) 2024-04-22 18:26:50 +02:00
Bram Kragten
a3090796d2 Store grouping and sorting for device table (#20583) 2024-04-22 18:13:44 +02:00
renovate[bot]
c34c5d64f9 Update dependency @codemirror/commands to v6.5.0 (#20587)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 18:09:46 +02:00
Bram Kragten
66228f5858 Add new timestamp state domains (#20584) 2024-04-22 16:33:32 +02:00
Bram Kragten
ac378cfe6d Update external barcode scanning API (#20470) 2024-04-22 12:52:59 +02:00
Nicooow
7ecf8b755e Add css var for meta theme-color attribute (#20558)
* add app-theme-color var

* Fix Prettier format
2024-04-22 09:51:21 +02:00
Matthias Alphart
141107f1f3 Apply initial values to forms of device trigger extra fields (#20555)
* Apply default values of device trigger extra fields

* use computeInitialHaFormData
2024-04-22 09:48:50 +02:00
karwosts
b5277dee53 When munging statistics to history, assume always numeric (#20544) 2024-04-22 09:41:12 +02:00
Steve Repsher
4b593c1c96 Enhance webpack transform async plugin to use babel runtime (#20543) 2024-04-22 09:40:20 +02:00
dependabot[bot]
50ce1b94c8 Bump actions/upload-artifact from 4.3.1 to 4.3.2 (#20575)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 09:22:38 +02:00
dependabot[bot]
8bf27a83ec Bump actions/checkout from 4.1.2 to 4.1.3 (#20576)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 09:21:14 +02:00
renovate[bot]
389f0d3d23 Update dependency marked to v12.0.2 (#20577)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 09:19:52 +02:00
karwosts
b966601e6a Hide beta toggle when unsupervised (#20573) 2024-04-21 09:50:14 +02:00
renovate[bot]
f2a0881821 Update dependency @types/tar to v6.1.13 (#20572)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-21 09:36:09 +02:00
renovate[bot]
50a49eae43 Update dependency date-fns-tz to v3.1.3 (#20552)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 14:23:57 -04:00
renovate[bot]
1c04561004 Update dependency @codemirror/commands to v6.4.0 (#20569)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 19:39:54 +02:00
renovate[bot]
b80d94d260 Update dependency magic-string to v0.30.10 (#20568)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 19:39:42 +02:00
karwosts
87012e23e7 Wrap unbreakable area names in ha-card header (#20566) 2024-04-20 19:39:24 +02:00
Simon Lamon
f39758b103 Only create sortable when not disabled (#20565) 2024-04-20 14:32:40 +02:00
G Johansson
697bbf428e Add translation to integration setup failures (#19128) 2024-04-20 09:16:36 +02:00
renovate[bot]
c7444a2605 Update dependency @octokit/auth-oauth-device to v7.1.1 (#20560)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 09:03:01 +02:00
karwosts
3a5f4d33d2 Fix stopped_unknown_reason localization message (#20557)
* Fix stopped_unknown_reason localization message
2024-04-20 08:45:05 +02:00
renovate[bot]
c3dc62523b Update dependency core-js to v3.37.0 (#20559) 2024-04-19 20:45:00 -04:00
renovate[bot]
424622061a Lock file maintenance (#20553) 2024-04-19 00:47:42 -04:00
renovate[bot]
a3b021b11d Update dependency @material/web to v1.4.1 (#20551) 2024-04-19 00:12:18 -04:00
renovate[bot]
b60ad8b143 Update typescript-eslint monorepo to v7.7.0 (#20549) 2024-04-18 18:55:17 -04:00
J. Nick Koston
e376efc579 Remove legacy state translations (#20536)
* Remove legacy state translations

https://github.com/home-assistant/core/pull/112023
2024-04-18 06:33:07 +02:00
renovate[bot]
382035a1d4 Update dependency @types/color-name to v1.1.4 (#20546)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 18:55:59 -04:00
renovate[bot]
542e22fe0e Update dependency tar to v7.0.1 (#20547)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 22:54:57 +00:00
karwosts
af37d57779 Fix entity picker delete entity (#20542) 2024-04-17 19:48:25 +02:00
renovate[bot]
fbef0b0186 Update dependency gulp to v5 (#20305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 12:31:10 -04:00
renovate[bot]
9e67d6add8 Update dependency @types/leaflet to v1.9.11 (#20538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 18:21:59 +02:00
Simon Lamon
25c702ad2b Don't display keyboard shortcut hints in quickbar if keyboard shortcuts are disabled (#20527)
Fix forgotten hint shortcut tip
2024-04-15 20:20:45 +02:00
Bram Kragten
6516597c93 Fix zones on mobile, align mobile and non mobile view (#20525)
* Fix zones on mobile, align mobile and non mobile view

* Fix CI

---------

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-04-15 20:20:14 +02:00
renovate[bot]
1df9c38a8c Update dependency tar to v7 (#20513)
* Update dependency tar to v7

* Update fetch-nightly-translations.js

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-15 13:40:38 +00:00
renovate[bot]
bd7217145a Update dependency element-internals-polyfill to v1.3.11 (#20512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 15:07:09 +02:00
renovate[bot]
569fef38a4 Update vaadinWebComponents monorepo to v24.3.11 (#20523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 15:03:46 +02:00
Thomas Steiner
f21c89cf1a Make allow attribute configurable in iframe panel (#19087)
* Make allow attribute configurable in iframe panel

* Delete .vscode/settings.json

* Update ha-panel-iframe.ts

* Don't quote

* Update src/panels/iframe/ha-panel-iframe.ts

Co-authored-by: Quentame <polletquentin74@me.com>

* Make `allow` configurable for `hui-iframe-card`

* Update src/panels/iframe/ha-panel-iframe.ts

Co-authored-by: Quentame <polletquentin74@me.com>

* Update src/panels/lovelace/cards/hui-iframe-card.ts

Co-authored-by: Quentame <polletquentin74@me.com>

* Update src/panels/iframe/ha-panel-iframe.ts

Co-authored-by: Quentame <polletquentin74@me.com>

* Update src/panels/lovelace/cards/hui-iframe-card.ts

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

* Delete src/panels/iframe/ha-panel-iframe.ts

* Restore dev

* Update ha-panel-iframe.ts

* Prettier

---------

Co-authored-by: Quentame <polletquentin74@me.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-15 14:48:57 +02:00
renovate[bot]
02cc418969 Update CodeMirror (#20520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 09:21:07 +00:00
Cougar
4faba159c0 ZHA (Zigbee) visualization enhancement (#20511) 2024-04-15 11:09:16 +02:00
Adam Kapos
29816e6c5e Fix malformed CSS in dialog surface (#20519) 2024-04-15 11:06:07 +02:00
karwosts
5317a11c39 Sort custom cards in card picker (#20517) 2024-04-14 22:32:35 +02:00
Simon Lamon
27c53b3241 Replace paper-listbox in zone area (#19955)
* ha-config-zone

* Fixes

* add selected event back

* Fixes

* remove leftover paper-item css rule

* Fixup merge conflict
2024-04-14 13:46:38 +02:00
renovate[bot]
919befa961 Update dependency typescript to v5.4.5 (#20510) 2024-04-13 20:43:27 -04:00
renovate[bot]
f9c02ed099 Update dependency date-fns-tz to v3.0.1 (#20509) 2024-04-13 20:38:12 -04:00
karwosts
b35c325f43 Rebuild stack card when a child card rebuilds (#19861) 2024-04-12 20:53:04 +02:00
karwosts
b82f1128fe Location/zone editor updates (#19994) 2024-04-12 20:51:23 +02:00
karwosts
178feb7330 Create helpers from automation editor (#19287)
* Create helpers from automation editor

* support multiple createDomains

* localization

* fix lint

* Move multi domain to entity picker

* Update dialog-helper-detail.ts

* Update ha-config-helpers.ts

* optimize a little

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-12 18:38:39 +00:00
karwosts
0118a5bf4c Allow customizing display name for energy device (#20033)
* Allow customizing display name for energy device

* use display name in device settings list
2024-04-12 20:31:59 +02:00
renovate[bot]
e0087bd142 Update dependency @material/web to v1.4.0 (#20177)
* Update dependency @material/web to v1.4.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-04-12 15:15:33 +00:00
renovate[bot]
c2d3e7900e Update date-fns to v3 (major) (#20504)
* Update date-fns to v3

* update imports

* breaking changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-12 17:03:30 +02:00
Charles Garwood
fb8312110b Add support for setting label description (#20421)
* Add support for setting label description
2024-04-12 15:49:07 +02:00
renovate[bot]
16de57342e Update dependency eslint-plugin-wc to v2.1.0 (#20500)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 08:23:48 -04:00
renovate[bot]
ad6e041c04 Update dependency @codemirror/view to v6.26.2 (#20505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 13:10:15 +02:00
Steve Repsher
e22e3e88a0 Speed up and simplify translations build (#19988)
* Speed up and simplify translations build

- Remove use of gulp-flatmap for merges (wasted input) and just loop over translation files.
- Parse and buffer master only once for all merges.
- Remove lokalise key reference transform from non-English files. This is already done by Lokalise when they are downloaded.
- Remove tabs from merged output to minimize buffer sizes.
- Pipe merges to a hashing stream, removing extra tasks and intermediate file I/O.
- Pipe hashed files to a single custom asynchronous transform stream to fragmentize the files. It expands the stream to push a new file for each fragment.
- Incorporate flattening into fragmentization.
- Delete entire ui.panel key for base translation (instead of leaving an empty object).
- Optimize flatten method to stop copying output over and over.
- Convert empty and test filters to JSON.parse() revivers for simplicity and better performance.
- Incorporate supervisor builds into main tasks using a simple toggle (i.e. remove duplicate code).
- Funcify local tasks and simplify exported tasks.
- Incorporate test metadata task into a simplified metadata task.

* Fix Lokalise key reference link

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>

---------

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-04-12 12:49:18 +02:00
Steve Repsher
dc8a50965c Group date-fns packages (#20499) 2024-04-12 12:22:18 +02:00
Bram Kragten
1914de7ddf Bumped version to 20240404.2 2024-04-12 11:21:05 +02:00
Simon Lamon
2e505cfb1f Add spacing between icon and name in entity button bar (#20492)
* Fix width between icon and name

* Remove no-text
2024-04-12 11:20:15 +02:00
Bram Kragten
ab49aca815 Handle errors in multi select (#20494) 2024-04-12 11:19:57 +02:00
Bram Kragten
c96968e476 Fix issues with application credentials (#20495) 2024-04-12 11:19:31 +02:00
Simon Lamon
8f050516ec Fix missing argument in voice assistant expose search label (#20491) 2024-04-12 11:18:47 +02:00
Simon Lamon
27d2b244a4 Add spacing between icon and name in entity button bar (#20492)
* Fix width between icon and name

* Remove no-text
2024-04-12 11:17:51 +02:00
Bram Kragten
be2f2c6271 Handle errors in multi select (#20494) 2024-04-12 11:15:15 +02:00
Bram Kragten
8dc2797b16 Fix issues with application credentials (#20495) 2024-04-12 11:10:23 +02:00
renovate[bot]
7ca8dabc44 Update typescript-eslint monorepo to v7.6.0 (#20497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 16:32:52 -04:00
Bram Kragten
baeb55e217 Merge branch 'master' into dev 2024-04-11 11:16:42 +02:00
Simon Lamon
a8502fcc11 Fix missing argument in voice assistant expose search label (#20491) 2024-04-11 11:10:02 +02:00
Paulus Schoutsen
9f5bc5b196 Match on correct entity ID of HA conversation agent (#20484) 2024-04-10 11:41:12 +02:00
Bruno Pantaleão Gonçalves
7556ab9506 Add css var for header webkit backdrop filter (#20473)
* Add CSS var for header -webkit-backdrop-filter

* Add backdrop to energy and developer tools
2024-04-10 11:40:44 +02:00
Adam Kapos
bf176ac314 Make it possible for themes to blur backgrounds (#20447)
* Make it possible for themes to blur card backgrounds

* Make it possible for themes to blur dialog backgrounds

* Add ha prefix

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

* Rename dialog-backdrop-filter to ha-dialog-scrim-backdrop-filter

With backwards compatibility

* Run prettier

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-04-10 11:37:35 +02:00
Adam Kapos
9903e22eaa Change tile to display "last triggered" in relative time (#20463) 2024-04-09 14:11:58 +02:00
Simon Lamon
1e0f7d9629 Don't display keyboard shortcut hints if keyboard shortcuts are disabled (#20456)
* Shortcut hints

* Prettier
2024-04-09 14:10:59 +02:00
Charles Garwood
e8a140af44 Don't duplicate the label as the description in Z-Wave Config (#20454)
Don'tduplicate the label as the description
2024-04-09 14:09:21 +02:00
Bram Kragten
b091d4f298 Write log on translation error (#20430)
* Write log on translation error

* Update ha-config-devices-dashboard.ts

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-04-09 13:25:27 +02:00
renovate[bot]
35cf3063cb Update dependency @lokalise/node-api to v12.4.0 (#20252) 2024-04-08 20:49:48 -04:00
renovate[bot]
7141ef17be Update dependency @codemirror/legacy-modes to v6.4.0 (#20475) 2024-04-08 20:36:26 -04:00
renovate[bot]
be2c68c0bb Update octokit monorepo (#20453) 2024-04-08 20:32:57 -04:00
renovate[bot]
7c944d3767 Update dependency mocha to v10.4.0 (#20279) 2024-04-08 20:29:48 -04:00
renovate[bot]
1d4f02df2e Update dependency glob to v10.3.12 (#20298) 2024-04-08 20:28:30 -04:00
renovate[bot]
2007a74a20 Update babel monorepo to v7.24.4 (#20451) 2024-04-08 20:23:53 -04:00
renovate[bot]
8c0839ad57 Update dependency @types/tar to v6.1.12 (#20457) 2024-04-08 20:22:31 -04:00
renovate[bot]
516b9a54c4 Update dependency typescript to v5.4.4 (#20468) 2024-04-08 20:21:33 -04:00
renovate[bot]
0d3e730c9c Update dependency magic-string to v0.30.9 (#20465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 09:33:26 +02:00
renovate[bot]
c7a87d02b2 Update dependency @types/leaflet to v1.9.9 (#20452) 2024-04-07 20:37:42 +02:00
Bram Kragten
dd082c204b Remove unused type (#20429) 2024-04-05 12:22:47 +02:00
renovate[bot]
c4af3d1579 Update typescript-eslint monorepo to v7.5.0 (#20426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-05 11:36:28 +02:00
Bram Kragten
10eadbcbbb Merge branch 'dev' 2024-04-04 21:31:51 +02:00
Bram Kragten
17141824f7 Bumped version to 20240404.1 2024-04-04 21:31:30 +02:00
Bram Kragten
4cfd6c010f Fix overflow on submenus (#20415) 2024-04-04 19:54:36 +02:00
Bram Kragten
daa9024bff Make pages full height 2024-04-04 17:16:36 +02:00
Bram Kragten
e96aca90fe 20240404.0 (#20414) 2024-04-04 16:23:24 +02:00
Bram Kragten
0580a31961 Bumped version to 20240404.0 2024-04-04 16:16:30 +02:00
Bram Kragten
5c42c5130c Add count of items (#20410)
* Add count of items

* Adjust layout, correct filter count
2024-04-04 16:15:13 +02:00
Bram Kragten
72d1e37a23 Fix integration filter search (#20408) 2024-04-04 13:26:26 +02:00
Bram Kragten
61c9072a08 Fix icons in entity settings (#20405) 2024-04-04 13:00:14 +02:00
Bram Kragten
08b25f9c2a Add floor and label support to describe action (#20403) 2024-04-04 13:00:05 +02:00
Samuel Schultze
1a03b49700 Fix calendar range selection (#20394)
fix: calendar range selector
2024-04-04 12:59:54 +02:00
Paul Bottein
2d4a8e2e45 Fix search input outlined background color and margin (#20407) 2024-04-04 12:53:03 +02:00
Bram Kragten
8486377604 Fix z-index create category dialog (#20406) 2024-04-04 10:51:04 +00:00
Paul Bottein
3a4e9b6856 Avoid duplicate entity ids in history (#20402)
* Avoid duplicate entity ids in history

* Don't need to check for size
2024-04-04 12:12:04 +02:00
Bram Kragten
5f5ac5419b Add floor and label support to history panel (#20388) 2024-04-04 00:06:03 +02:00
Bram Kragten
92b7a3b477 Adjust integration filter height for search bar (#20382) 2024-04-03 21:54:27 +02:00
Bram Kragten
4326519a3f 20240403.1 (#20380) 2024-04-03 16:58:47 +02:00
Bram Kragten
00837acdfc Bumped version to 20240403.1 2024-04-03 16:52:23 +02:00
Bram Kragten
7704be12b1 When creating a label or category with multi select, also assign it (#20379)
* When creating a label or category with multi select, also assign it

* correct scope

* again
2024-04-03 16:51:33 +02:00
Bram Kragten
712ddb531b Make selection bar responsive (#20378) 2024-04-03 16:48:02 +02:00
Bram Kragten
d52afc3f71 Add settings shortcut to scene and script table (#20375) 2024-04-03 16:11:32 +02:00
Bram Kragten
92f6083e0b Faulty helpers should not be selectable (#20373) 2024-04-03 15:19:05 +02:00
Bram Kragten
5751fdbe56 Improve entity integration filter (#20372) 2024-04-03 15:18:40 +02:00
Bram Kragten
962b30adb9 20240403.0 (#20370) 2024-04-03 14:50:16 +02:00
Bram Kragten
3b5b3f3bb6 Handle disabled entities in multi select label (#20371) 2024-04-03 14:40:48 +02:00
Bram Kragten
1a6d96cf3a Bumped version to 20240403.0 2024-04-03 14:18:07 +02:00
Bram Kragten
034fd9b4df Manage areas from floor dialog (#20347)
* manage areas from floor dialog

* Finish

* fix exclude
2024-04-03 14:17:32 +02:00
Bram Kragten
eb79a1e7d7 Allow to remove labels in multi select (#20368)
* Allow to remove labels in multi select

* reducedTouchTarget

* fix devices

* Update ha-config-devices-dashboard.ts
2024-04-03 14:17:21 +02:00
Bram Kragten
e25d4f17aa Add create category and label to multi select (#20365)
* Add create category and label to multi select

* move out of map
2024-04-03 13:23:00 +02:00
Bram Kragten
ccde9cceee Add category and filters to helpers (#20346)
* Add category and filters to helpers

* Add support for adding label and category in multi select

* remove labels multi
2024-04-03 13:22:40 +02:00
Paul Bottein
578d3c4260 Set input and button background color to white for toolbar (#20369) 2024-04-03 11:10:51 +00:00
Bram Kragten
bfdc9a3d86 Add area to automation, scene, script tables (#20366)
* Add area to automation, scene, script tables

* typing
2024-04-03 13:04:47 +02:00
Bram Kragten
5315545a4d Add search to integration filter (#20367) 2024-04-03 12:03:35 +02:00
Paul Bottein
82a3b9d80f Use tree for nested floor instead of icon (#20363) 2024-04-03 09:27:30 +00:00
Bram Kragten
3de985a3b8 Prevent line break in selection menu (#20361) 2024-04-03 11:04:24 +02:00
Bram Kragten
567ee8000d Fix toggles in automation datatable on firefox (#20360) 2024-04-03 08:30:08 +00:00
Bram Kragten
03939001b2 Fix elements above filter dialog (#20359) 2024-04-03 08:28:33 +00:00
Bram Kragten
30d18050d1 Add arrow to areas under floors (#20344) 2024-04-03 10:24:10 +02:00
Bram Kragten
95caf8c7df make subpage data table full height (#20358) 2024-04-03 10:12:36 +02:00
Bram Kragten
6c1f328d71 Take lang into account when sorting groups (#20355)
* Take lang into account when sorting groups

* make sure empty values are at the bottom
2024-04-03 10:12:25 +02:00
Bram Kragten
bb20ab8c2c Fix removing labels (#20354) 2024-04-03 09:54:49 +02:00
Bram Kragten
29eb73176a 20240402.2 (#20348) 2024-04-02 23:34:17 +02:00
Bram Kragten
17ad3a87f3 Bumped version to 20240402.2 2024-04-02 23:31:14 +02:00
Bram Kragten
ed7c9c33b9 Add my link support for labels (#20345) 2024-04-02 22:31:37 +02:00
Bram Kragten
59b66219cb Add clear filter button to individual filters (#20343) 2024-04-02 22:05:03 +02:00
Bram Kragten
1e2c1d1464 Add search to device and entity filters (#20341) 2024-04-02 21:46:21 +02:00
Bram Kragten
5b86b1277f Add edit button to areas in area dashboard + color add floor fab (#20339) 2024-04-02 21:41:56 +02:00
Paul Bottein
41fdf31e34 Check for entity state and entity string in conditional card (#20331)
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2024-04-02 20:39:39 +02:00
Bram Kragten
9bef5c2af9 Add clear button to search field (#20332) 2024-04-02 19:42:54 +02:00
Paul Bottein
ed1a69071b Replace add label by manage labels in filters (#20330) 2024-04-02 19:05:01 +02:00
Paul Bottein
56d328b4db Fix error in console when taking control of the strategy (#20329) 2024-04-02 18:33:30 +02:00
Paulus Schoutsen
33c7e0fa2d Hide conversation entities from default dashboard (#20327) 2024-04-02 14:55:22 +00:00
Bram Kragten
4f1cf1110f 20240402.1 (#20326) 2024-04-02 16:41:12 +02:00
Bram Kragten
a434bfd944 Bumped version to 20240402.1 2024-04-02 16:33:05 +02:00
Bram Kragten
21ed8e4206 Load translations when adding item in pickers (#20325)
* Load translations when adding item in pickers

* Update ha-selector-label.ts
2024-04-02 15:33:10 +02:00
Paul Bottein
169d782580 Fix label wrap (#20323)
* Don't wrap headline on ha-menu-item

* Don't wrap text on ha-label
2024-04-02 13:20:22 +00:00
Bram Kragten
8a015f4e38 Update multi select of entities config (#20319)
* Update multi select of entities config

* Update ha-config-entities.ts
2024-04-02 15:16:20 +02:00
Bram Kragten
cbb08c6202 Add multi select to scripts and scenes (#20318) 2024-04-02 15:16:10 +02:00
Bram Kragten
6301bc713c Add multi select to devices (#20321) 2024-04-02 15:16:00 +02:00
Paul Bottein
a5d7043ce4 Update style of more info style (#20322)
* Set more info border radius to 36px

* Use control button for alarm more info
2024-04-02 15:05:21 +02:00
Bram Kragten
912d2cbd79 Add warning color for menu item (#20317)
* Add warning color for menu item

* align icons
2024-04-02 14:40:53 +02:00
Bram Kragten
48ee3a34eb Sort labels by name (#20316) 2024-04-02 13:37:46 +02:00
Paul Bottein
21263a1ffb Improve more info dialog navigation for specific view (#20312) 2024-04-02 12:45:39 +02:00
Paul Bottein
db59e138e9 Fix pickers (#20315)
* Fix not found area picker

* Fix no match for categories
2024-04-02 12:45:13 +02:00
Bram Kragten
bc8012dcc9 Add shortcut to label filter from label config page (#20313) 2024-04-02 11:50:50 +02:00
Bram Kragten
d8b43597a0 Use area and floor dialog when adding item in picker (#20311)
* Use area and floor dialog when adding item in picker

* use const
2024-04-02 11:49:05 +02:00
Bram Kragten
d3bf0da289 20240402.0 (#20314) 2024-04-02 11:44:05 +02:00
Bram Kragten
871949e760 Bumped version to 20240402.0 2024-04-02 11:41:16 +02:00
Bram Kragten
4fb42d3545 Fix and optimize automation overflow (#20293)
* WIP fix and optimize automation overflow

* finish

* Prettier

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-04-02 11:23:43 +02:00
Bram Kragten
2e58d6656c Add drag and drop to area dashboard (#20289)
* Add drag and drop to area dashboard

* Update ha-config-areas-dashboard.ts

* Fix unassign path

* Add delay for touch

* Update ha-config-areas-dashboard.ts

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-04-02 11:23:32 +02:00
Bram Kragten
a3024b38e9 fix floor icon color dark mode (#20310) 2024-04-02 10:44:13 +02:00
Bram Kragten
85f2016371 Add floor selector (#20295) 2024-04-02 10:43:50 +02:00
Bram Kragten
1ce3347c2e Add multi select to automations (#20291)
* Add multi select to automations

* allow to clear category, add icons

* use popover

* revert changes to group. by and sort menu, fix dark mode

* ha-menu

* responsive
2024-04-02 10:14:17 +02:00
renovate[bot]
4f8415e8a7 Update dependency @codemirror/view to v6.26.1 (#20300)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 09:13:46 +02:00
Simon Lamon
b202a36feb Clean menu implementation (#20294)
* Clean menu

* Clean up imports

* Fix imports
2024-03-31 12:28:28 +02:00
Bram Kragten
7e3e224746 Some data table fixes (#20286) 2024-03-30 21:11:35 +01:00
Bram Kragten
503a7979d0 Fix clearing of filters (#20288)
* Fix clearing of filters

* Update ha-filter-integrations.ts

* Update ha-filter-integrations.ts
2024-03-30 15:32:34 +01:00
Simon Lamon
f3ba6e7996 Fix uncaught keyFunction errors when data table filtering (#20285)
* Undefined keys

* Apply suggestion

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

* Prettier

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-30 13:44:59 +00:00
Bram Kragten
f13dcb4139 Fix flickering toast (#20287) 2024-03-30 14:40:13 +01:00
Yosi Levy
e8dc61ec36 RTL fixes to new data table (#20283)
RTL fixes to new features
2024-03-30 13:32:29 +01:00
Simon Lamon
88c59c5c13 Add label filter for helper page (#20281)
* Label filter for helper page

* Clean up debugging label
2024-03-30 13:30:24 +01:00
Paul Bottein
fd06d434f2 20240329.1 (#20280) 2024-03-29 21:25:10 +01:00
Paul Bottein
85f80ff863 Bumped version to 20240329.1 2024-03-29 21:23:46 +01:00
Paul Bottein
d56abe6b72 Fix stack card border radius reset on iOS (#20278) 2024-03-29 21:22:31 +01:00
Paul Bottein
d24d29e42f 20240329.0 (#20277) 2024-03-29 19:10:34 +01:00
Paul Bottein
bc14b8468d Bumped version to 20240329.0 2024-03-29 19:09:09 +01:00
Paul Bottein
f924f81ec1 Add labels on entities datatable (#20274) 2024-03-29 18:47:22 +01:00
Paul Bottein
3a6382df55 Add labels on devices datatable (#20275) 2024-03-29 18:46:34 +01:00
Paul Bottein
1dba049038 Fix floor creation in floor picker (#20276) 2024-03-29 18:05:06 +01:00
Simon Lamon
f539516252 Label filters for devices & entities (#20253)
More label filters
2024-03-29 16:41:18 +01:00
Paul Bottein
abd02eda0f Fix empty line in data table when using group_by (#20273) 2024-03-29 15:16:01 +00:00
Paul Bottein
99695d6cb3 Use md-menu for group by and sort by for data table (#20266) 2024-03-29 16:15:21 +01:00
Paul Bottein
cb1c2b59df Use primary color for filter badge color (#20263) 2024-03-29 16:12:18 +01:00
Paul Bottein
8368f977b9 Improve data table search bar style (#20271) 2024-03-29 16:10:41 +01:00
Paul Bottein
e05595f318 Fix add category and add label animation (#20272) 2024-03-29 16:09:10 +01:00
Paul Bottein
11cf2ec39d Fix selecting no category message (#20268) 2024-03-29 15:41:05 +01:00
renovate[bot]
e5c43fcfcd Update typescript-eslint monorepo to v7.4.0 (#20256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-29 12:44:45 +01:00
Paul Bottein
520581c165 Reapply filters if entity registry change (#20265) 2024-03-29 11:37:13 +01:00
Paul Bottein
d1119a3b61 Restore theme usage in stack card in panel view (#20264) 2024-03-29 11:16:28 +01:00
Paul Bottein
5dd029cc05 Add delete action in label overflow menu (#20261) 2024-03-29 10:25:54 +01:00
Paul Bottein
510e010f97 Fix search for labels and categories (#20262) 2024-03-29 10:25:02 +01:00
Paul Bottein
1300cffa3b Hide show all categories button is no categories (#20255) 2024-03-28 23:13:51 +01:00
Simon Lamon
8fbcbb0b68 Add label button to ha-filter-labels (#20251) 2024-03-28 18:51:36 +01:00
Paul Bottein
e02a47a16a 20240328.0 (#20250) 2024-03-28 16:49:01 +01:00
Paul Bottein
7b26c1ffcb Bumped version to 20240328.0 2024-03-28 16:45:12 +01:00
Bram Kragten
d3e62454a5 Add default icons for area and floors (#20214)
* Add default icons for area and floors

* Add default icon for floor based on level

* Allow deleting floor level

* Use texture box for area

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-28 16:35:56 +01:00
Paul Bottein
6b8f4e92a7 Display category dialog in category picker (#20234) 2024-03-28 13:51:53 +01:00
Paul Bottein
b590b21183 Fix unassign category action (#20235) 2024-03-28 13:51:37 +01:00
Paul Bottein
a08484f450 Fix default label color (#20232) 2024-03-28 12:30:53 +00:00
Paul Bottein
2978ca13c5 Fix label creation in label picker (#20233) 2024-03-28 13:09:51 +01:00
Bram Kragten
31c0850b14 Add default icons to categories (#20215)
* Add default icons to categories

* Update ha-filter-categories.ts

* smaller graphic margin in filters
2024-03-28 11:45:41 +01:00
Bram Kragten
1d85f0717a Add label and floor to target struct (#20213) 2024-03-28 09:15:58 +01:00
Bram Kragten
795c16a941 20240327.0 (#20210) 2024-03-27 17:52:08 +01:00
Bram Kragten
55c8589841 Merge branch 'master' into dev 2024-03-27 17:45:26 +01:00
Bram Kragten
4687add37a Bumped version to 20240327.0 2024-03-27 17:41:56 +01:00
Paul Bottein
c25e23ccd6 Fix translations for label and category (#20209)
* Fix translations for label and category

* Update en.json

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-27 17:41:38 +01:00
Bram Kragten
e42ddb8f0f Update ha-target-picker.ts 2024-03-27 17:36:12 +01:00
Bram Kragten
705c0e58fc Allow delete floor (#20208)
* Allow delete floor

* Update src/translations/en.json

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-27 17:35:29 +01:00
Paul Bottein
7427e17926 Remove border from chip and use ha-label for label (#20205) 2024-03-27 16:33:32 +00:00
Paul Bottein
2c4b31dcaa Use primary color for user message in assist dialog (#20207) 2024-03-27 16:31:39 +00:00
Bram Kragten
ae8671af96 Add filtering and grouping to device and entities config pages (#20204)
* Add filtering and grouping to device and entities config pages

* Update hass-tabs-subpage-data-table.ts

* Change label

* Update ha-config-voice-assistants-expose.ts

* fix expose multi select

* Update ha-config-voice-assistants-expose.ts
2024-03-27 17:26:56 +01:00
Bram Kragten
f5ff55abc5 Support no level on floors (#20206) 2024-03-27 16:15:06 +00:00
karwosts
b662512995 Fix missing column headers for various data tables (#20160)
* Fix missing column headers for automation/scene/script/blueprint

* more tables

* Update ha-automation-picker.ts

* Update ha-script-picker.ts

* Update ha-scene-dashboard.ts
2024-03-27 17:04:45 +01:00
renovate[bot]
64c3fb1723 Update formatjs monorepo (#20196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-27 16:31:04 +01:00
renovate[bot]
fb99dc4cd0 Update dependency transform-async-modules-webpack-plugin to v1.0.4 (#20186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-27 16:30:37 +01:00
Bram Kragten
e08a0c44ba Add filtering and grouping to scenes and scripts (#20203)
* Add filtering and grouping to scenes and scripts

* hide labels when there are none

* Update ha-data-table.ts
2024-03-27 16:24:49 +01:00
Bram Kragten
68935d46ce Add categories, filtering, grouping to automation panel (#20197)
* Add categories and filtering to automation panel

* Update search-input-outlined.ts

* Update ha-config-entities.ts

* fix resetting area filter

* fixes

* Update ha-category-picker.ts

* Update ha-filter-blueprints.ts

* fix updating badge

* fix overflow issue
2024-03-27 15:26:01 +01:00
karwosts
141c8c5192 Fix energy dates when using server TZ (#20191)
* Fix energy dates when using server TZ

* update
2024-03-27 15:24:25 +01:00
Quentame
7ca5467f4c climate: Add preset exemple (#19092)
* Add none, frost_protection & auto preset mode icons

* Revert preset icons addition
2024-03-27 12:53:14 +01:00
Tomasz
5de53964d9 Update en.json - fix expand_label_id, use areas instead of area (#20200)
Update en.json
2024-03-27 12:05:59 +01:00
Paul Bottein
8d8807e659 Fix profile page (#20199)
* Add icon to profile page

* Fix notification dot color
2024-03-27 11:17:31 +01:00
Paul Bottein
9347944cbd Update matter app translations (#20198) 2024-03-27 10:07:44 +01:00
Paul Bottein
480448acbb Add maximum number of columns option for section view (#20145)
* Add maximum number of columns option for section view

* Add comment
2024-03-27 08:53:53 +01:00
renovate[bot]
202fa82646 Update vaadinWebComponents monorepo to v24.3.10 (#20180)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-26 18:12:38 -04:00
renovate[bot]
feecc9f838 Update dependency @bundle-stats/plugin-webpack-filter to v4.12.2 (#20190)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-26 18:10:34 -04:00
dependabot[bot]
2f9e667517 Bump express from 4.18.3 to 4.19.2 (#20193)
Bumps [express](https://github.com/expressjs/express) from 4.18.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.3...4.19.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 18:09:37 -04:00
Paul Bottein
5547bc7356 Add question based matter commissioning flow (#20188)
* Create add device dialog

* Add translations and shared design

* Disable add buttons when no code

* Use right endpoint

* Add loading state

* Update logos

* Add native flow

* Add store links to download app

* Always display qr code and link

* Update translations

* Share assets and translations with app dialog
2024-03-26 20:53:05 +01:00
Bram Kragten
eb4ae926b7 Add support for labels (#20189)
* Add support for labels

* Update ha-label-picker.ts

* Remove aliases from label

* Use opacity for chips in labels picker

* Fix label filtering in target picker

* Update ha-labels-picker.ts

* Update dialog-area-registry-detail.ts

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-26 20:52:17 +01:00
On Freund
b239ec2b71 Add image domain to sensors (#20194) 2024-03-26 20:48:27 +01:00
Simon Lamon
e9cac94aee Show integration page if no integrations are configured (#20107)
* Show integration page if no integrations are configured

* Feedback
2024-03-26 14:48:36 -04:00
Bram Kragten
5289cd3af1 Add floor support (#20187)
* Add floor support

* Update src/components/ha-area-floor-picker.ts

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* Use different type for floor area picker

* type

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-26 18:00:09 +01:00
Paul Bottein
45a5c1c235 Add confirmation button in lock more info (#20093)
* Add confirmation button in more info lock

* Reset confirm open on service call

* Use text instead of toast for success
2024-03-25 15:56:55 +01:00
Paul Bottein
db3709952c Fix stack style in panel view (#20135) 2024-03-25 15:55:19 +01:00
Paul Bottein
447932eedb Update control slider color (#20124)
* Increase control slider thickness and border radius

* Increase control switch, select thickness and border radius

* Update assumed state toggle buttons
2024-03-25 15:54:37 +01:00
Paul Bottein
10cc3bdd3f Fix header on take control dialog (#20123) 2024-03-25 15:53:52 +01:00
Paul Bottein
6ee2bfed36 Add theme variables for grid section and sections view (#20099)
* Fix variable

* Add section view theme variables

* Add grid section theme variables
2024-03-25 15:53:21 +01:00
renovate[bot]
01efb831b7 Update dependency tar to v6.2.1 (#20178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 09:52:20 +01:00
dependabot[bot]
9e1e20bd94 Bump actions/cache from 4.0.1 to 4.0.2 (#20179) 2024-03-25 08:59:15 +01:00
potelux
869ace74ad Allow commas in state of history download (#20088)
Allow commas and quotes in state of history download
2024-03-24 21:30:08 -04:00
karwosts
94d56367fc Split profile page (#20103) 2024-03-24 21:18:55 -04:00
renovate[bot]
68a5ba668e Update dependency webpack to v5.91.0 (#20172)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-23 23:04:37 -04:00
renovate[bot]
b2b590cf67 Update babel monorepo to v7.24.3 (#20169) 2024-03-23 17:20:27 -04:00
renovate[bot]
6f7c071769 Update dependency typescript to v5.4.3 (#20174) 2024-03-23 17:19:26 -04:00
renovate[bot]
c1a7164ce7 Update dependency webpack-dev-server to v5.0.4 (#20165) 2024-03-23 17:17:55 -04:00
renovate[bot]
b77839c139 Update dependency @lokalise/node-api to v12.3.0 (#20162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 18:11:42 +01:00
renovate[bot]
e2f2a9322c Update dependency transform-async-modules-webpack-plugin to v1.0.3 (#20153)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 14:33:02 +01:00
renovate[bot]
e4bd6c885d Update babel monorepo to v7.24.1 (#20158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 14:07:15 +01:00
renovate[bot]
8201701d17 Update dependency core-js to v3.36.1 (#20156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 08:40:26 -04:00
renovate[bot]
a5e6b78e1d Update dependency @braintree/sanitize-url to v7.0.1 (#20154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 08:38:15 -04:00
renovate[bot]
027eccba06 Update typescript-eslint monorepo to v7.3.1 (#20155) 2024-03-22 01:05:38 +00:00
dependabot[bot]
12f10513f0 Bump webpack-dev-middleware from 7.0.0 to 7.1.1 (#20152) 2024-03-21 20:53:25 -04:00
renovate[bot]
9907ed51f0 Update typescript-eslint monorepo to v7.3.0 (#20151) 2024-03-21 20:51:07 -04:00
Paul Bottein
90e9f79841 Add iframe strategy (#20068)
* Add iframe strategy with editor

* Unify sandbox parameters

* Update translations

* Remove title from editor

* Add editor when creating iframe strategy

* Update src/translations/en.json
2024-03-21 13:44:49 +01:00
Bram Kragten
c30b9cdfcf Change gender to voice for cloud tts settings (#20057)
* change gender to voice for cloud tts settings

* Use voice in cloud tts try dialog

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-20 09:56:32 +00:00
Paul Bottein
7e1fa0cf38 Fix drag and drop when switching views (#20143) 2024-03-20 10:43:30 +01:00
Paul Bottein
b6587488d4 Center title in zha pairing page (#20142) 2024-03-20 10:34:02 +01:00
Quentame
552eeeddf6 conditional & entity-filter: add ability to filter through entity_id & add entity-filter conditional's conditions (#19182)
* entity-filter: add ability to filter through entity_id value

* review: test filter value against undefined

Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>

* review: better handle state values that could be mixed with an entity_id

* Add multiple filter/condition types

* Fix automation's NumericStateCondition above/below types

* Replace operator condition by state for string or number

* Move to condition: type & attr

* Remove enable attr

* fix condition state array

* Remove necessary undefined check

* Move to condition: use same codebase as conditionnal card

* Fix entities error 'read properties of undefined' + conditions first

* Fix lint

* Merge condition to set the entity to filter on

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* review: make numeric_state below & above working together again, with entity_id support

* shorthand getValueFromEntityId

* review: states are string

* Split legacy state filter and condition logic

* Fix types

* Fix type

* Update gallery doc

* Fix operator in while numaric array

* Rename condition card header in gallery

* Don't use real gas station name

* Update gallery

* Update card is entity in condition change

* Don't check for entity id in state condition

* Improve check

* Update condition card demo

* Revert "Don't check for entity id in state condition"

This reverts commit f5e6a65a37.

* Use set instead of list

* Update demo

---------

Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-03-19 14:29:34 +01:00
Paul Bottein
cbc150bad2 Fix hidden entity filter card in section (#20117) 2024-03-19 10:24:12 +01:00
Bram Kragten
8a4ed121b5 Add option to remove cloud data (#20055) 2024-03-19 10:23:32 +01:00
Paul Bottein
a9793dc0a5 Remove border radius in panel view (#20122) 2024-03-19 10:21:30 +01:00
renovate[bot]
c9deef84ca Lock file maintenance (#20132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 10:19:38 +01:00
renovate[bot]
1582aaeb4c Update vaadinWebComponents monorepo to v24.3.9 (#20120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 15:01:27 +01:00
karwosts
707520c15c Themed graph color support for energy devices graphs (#19998)
Themed graph color support for energy devices
2024-03-18 14:42:24 +01:00
Alex Yao
d5de435f06 Fix html5 notification toggle (#20028)
* Fix html5 notification toggle

* Update src/components/ha-push-notifications-toggle.ts

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

* fix lint

---------

Co-authored-by: alexyao2015 <alexyao2015@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-18 11:03:33 +00:00
dependabot[bot]
9e3dfaa400 Bump softprops/action-gh-release from 2.0.2 to 2.0.4 (#20115) 2024-03-18 08:29:45 +01:00
dependabot[bot]
7aa92ec249 Bump actions/checkout from 4.1.1 to 4.1.2 (#20114) 2024-03-18 07:29:10 +01:00
renovate[bot]
2fdcd40f00 Update CodeMirror (#20105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-17 18:18:10 -04:00
renovate[bot]
3b15b786ff Update dependency webpack-dev-server to v5.0.3 (#20095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-17 18:15:49 -04:00
renovate[bot]
b212b30e58 Update dependency @babel/helper-define-polyfill-provider to v0.6.1 (#20098) 2024-03-17 17:48:12 -04:00
renovate[bot]
6fd89f8585 Update dependency @bundle-stats/plugin-webpack-filter to v4.12.1 (#20104) 2024-03-17 17:46:14 -04:00
renovate[bot]
0406d21703 Update dependency @lokalise/node-api to v12.2.1 (#20102) 2024-03-17 17:45:11 -04:00
renovate[bot]
293f89a07b Update dependency @codemirror/autocomplete to v6.14.0 (#20078) 2024-03-15 10:56:46 -04:00
dependabot[bot]
520a0b4075 Bump follow-redirects from 1.15.3 to 1.15.6 (#20086) 2024-03-15 10:54:57 -04:00
renovate[bot]
488602e232 Update dependency superstruct to v1.0.4 (#20082) 2024-03-15 08:21:34 -04:00
renovate[bot]
1e8d353162 Update typescript-eslint monorepo to v7.2.0 (#20085) 2024-03-15 08:19:02 -04:00
Simon Lamon
b3718b8b4a Fix broken state_color in Entities card (#20077)
Restore button functionality
2024-03-15 11:22:25 +01:00
Simon Lamon
097cba5c60 Use the entityId in the legacy shopping cart (#20083) 2024-03-15 11:20:42 +01:00
Simon Lamon
fa6d8d0891 Bump Python version to 3.12 (#20084) 2024-03-14 20:06:03 +01:00
Paul Bottein
31797c55df Add map strategy (#20067) 2024-03-14 14:22:24 +01:00
karwosts
56a23c5c3d Small reorganization of profile settings (#20076)
* Small reorganization of profile settings

* use isExternal
2024-03-14 01:17:07 -04:00
Klara
adc89f1487 Fix spelling mistake of Changelog in About (#20044)
Fix spelling mistake
2024-03-13 15:24:11 +00:00
Jan-Philipp Benecke
7facc375bc Avoid starting config flow and show alert dialog early if single config entry only (#19648)
* Add note that integration only supports one entry on the integration page

* Set on error

* Move single instance info to the manifest and add it to the add integration dialog as well

* Get config entries only when single_instance_only set and add check to redirect

* Make single_instance_only optional

* Add missing import

* Use new manifest option name

* Fix translation key

* Rename dialog and re-add button

* Fix linting error

* Use alert dialog instead of new one

* Remove ha-alert on integration page

* Remove css change

* Apply language tweak

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

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-13 16:20:28 +01:00
renovate[bot]
91d3fb0ea8 Update dependency date-fns-tz to v2.0.1 (#20075)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-13 10:05:27 -04:00
Yosi Levy
4ab0047dc1 RTL fixes for state info (#20056) 2024-03-13 09:17:27 +01:00
Samuel Schultze
279eeaa442 Add swing modes card feature (#19999)
feat: add swing modes card feature
2024-03-12 14:14:06 +01:00
Matt
d4d0fb2a03 Add azimuth to sun.sun dialog's more-info section (#20036) 2024-03-12 12:33:21 +01:00
Yosi Levy
d56fe8a542 Update simple-tooltip to 8.0.2 with RTL fix (remove patch) (#20039)
* Update simple-tooltip to 8.0.2 with RTL fix (remove patch)

* Remove patch
2024-03-12 00:37:39 -04:00
renovate[bot]
292701925d Update vaadinWebComponents monorepo to v24.3.8 (#20054) 2024-03-11 23:20:22 -04:00
renovate[bot]
52fc854cc3 Update dependency @babel/helper-define-polyfill-provider to v0.6.0 (#20061) 2024-03-11 23:04:42 -04:00
renovate[bot]
90ca039768 Update dependency open to v10.1.0 (#20059) 2024-03-11 23:03:28 -04:00
dependabot[bot]
9e81055070 Bump softprops/action-gh-release from 0.1.15 to 2.0.2 (#20048)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:57:49 +01:00
renovate[bot]
cea402ebf8 Update dependency marked to v12.0.1 (#20031) 2024-03-09 21:40:00 -05:00
renovate[bot]
6b939b95c0 Update dependency @codemirror/view to v6.25.1 (#20032) 2024-03-09 21:29:22 -05:00
renovate[bot]
b24621d1ea Update dependency typescript to v5.4.2 (#20035) 2024-03-09 21:25:49 -05:00
renovate[bot]
cc0fde2c08 Update CodeMirror (#19953)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-08 11:39:21 -05:00
renovate[bot]
3732998fb7 Update Yarn to v4.1.1 (#20020) 2024-03-08 07:48:46 -05:00
renovate[bot]
c699e265ef Update typescript-eslint monorepo to v7.1.1 (#20019) 2024-03-08 07:46:22 -05:00
renovate[bot]
98bb726f1a Update dependency magic-string to v0.30.8 (#20003) 2024-03-08 07:45:09 -05:00
renovate[bot]
c132e7ed85 Update dependency xss to v1.0.15 (#20000) 2024-03-08 07:43:35 -05:00
Bram Kragten
298cebe17f Bumped version to 20240307.0 2024-03-07 16:10:42 +01:00
Paul Bottein
d03825d200 Block moving card to a section view or a strategy view (#20016) 2024-03-07 16:10:26 +01:00
Paul Bottein
d9ab9db211 Fix width of create section button (#20015) 2024-03-07 16:10:25 +01:00
Simon Lamon
58a607561a Fix visibility save in dashboard edit (#20013)
Visibility fix
2024-03-07 16:10:25 +01:00
Simon Lamon
0ae1f11ffc Fix removal of badges after yaml dashboard change (#20012)
* Fix badges removed after yaml change

* Remove test code
2024-03-07 16:10:24 +01:00
Yosi Levy
db48c5a6a3 Sections RTL fixes (#20007) 2024-03-07 16:10:23 +01:00
Paul Bottein
effefdbff1 Add layout options to cards and improve grid and sections defaults (#20001)
* Add grid options to cards

* Fix the height of the card it's rows option is provided

* Add variable

* Adjust grid margin

* Use layout options

* Fix max width when only one column

* Update card API
2024-03-07 16:10:22 +01:00
Paul Bottein
233c969402 Block moving card to a section view or a strategy view (#20016) 2024-03-07 14:56:57 +00:00
Paul Bottein
3b885dd01f Fix width of create section button (#20015) 2024-03-07 15:47:10 +01:00
Simon Lamon
52c8554d89 Fix removal of badges after yaml dashboard change (#20012)
* Fix badges removed after yaml change

* Remove test code
2024-03-07 15:12:56 +01:00
Simon Lamon
b55baef985 Fix visibility save in dashboard edit (#20013)
Visibility fix
2024-03-07 15:12:02 +01:00
Paul Bottein
b593b15f27 Add layout options to cards and improve grid and sections defaults (#20001)
* Add grid options to cards

* Fix the height of the card it's rows option is provided

* Add variable

* Adjust grid margin

* Use layout options

* Fix max width when only one column

* Update card API
2024-03-07 10:22:26 +00:00
Yosi Levy
00669ac0c3 Sections RTL fixes (#20007) 2024-03-07 11:18:56 +01:00
Paul Bottein
33a4258c06 Set grid gap to 32px (#19990)
Set grip grap to 32px
2024-03-06 11:43:03 +01:00
Bram Kragten
d4a8fcbe03 Bumped version to 20240306.0 2024-03-06 11:38:57 +01:00
Paul Bottein
36c3b938ce Add section max width variable to section view (#19995) 2024-03-06 11:38:05 +01:00
Bram Kragten
bf2fad2a2a Patch HLS light module (#19993)
Patch hls light module
2024-03-06 11:37:20 +01:00
Paul Bottein
9cbd49b867 Add description to sections demo (#19991)
* Add description to sections demo

* Update wording
2024-03-06 11:36:03 +01:00
Paulus Schoutsen
9de59131f4 Run script in script editor open more info if fields (#19982)
* Run script in script editor open more info if fields

* Extract function
2024-03-06 11:36:02 +01:00
Paul Bottein
7f44e89829 Use shorter name for dashboard (#19980) 2024-03-06 11:36:01 +01:00
Paul Bottein
572e4457b3 Fix margin on browse media button (#19979) 2024-03-06 11:36:00 +01:00
Paul Bottein
a5bcf87c08 Add description to sections demo (#19991)
* Add description to sections demo

* Update wording
2024-03-05 23:45:16 -05:00
Paul Bottein
8ca5b7528b Add section max width variable to section view (#19995) 2024-03-05 23:55:10 +01:00
Bram Kragten
d951e68c10 Patch HLS light module (#19993)
Patch hls light module
2024-03-05 22:25:35 +01:00
Paul Bottein
32e8d2043c Set grid gap to 32px (#19990)
Set grip grap to 32px
2024-03-05 17:30:35 +01:00
Michael
bf028915ec Add clickForMoreInfo to statistics graph card (#19178)
* add clickForMoreInfo

* only show more info on graphs when mouse is used

* disable clickForMoreInfo already in more-info popup

* check if not isExternalStatistic

* Apply suggestions from code review

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-05 15:13:51 +01:00
renovate[bot]
b03f483e4f Update dependency eslint-config-airbnb-typescript to v18 (#19986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 08:16:19 -05:00
Paul Bottein
6f6202eb69 Fix margin on browse media button (#19979) 2024-03-04 23:18:09 -05:00
Paulus Schoutsen
7ab2d1496e Run script in script editor open more info if fields (#19982)
* Run script in script editor open more info if fields

* Extract function
2024-03-04 22:23:14 +01:00
dependabot[bot]
acc229a7e1 Bump actions/cache from 4.0.0 to 4.0.1 (#19966)
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 15:01:08 -05:00
renovate[bot]
64ffa86fe3 Update dependency @octokit/plugin-retry to v7.0.3 (#19962)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-04 14:59:37 -05:00
G Johansson
8b77024fb9 Add reconfigure config entry (#19794) 2024-03-04 20:23:01 +01:00
Paul Bottein
42aa18ac16 Use shorter name for dashboard (#19980) 2024-03-04 13:07:37 -05:00
Paul Bottein
54d21666d0 Bumped version to 20240304.0 2024-03-04 17:21:05 +01:00
Paul Bottein
aac00a5e78 Change wording from add section to create section (#19978)
* Rename add section to create section

* update function name
2024-03-04 17:19:59 +01:00
Paul Bottein
63d93f2a36 Don't suggest to pick another card for sections (#19977) 2024-03-04 17:19:58 +01:00
Paul Bottein
a9f453ea36 Add sections dashboard to demo dashboard (#19976) 2024-03-04 17:19:57 +01:00
Paul Bottein
d248de92e5 Clean generated config for tile in sections (#19974)
* Do not include show_entity_picture false in tile card config

* Update src/panels/lovelace/common/generate-lovelace-config.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-04 17:19:56 +01:00
Paul Bottein
0ed483ba51 Do not reserve space for condition card in grid section (#19973)
* Do not reserve space for condition card in grid section

* Update src/panels/lovelace/sections/hui-grid-section.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-04 17:19:54 +01:00
Paul Bottein
68fbadf21b Fix masonry badges not centered (#19972) 2024-03-04 17:19:53 +01:00
Paul Bottein
ac66079d41 Fix badges not saved in view editor (#19971) 2024-03-04 17:19:52 +01:00
Paul Bottein
56c681bcf8 Make migration warning alert sticky at the top for views (#19970) 2024-03-04 17:19:51 +01:00
Paul Bottein
c5c4253760 Expose dialog to custom card helpers (#19969) 2024-03-04 17:19:50 +01:00
karwosts
84e6f2fc4f Fix a bug in energy batteryToGrid calculation (#19958) 2024-03-04 17:19:48 +01:00
karwosts
8cedaae645 Support max_devices for energy-devices-detail-graph (#19936)
* Support max_devices for energy-devices-detail-graph

* responsive ui editor
2024-03-04 17:19:47 +01:00
Jeremy Noesen
e350ba4726 Update cast launch screen colors (#19754) 2024-03-04 17:19:46 +01:00
Paul Bottein
1b7742ef7f Change wording from add section to create section (#19978)
* Rename add section to create section

* update function name
2024-03-04 16:33:31 +01:00
Paul Bottein
0c6bf701c7 Clean generated config for tile in sections (#19974)
* Do not include show_entity_picture false in tile card config

* Update src/panels/lovelace/common/generate-lovelace-config.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-04 14:50:40 +00:00
Jeremy Noesen
05e2e305e4 Update cast launch screen colors (#19754) 2024-03-04 15:45:54 +01:00
karwosts
5523cd6203 Fix a bug in energy batteryToGrid calculation (#19958) 2024-03-04 15:44:17 +01:00
Paul Bottein
50da4bcd37 Do not reserve space for condition card in grid section (#19973)
* Do not reserve space for condition card in grid section

* Update src/panels/lovelace/sections/hui-grid-section.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-03-04 14:31:49 +00:00
Paul Bottein
b99072d986 Use icon in area card if there is no image (#19933) 2024-03-04 15:31:07 +01:00
Paul Bottein
b9a7a7c422 Don't suggest to pick another card for sections (#19977) 2024-03-04 15:30:31 +01:00
Paul Bottein
88ccbcd883 Fix badges not saved in view editor (#19971) 2024-03-04 14:28:58 +00:00
Paul Bottein
b5bb6c6fe5 Expose dialog to custom card helpers (#19969) 2024-03-04 15:22:22 +01:00
Paul Bottein
19a3810168 Add sections dashboard to demo dashboard (#19976) 2024-03-04 15:22:04 +01:00
Paul Bottein
8ccc38eb00 Fix masonry badges not centered (#19972) 2024-03-04 15:04:45 +01:00
Paul Bottein
70146a08c1 Make migration warning alert sticky at the top for views (#19970) 2024-03-04 15:04:20 +01:00
karwosts
19d50b9c92 Support max_devices for energy-devices-detail-graph (#19936)
* Support max_devices for energy-devices-detail-graph

* responsive ui editor
2024-03-04 15:02:32 +01:00
renovate[bot]
05c1328ca7 Update dependency gulp-merge-json to v2.2.1 (#19942)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-03 17:03:18 -05:00
renovate[bot]
99c2dd9765 Update dependency @bundle-stats/plugin-webpack-filter to v4.12.0 (#19957) 2024-03-03 12:43:34 -05:00
renovate[bot]
edbe6851f7 Update dependency @types/chromecast-caf-sender to v1.0.9 (#19960) 2024-03-03 12:42:30 -05:00
renovate[bot]
a7867a9253 Update babel monorepo to v7.24.0 (#19945) 2024-03-02 21:38:07 -05:00
renovate[bot]
94e70f81ed Update dependency chart.js to v4.4.2 (#19947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-02 15:00:33 -05:00
renovate[bot]
3d8654253a Update octokit monorepo (#19941) 2024-03-01 21:31:44 -05:00
Paul Bottein
69dbcec678 Bumped version to 20240301.0 2024-03-01 16:15:03 +01:00
Paul Bottein
de8b0ba8c5 Transform helper to warning for edit view type (#19934) 2024-03-01 16:12:49 +01:00
Paul Bottein
730cd9f983 Use max column count instead of max width for section grid (#19932) 2024-03-01 16:12:48 +01:00
Paul Bottein
67d8765624 Add badges support to sections view (#19929) 2024-03-01 16:12:47 +01:00
Paul Bottein
39bd07de73 Revert "Bumped version to 20240301.0"
This reverts commit 3202ea55d2.
2024-03-01 15:59:01 +01:00
Paul Bottein
3202ea55d2 Bumped version to 20240301.0 2024-03-01 15:41:56 +01:00
Paul Bottein
329a8c0c90 Transform helper to warning for edit view type (#19934) 2024-03-01 09:31:25 -05:00
Paul Bottein
c05824c641 Revert "Transform helper to warning for edit view type"
This reverts commit 3abdffda9c.
2024-03-01 14:57:08 +01:00
Paul Bottein
3abdffda9c Transform helper to warning for edit view type 2024-03-01 14:55:34 +01:00
Paul Bottein
67da851efc Use max column count instead of max width for section grid (#19932) 2024-03-01 13:09:21 +01:00
Paul Bottein
5463a27255 Add badges support to sections view (#19929) 2024-03-01 13:09:10 +01:00
renovate[bot]
ec0434c9b0 Update dependency hls.js to v1.5.7 (#19927)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 11:58:00 +01:00
renovate[bot]
7d8cb5c863 Update typescript-eslint monorepo to v7.1.0 (#19922) 2024-02-29 18:32:16 -05:00
Bram Kragten
4f01348ffb Improve error display in automation/script traces (#19920) 2024-02-29 13:09:02 -05:00
Bram Kragten
ca7e257e95 Bumped version to 20240228.1 2024-02-29 16:44:43 +01:00
Paul Bottein
a34332b48d Fix section editing after disconnect/reconnect (#19917)
* Fix section editing after disconnect/reconnect

* Update src/components/ha-sortable.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-29 16:44:11 +01:00
Paul Bottein
962912c43c Add allow changing type of empty views (#19912) 2024-02-29 16:44:10 +01:00
Paul Bottein
2af3400464 Fix section editing after disconnect/reconnect (#19917)
* Fix section editing after disconnect/reconnect

* Update src/components/ha-sortable.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-29 14:12:19 +00:00
renovate[bot]
b6e220a4c5 Update vaadinWebComponents monorepo to v24.3.7 (#19919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 13:54:55 +01:00
renovate[bot]
d5d45f100e Update dependency open to v10.0.4 (#19918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 13:54:22 +01:00
renovate[bot]
6b9ca60c47 Update octokit monorepo to v7 (major) (#19914)
Update octokit monorepo to v7

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 13:54:02 +01:00
Simon Lamon
bc445a1e27 Lokalize automation trace area (#19836)
* Translate automation trace timeline area

* Fix undefined changed_variables

* change naming options in triggered_by

* Split messages for stopped_by

* remove stopped message
2024-02-29 13:51:18 +01:00
dependabot[bot]
a087b4c43e Bump ip from 1.1.8 to 1.1.9 (#19915) 2024-02-29 01:20:20 -05:00
Paul Bottein
8f67ddf968 Add allow changing type of empty views (#19912) 2024-02-28 21:51:21 +01:00
Simon Lamon
9ef07484dd Replace paper-toast with mwc-snackbar (#19579)
* toast

* Fixes

* Linting

* Remove empty styles

* PR feedback

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 21:50:58 +01:00
Bram Kragten
7475cb56a1 20240228.0 (#19908) 2024-02-28 17:07:48 +01:00
Paulus Schoutsen
5287061699 Update script more info (#19899)
* Update script more info

* Fixes

* Update styling

* remarks

* Always show cancel button

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 17:07:26 +01:00
Bram Kragten
3ef1110109 Bumped version to 20240228.0 2024-02-28 16:51:50 +01:00
Bram Kragten
2efe2589d2 Merge branch 'rc' into dev 2024-02-28 16:50:23 +01:00
Bram Kragten
4fb596357d Add advanced options block to cloud remote connection (#19907)
* Add advanced options block to cloud remote connection

* Review
2024-02-28 16:28:51 +01:00
karwosts
dd98ec771d Infer a limited history chart from state object (#19176)
* Infer a limited history chart from state object

* bugfix

* bugfix

* minor fixes from feedback
2024-02-28 15:20:56 +00:00
Paul Bottein
94f74308d8 Escape special characters of automation ID in URL (#19790)
* Escape special character of automation ID in URL

* Use encodeURIComponent
2024-02-28 13:29:00 +00:00
renovate[bot]
b982884933 Pin dependencies (#19905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 08:26:26 -05:00
renovate[bot]
c47c6e358b Update dependency color-name to v2 (#19906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 13:05:53 +00:00
Charles Baynham
46394d0bf9 Always show "create new zone from current location" option (#19649) 2024-02-28 13:56:30 +01:00
karwosts
4dc154201a Support color names in energy themes (#19597)
* Support color names in energy themes

* fix yarn
2024-02-28 13:55:11 +01:00
Simon Lamon
ebdbab81d3 Mobile view calendar improvements (#19218)
* Mobile view calendar improvements

* Remove very narrow

* Revert default choice
2024-02-28 13:51:59 +01:00
Paul Bottein
155098bc41 Center section in section view (#19904) 2024-02-28 13:30:10 +01:00
karwosts
291638a9dd Deduplicate blueprint editor code (#19791)
* Deduplicate blueprint editor code

* prune unneeded imports
2024-02-28 13:08:31 +01:00
karwosts
763c672e36 Automated outlier detection for adjust sum dialog (#18723) 2024-02-28 12:54:44 +01:00
Paul Bottein
c945534640 Disable the ability to change the view type to sections and the other way around (#19902)
* Disable the ability to change the view type to sections and the other way around

* Update src/translations/en.json

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

* Update src/translations/en.json

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

* Update src/translations/en.json

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 12:35:32 +01:00
Marcel van der Veldt
5b3074d939 Replace button to manually add a Thread border router with more info button (#19903)
Replace button to manually add a border router with more info button
2024-02-28 11:33:21 +00:00
Marko Dimjašević
3b89b72568 Automation editor: clarify multiple triggers logic (#19647)
* Automation editor: clarify multiple triggers logic

* Implement PR feedback

* Update src/translations/en.json

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 11:29:18 +00:00
Cody C
1d9fa1522c Fix MFA module name not showing on step completion (#19581)
* Fix MFA module name not showing on step completion

Fixes #18918

* Update src/panels/profile/dialog-ha-mfa-module-setup-flow.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 11:07:38 +00:00
renovate[bot]
4db743db00 Update dependency webpack-dev-server to v5 (#19807)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 12:07:27 +01:00
Cody C
d5f8231f97 Update dashboard resources title to reflect translations (#19641)
* Update dashboard resources title to reflect translations

* Update dashboard resources title to reflect translations
2024-02-28 11:57:12 +01:00
Simon Lamon
32c403d069 Replace more paper-items (#19707)
Remove leftover paper items
2024-02-28 11:52:45 +01:00
renovate[bot]
220da51606 Update dependency @material/web to v1.3.0 (#19877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 11:47:54 +01:00
Paulus Schoutsen
9ae234a02f Mark paste button list item as interactive (#19898)
* Mark paste button list item as interactive

* Update add-automation-element-dialog.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2024-02-28 10:46:27 +00:00
Jim
401bbed67b Improve service filtering (#19811)
* Improve service filtering

Split filter term by space and match if each word is individually present

* Prettier formatting

* Fix un-necessary toLowerCase() call

Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>

* Combine filter check conditions into the same loop

* Prettier formatting

---------

Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>
2024-02-28 11:42:19 +01:00
Marcel van der Veldt
83190c21db Clear Matter ping result when closing the dialog (#19901) 2024-02-28 10:42:07 +00:00
karwosts
ccdd906e2f Restore alphabetical sorting to Areas (#19897) 2024-02-28 11:37:02 +01:00
Paul Bottein
f4c932ef9c Automatically add section to empty section view and improve delete wording (#19892)
* Automatically add section to empty section view and improve delete wording

* Update delete dialog

* Update delete dialog
2024-02-28 11:35:19 +01:00
Yosi Levy
0892ed18e5 RTL fixes (#19834)
* RTL fixes

* Additional update

* Fixed comments
2024-02-28 11:26:18 +01:00
Joakim Sørensen
3afc218adc Combine component/components PageNavigation keys (#19890)
* Combine component/components PageNavigation keys

* Update src/panels/config/ha-panel-config.ts
2024-02-28 11:25:41 +01:00
Erik Montnemery
841b9c0917 Add support for translation domain in data entry flows (#19900) 2024-02-28 11:12:19 +01:00
karwosts
a479c6e786 Download energy panel data to CSV (#19863)
* Download energy panel data to CSV

* table format changes

* unique types for cost/compensation
2024-02-27 23:02:39 -05:00
Paulus Schoutsen
babb723521 Fix script data (#19894) 2024-02-27 22:05:27 +01:00
Joakim Sørensen
29954e530e Hide the core backup integration if hassio is loaded (#19833)
* Hide the core backup integration if hassio is loaded

* Combine to single entry
2024-02-27 14:36:16 +00:00
karwosts
fb3c94f403 Improve map/zone navigation (#19740)
* Improve map/zone navigation

* dont remove tabs
2024-02-27 15:24:42 +01:00
karwosts
dd8c1d359c localize input_select form (#19829) 2024-02-27 15:22:34 +01:00
Steve Repsher
45e09a262b Fix issues with state_color as false (#19776)
* Fix issues with state_color as false

* Remove format from glance timestamp

* Restore type assertion hack and remove conditional

* Revert "removal of glance timestamp format and adjust types to make it work

* Revert to minimal change just to pass false state_color
2024-02-27 15:20:13 +01:00
Paulus Schoutsen
d6d61a4137 Show script fields in Script more info dialog (#19879)
* Show script fields in more info dialog

* Apply suggestions from code review

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

* Guard for state obj changes

* Update src/components/ha-service-control.ts

Co-authored-by: Marc Geurts <geurtsmarc@hotmail.com>

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Marc Geurts <geurtsmarc@hotmail.com>
2024-02-27 15:05:28 +01:00
dependabot[bot]
8fe7711634 Bump es5-ext from 0.10.62 to 0.10.63 (#19883)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.63.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 08:05:46 -05:00
James Woglom
a5ec7fc251 Resolve iframe CORS errors - Fix #19724 (#19884)
* Resolve iframe CORS errors - Fix #19724

* add newline
2024-02-27 12:17:29 +00:00
Paul Bottein
b9935717dc Focus cancel button on destructive confirmation dialog (#19889) 2024-02-27 12:51:35 +01:00
Paul Bottein
bb25817bae Reduce drag and drop delay on touch (#19888) 2024-02-27 12:50:59 +01:00
Paul Bottein
bf8a33e086 Fix button card and sensor card in grid section (#19887) 2024-02-27 12:50:37 +01:00
renovate[bot]
bf56f50e0a Update dependency gulp-json-transform to v0.5.0 (#19885)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-27 11:26:11 +01:00
renovate[bot]
3a8e2c429f Update dependency eslint to v8.57.0 (#19882) 2024-02-26 18:38:40 -05:00
chammp
e8fca5d93c Directly prompt for lock code in dashboards (#19835)
Prompt for lock codes in more places
2024-02-26 15:21:02 +01:00
Yosi Levy
a39cf99024 RTL updates (#19848)
* RTL updates

* Additional fixes

* TODO fix
2024-02-26 15:14:32 +01:00
renovate[bot]
0ff27154e6 Update fullcalendar monorepo to v6.1.11 (#19865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-23 14:32:13 -05:00
renovate[bot]
766fd4cbf5 Update dependency webpack to v5.90.3 (#19858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 15:19:44 -05:00
renovate[bot]
1869260868 Update CodeMirror (#19857)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 15:17:02 -05:00
renovate[bot]
93046d78f6 Update dependency webpackbar to v6.0.1 (#19859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 15:15:30 -05:00
renovate[bot]
3e51f9a505 Update typescript-eslint monorepo to v7.0.2 (#19862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 15:14:06 -05:00
Paul Bottein
d95bf64edf Add experimental sections view (#19846) 2024-02-22 20:51:48 +01:00
karwosts
47f7cf5419 Add devices to energy collection (#19849)
* Include individual devices in energy collection

* async cleanup, fix includeTypes filter
2024-02-22 16:23:06 +01:00
Paul Bottein
267fc3743d Fix device class icon not showing in entities config page (#19854) 2024-02-22 10:42:37 +01:00
karwosts
a6d73f7615 Allow unhiding entity hidden by integration (#19753) 2024-02-22 10:42:15 +01:00
dependabot[bot]
b360c854a8 Bump ip from 1.1.8 to 1.1.9 (#19855) 2024-02-21 20:28:37 -05:00
renovate[bot]
a088b20987 Update dependency hls.js to v1.5.6 (#19843)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 17:43:38 -05:00
renovate[bot]
af6dd545dc Update dependency @bundle-stats/plugin-webpack-filter to v4.10.1 (#19844)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 21:59:27 +00:00
karwosts
a26df88022 More accurate cardSize for Tile card (#19853)
More accurate cardSize for tile card
2024-02-21 22:08:30 +01:00
renovate[bot]
86ec272581 Update dependency @types/sortablejs to v1.15.8 (#19839)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 14:39:33 +01:00
karwosts
2a803e09a4 Detail view for energy devices graph (#19068)
* Detail view for energy devices graph

* Use getCommonOptions

* Remove visibility toggle on horizontal bar chart

* make a new card

* unneeded translations

* graph titles

* Update src/translations/en.json

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-02-20 14:14:04 +01:00
Bram Kragten
35ebfc15c9 Merge branch 'rc' 2024-02-08 18:32:06 +01:00
Bram Kragten
f0a9185e4a handle undefined and null in cast 2024-02-08 18:31:23 +01:00
Bram Kragten
b3766cbc62 Merge branch 'rc' 2024-02-08 18:09:07 +01:00
Bram Kragten
3469013f1a Bumped version to 20240207.1 2024-02-08 18:07:15 +01:00
Bram Kragten
03486e4125 cast allow empty view, pick first (#19739) 2024-02-08 18:06:57 +01:00
Bram Kragten
20560fb847 Fix cast launch screen (#19738) 2024-02-08 18:06:37 +01:00
Bram Kragten
bad18da658 Fix icons in gallery, demo and cast (#19732)
* Fix icons in gallery and demo

* Add to lovelace gallery

* Update icons.ts

* add BACKWARDS_COMPAT support for icons

* Update entity-state.ts

* Update icons.ts

* Update icons.ts
2024-02-08 18:06:27 +01:00
Paul Bottein
e26c7c491a Fix demo dashboard (#19734) 2024-02-08 18:06:11 +01:00
Paul Bottein
b0c8ae0c94 Fix suggest card dialog (#19735) 2024-02-08 18:05:55 +01:00
Bram Kragten
cc1658cbab Add service icons to traces (again :D) (#19728)
* Add service icons to traces (again :D)

* Update hat-graph-node.ts
2024-02-08 18:05:41 +01:00
Paul Bottein
4b768f0635 Use rgb theme variables for qrcode (#19726) 2024-02-08 18:05:27 +01:00
Paul Bottein
989057d947 Show icon of disabled entities (#19717) 2024-02-08 18:05:16 +01:00
Bram Kragten
6671d24fa6 Improve matter ping dialog (#19715) 2024-02-08 18:05:05 +01:00
Bram Kragten
297c721229 Matter cleanup on close dialog (#19714) 2024-02-08 18:04:51 +01:00
Bram Kragten
70c502bb45 Merge branch 'rc' 2024-02-07 11:22:12 +01:00
Bram Kragten
add0b55657 Merge branch 'dev' into rc 2024-02-07 11:21:56 +01:00
Bram Kragten
50e559487d Merge branch 'rc' 2024-02-05 14:45:51 +01:00
Bram Kragten
4cd02c81bb Merge branch 'dev' into rc 2024-02-05 14:45:33 +01:00
Bram Kragten
d044f4d34e 20240202.0Merge branch 'rc' 2024-02-02 16:29:21 +01:00
Bram Kragten
696717dd90 20240202.0Merge branch 'dev' into rc 2024-02-02 16:28:34 +01:00
Bram Kragten
22c3132638 20240131.0 (#19595) 2024-01-31 19:02:00 +01:00
Bram Kragten
ce32de6e23 20240131.0 (#19594) 2024-01-31 19:00:50 +01:00
679 changed files with 39918 additions and 22822 deletions

View File

@@ -1,5 +1,5 @@
# 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/vscode/devcontainers/python:0-3.11
FROM mcr.microsoft.com/devcontainers/python:3.12
ENV \
DEBIAN_FRONTEND=noninteractive \

View File

@@ -115,6 +115,7 @@
}
],
"unused-imports/no-unused-imports": "error",
"lit/attribute-names": "warn",
"lit/attribute-value-entities": "off",
"lit/no-template-map": "off",
"lit/no-native-attributes": "warn",
@@ -125,6 +126,5 @@
"lit-a11y/anchor-is-valid": "warn",
"lit-a11y/role-has-required-aria-attrs": "warn"
},
"plugins": ["disable", "unused-imports"],
"processor": "disable/disable"
"plugins": ["unused-imports"]
}

View File

@@ -21,7 +21,7 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
ref: dev
@@ -57,7 +57,7 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
ref: master

View File

@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
@@ -37,7 +37,7 @@ jobs:
- name: Build resources
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
- name: Setup lint cache
uses: actions/cache@v4.0.0
uses: actions/cache@v4.0.2
with:
path: |
node_modules/.cache/prettier
@@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
@@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
@@ -89,7 +89,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.3.3
with:
name: frontend-bundle-stats
path: build/stats/*.json
@@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
@@ -113,7 +113,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.3.3
with:
name: supervisor-bundle-stats
path: build/stats/*.json

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

View File

@@ -22,7 +22,7 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
ref: dev
@@ -58,7 +58,7 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
ref: master

View File

@@ -16,7 +16,7 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2

View File

@@ -21,7 +21,7 @@ jobs:
if: github.repository == 'home-assistant/frontend' && contains(github.event.pull_request.labels.*.name, 'needs design preview')
steps:
- name: Check out files from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.2

View File

@@ -6,7 +6,7 @@ on:
- cron: "0 1 * * *"
env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"
NODE_OPTIONS: --max_old_space_size=6144
permissions:
@@ -20,7 +20,7 @@ jobs:
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
@@ -57,14 +57,14 @@ jobs:
run: tar -czvf translations.tar.gz translations
- name: Upload build artifacts
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.3.3
with:
name: wheels
path: dist/home_assistant_frontend*.whl
if-no-files-found: error
- name: Upload translations
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.3.3
with:
name: translations
path: translations.tar.gz

View File

@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Send bundle stats and build information to RelativeCI
uses: relative-ci/agent-action@v2.1.10
uses: relative-ci/agent-action@v2.1.11
with:
key: ${{ secrets[format('RELATIVE_CI_KEY_{0}_{1}', matrix.bundle, matrix.build)] }}
token: ${{ github.token }}

View File

@@ -6,7 +6,7 @@ on:
- published
env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"
NODE_OPTIONS: --max_old_space_size=6144
# Set default workflow permissions
@@ -23,7 +23,7 @@ jobs:
contents: write # Required to upload release assets
steps:
- name: Checkout the repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Verify version
uses: home-assistant/actions/helpers/verify-version@master
@@ -55,7 +55,7 @@ jobs:
script/release
- name: Upload release assets
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.6
with:
files: |
dist/*.whl

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
- name: Upload Translations
run: |

View File

@@ -1,13 +0,0 @@
diff --git a/simple-tooltip.js b/simple-tooltip.js
index 78a87f6a223925f0e29fbedb268c85a142ec6985..3d686dd6a3d5a93342b4b01408089fc316b408ca 100644
--- a/simple-tooltip.js
+++ b/simple-tooltip.js
@@ -195,6 +195,8 @@ class SimpleTooltip extends LitElement {
.hidden {
position: absolute;
left: -10000px;
+ inset-inline-start: -10000px;
+ inset-inline-end: initial;
top: auto;
width: 1px;
height: 1px;

View File

@@ -0,0 +1,18 @@
diff --git a/dist/hls.light.mjs b/dist/hls.light.mjs
index eed9d788fafdb159975e1a2eb08ac88ba9c9ac33..ace881935e6665946f1c8110ebd2f739cde4427e 100644
--- a/dist/hls.light.mjs
+++ b/dist/hls.light.mjs
@@ -20523,9 +20523,9 @@ class Hls {
}
Hls.defaultConfig = void 0;
-var KeySystemFormats = empty.KeySystemFormats;
-var KeySystems = empty.KeySystems;
-var SubtitleStreamController = empty.SubtitleStreamController;
-var TimelineController = empty.TimelineController;
+var KeySystemFormats = empty;
+var KeySystems = empty;
+var SubtitleStreamController = empty;
+var TimelineController = empty;
export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, Hls as default, getMediaSource, isMSESupported, isSupported };
//# sourceMappingURL=hls.light.mjs.map

File diff suppressed because one or more lines are too long

894
.yarn/releases/yarn-4.3.1.cjs vendored Executable file

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.1.0.cjs
yarnPath: .yarn/releases/yarn-4.3.1.cjs

View File

@@ -1,7 +1,56 @@
import defineProvider from "@babel/helper-define-polyfill-provider";
import { join } from "node:path";
import paths from "../paths.cjs";
const POLYFILL_DIR = join(paths.polymer_dir, "src/resources/polyfills");
// List of polyfill keys with supported browser targets for the functionality
const PolyfillSupport = {
// Note states and shadowRoot properties should be supported.
"element-internals": {
android: 90,
chrome: 90,
edge: 90,
firefox: 126,
ios: 17.4,
opera: 76,
opera_mobile: 64,
safari: 17.4,
samsung: 15.0,
},
"element-append": {
android: 54,
chrome: 54,
edge: 17,
firefox: 49,
ios: 10.0,
opera: 41,
opera_mobile: 41,
safari: 10.0,
samsung: 6.0,
},
"element-getattributenames": {
android: 61,
chrome: 61,
edge: 18,
firefox: 45,
ios: 10.3,
opera: 48,
opera_mobile: 45,
safari: 10.1,
samsung: 8.0,
},
"element-toggleattribute": {
android: 69,
chrome: 69,
edge: 18,
firefox: 63,
ios: 12.0,
opera: 56,
opera_mobile: 48,
safari: 12.0,
samsung: 10.0,
},
fetch: {
android: 42,
chrome: 42,
@@ -13,6 +62,31 @@ const PolyfillSupport = {
safari: 10.1,
samsung: 4.0,
},
"intl-getcanonicallocales": {
android: 54,
chrome: 54,
edge: 16,
firefox: 48,
ios: 10.3,
opera: 41,
opera_mobile: 41,
safari: 10.1,
samsung: 6.0,
},
"intl-locale": {
android: 74,
chrome: 74,
edge: 79,
firefox: 75,
ios: 14.0,
opera: 62,
opera_mobile: 53,
safari: 14.0,
samsung: 11.0,
},
"intl-other": {
// Not specified (i.e. always try polyfill) since compatibility depends on supported locales
},
proxy: {
android: 49,
chrome: 49,
@@ -24,17 +98,67 @@ const PolyfillSupport = {
safari: 10.0,
samsung: 5.0,
},
"resize-observer": {
android: 64,
chrome: 64,
edge: 79,
firefox: 69,
ios: 13.4,
opera: 51,
opera_mobile: 47,
safari: 13.1,
samsung: 9.0,
},
};
// Map of global variables and/or instance and static properties to the
// corresponding polyfill key and actual module to import
const polyfillMap = {
global: {
Proxy: { key: "proxy", module: "proxy-polyfill" },
fetch: { key: "fetch", module: "unfetch/polyfill" },
Proxy: { key: "proxy", module: "proxy-polyfill" },
ResizeObserver: {
key: "resize-observer",
module: join(POLYFILL_DIR, "resize-observer.ts"),
},
},
instance: {
attachInternals: {
key: "element-internals",
module: "element-internals-polyfill",
},
...Object.fromEntries(
["append", "getAttributeNames", "toggleAttribute"].map((prop) => {
const key = `element-${prop.toLowerCase()}`;
return [prop, { key, module: join(POLYFILL_DIR, `${key}.ts`) }];
})
),
},
static: {
Intl: {
getCanonicalLocales: {
key: "intl-getcanonicallocales",
module: join(POLYFILL_DIR, "intl-polyfill.ts"),
},
Locale: {
key: "intl-locale",
module: join(POLYFILL_DIR, "intl-polyfill.ts"),
},
...Object.fromEntries(
[
"DateTimeFormat",
"DisplayNames",
"ListFormat",
"NumberFormat",
"PluralRules",
"RelativeTimeFormat",
].map((obj) => [
obj,
{ key: "intl-other", module: join(POLYFILL_DIR, "intl-polyfill.ts") },
])
),
},
},
instance: {},
static: {},
};
// Create plugin using the same factory as for CoreJS
@@ -42,14 +166,16 @@ export default defineProvider(
({ createMetaResolver, debug, shouldInjectPolyfill }) => {
const resolvePolyfill = createMetaResolver(polyfillMap);
return {
name: "HA Custom",
name: "custom-polyfill",
polyfills: PolyfillSupport,
usageGlobal(meta, utils) {
const polyfill = resolvePolyfill(meta);
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
debug(polyfill.desc.key);
utils.injectGlobalImport(polyfill.desc.module);
return true;
}
return false;
},
};
}

View File

@@ -3,6 +3,8 @@ const env = require("./env.cjs");
const paths = require("./paths.cjs");
const { dependencies } = require("../package.json");
const BABEL_PLUGINS = path.join(__dirname, "babel-plugins");
// GitHub base URL to use for production source maps
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
module.exports.sourceMapURL = () => {
@@ -90,8 +92,8 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
[
"@babel/preset-env",
{
useBuiltIns: latestBuild ? false : "usage",
corejs: latestBuild ? false : dependencies["core-js"],
useBuiltIns: "usage",
corejs: dependencies["core-js"],
bugfixes: true,
shippedProposals: true,
},
@@ -100,22 +102,12 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
],
plugins: [
[
path.resolve(
paths.polymer_dir,
"build-scripts/babel-plugins/inline-constants-plugin.cjs"
),
path.join(BABEL_PLUGINS, "inline-constants-plugin.cjs"),
{
modules: ["@mdi/js"],
ignoreModuleNotFound: true,
},
],
[
path.resolve(
paths.polymer_dir,
"build-scripts/babel-plugins/custom-polyfill-plugin.js"
),
{ method: "usage-global" },
],
// Minify template literals for production
isProdBuild && [
"template-html-minifier",
@@ -153,6 +145,27 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
],
sourceMaps: !isTestBuild,
overrides: [
{
// Add plugin to inject various polyfills, excluding the polyfills
// themselves to prevent self-injection.
plugins: [
[
path.join(BABEL_PLUGINS, "custom-polyfill-plugin.js"),
{ method: "usage-global" },
],
],
exclude: [
path.join(paths.polymer_dir, "src/resources/polyfills"),
...[
"@formatjs/(?:ecma402-abstract|intl-\\w+)",
"@lit-labs/virtualizer/polyfills",
"@webcomponents/scoped-custom-element-registry",
"element-internals-polyfill",
"proxy-polyfill",
"unfetch",
].map((p) => new RegExp(`/node_modules/${p}/`)),
],
},
{
// Use unambiguous for dependencies so that require() is correctly injected into CommonJS files
// Exclusions are needed in some cases where ES modules have no static imports or exports, such as polyfills

View File

@@ -1,26 +1,19 @@
// Tasks to compress
import { deleteAsync } from "del";
import gulp from "gulp";
import gulpIf from "gulp-if";
import vinylPaths from "vinyl-paths";
import zopfli from "gulp-zopfli-green";
import paths from "../paths.cjs";
const zopfliOptions = { threshold: 150 };
const compressedExt = /\.gz$/;
const deleteUncompressed = (p) => deleteAsync(p.replace(compressedExt, ""));
const compressDist = (rootDir) =>
gulp
.src([
`${rootDir}/**/*.{js?(.map),json,css,svg,xml}`,
`${rootDir}/**/*.{js,json,css,svg,xml}`,
`${rootDir}/{authorize,onboarding}.html`,
])
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(rootDir))
.pipe(gulpIf(compressedExt, vinylPaths(deleteUncompressed)));
.pipe(gulp.dest(rootDir));
gulp.task("compress-app", () => compressDist(paths.app_output_root));
gulp.task("compress-hassio", () => compressDist(paths.hassio_output_root));

View File

@@ -9,7 +9,7 @@ import gulp from "gulp";
import jszip from "jszip";
import path from "path";
import process from "process";
import tar from "tar";
import { extract } from "tar";
const MAX_AGE = 24; // hours
const OWNER = "home-assistant";
@@ -156,7 +156,7 @@ gulp.task("fetch-nightly-translations", async function () {
console.log("Unpacking downloaded translations...");
const zip = await jszip.loadAsync(downloadResponse.data);
await deleteCurrent;
const extractStream = zip.file(/.*/)[0].nodeStream().pipe(tar.extract());
const extractStream = zip.file(/.*/)[0].nodeStream().pipe(extract());
await new Promise((resolve, reject) => {
extractStream.on("close", resolve).on("error", reject);
});

View File

@@ -1,92 +1,112 @@
import { createHash } from "crypto";
import { deleteSync } from "del";
import { mkdirSync, readdirSync, readFileSync, renameSync } from "fs";
import { writeFile } from "node:fs/promises";
/* eslint-disable max-classes-per-file */
import { deleteAsync } from "del";
import { glob } from "glob";
import gulp from "gulp";
import flatmap from "gulp-flatmap";
import transform from "gulp-json-transform";
import merge from "gulp-merge-json";
import rename from "gulp-rename";
import path from "path";
import vinylBuffer from "vinyl-buffer";
import source from "vinyl-source-stream";
import merge from "lodash.merge";
import { createHash } from "node:crypto";
import { mkdir, readFile } from "node:fs/promises";
import { basename, join } from "node:path";
import { PassThrough, Transform } from "node:stream";
import { finished } from "node:stream/promises";
import env from "../env.cjs";
import paths from "../paths.cjs";
import { mapFiles } from "../util.cjs";
import "./fetch-nightly-translations.js";
const inFrontendDir = "translations/frontend";
const inBackendDir = "translations/backend";
const workDir = "build/translations";
const fullDir = workDir + "/full";
const coreDir = workDir + "/core";
const outDir = workDir + "/output";
const outDir = join(workDir, "output");
const EN_SRC = join(paths.translations_src, "en.json");
const TEST_LOCALE = "en-x-test";
let mergeBackend = false;
gulp.task(
"translations-enable-merge-backend",
gulp.parallel((done) => {
gulp.parallel(async () => {
mergeBackend = true;
done();
}, "allow-setup-fetch-nightly-translations")
);
// Panel translations which should be split from the core translations.
const TRANSLATION_FRAGMENTS = Object.keys(
JSON.parse(
readFileSync(
path.resolve(paths.polymer_dir, "src/translations/en.json"),
"utf-8"
)
).ui.panel
);
// Transform stream to apply a function on Vinyl JSON files (buffer mode only).
// The provided function can either return a new object, or an array of
// [object, subdirectory] pairs for fragmentizing the JSON.
class CustomJSON extends Transform {
constructor(func, reviver = null) {
super({ objectMode: true });
this._func = func;
this._reviver = reviver;
}
function recursiveFlatten(prefix, data) {
let output = {};
Object.keys(data).forEach((key) => {
if (typeof data[key] === "object") {
output = {
...output,
...recursiveFlatten(prefix + key + ".", data[key]),
};
async _transform(file, _, callback) {
try {
let obj = JSON.parse(file.contents.toString(), this._reviver);
if (this._func) obj = this._func(obj, file.path);
for (const [outObj, dir] of Array.isArray(obj) ? obj : [[obj, ""]]) {
const outFile = file.clone({ contents: false });
outFile.contents = Buffer.from(JSON.stringify(outObj));
outFile.dirname += `/${dir}`;
this.push(outFile);
}
callback(null);
} catch (err) {
callback(err);
}
}
}
// Transform stream to merge Vinyl JSON files (buffer mode only).
class MergeJSON extends Transform {
_objects = [];
constructor(stem, startObj = {}, reviver = null) {
super({ objectMode: true, allowHalfOpen: false });
this._stem = stem;
this._startObj = structuredClone(startObj);
this._reviver = reviver;
}
async _transform(file, _, callback) {
try {
this._objects.push(JSON.parse(file.contents.toString(), this._reviver));
if (!this._outFile) this._outFile = file.clone({ contents: false });
callback(null);
} catch (err) {
callback(err);
}
}
async _flush(callback) {
try {
const mergedObj = merge(this._startObj, ...this._objects);
this._outFile.contents = Buffer.from(JSON.stringify(mergedObj));
this._outFile.stem = this._stem;
callback(null, this._outFile);
} catch (err) {
callback(err);
}
}
}
// Utility to flatten object keys to single level using separator
const flatten = (data, prefix = "", sep = ".") => {
const output = {};
for (const [key, value] of Object.entries(data)) {
if (typeof value === "object") {
Object.assign(output, flatten(value, prefix + key + sep, sep));
} else {
output[prefix + key] = data[key];
output[prefix + key] = value;
}
});
}
return output;
}
};
function flatten(data) {
return recursiveFlatten("", data);
}
function emptyFilter(data) {
const newData = {};
Object.keys(data).forEach((key) => {
if (data[key]) {
if (typeof data[key] === "object") {
newData[key] = emptyFilter(data[key]);
} else {
newData[key] = data[key];
}
}
});
return newData;
}
function recursiveEmpty(data) {
const newData = {};
Object.keys(data).forEach((key) => {
if (data[key]) {
if (typeof data[key] === "object") {
newData[key] = recursiveEmpty(data[key]);
} else {
newData[key] = "TRANSLATED";
}
}
});
return newData;
}
// Filter functions that can be passed directly to JSON.parse()
const emptyReviver = (_key, value) => value || undefined;
const testReviver = (_key, value) =>
value && typeof value === "string" ? "TRANSLATED" : value;
/**
* Replace Lokalise key placeholders with their actual values.
@@ -95,60 +115,44 @@ function recursiveEmpty(data) {
* be included in src/translations/en.json, but still be usable while
* developing locally.
*
* @link https://docs.lokalise.co/article/KO5SZWLLsy-key-referencing
* @link https://docs.lokalise.com/en/articles/1400528-key-referencing
*/
const re_key_reference = /\[%key:([^%]+)%\]/;
function lokaliseTransform(data, original, file) {
const KEY_REFERENCE = /\[%key:([^%]+)%\]/;
const lokaliseTransform = (data, path, original = data) => {
const output = {};
Object.entries(data).forEach(([key, value]) => {
if (value instanceof Object) {
output[key] = lokaliseTransform(value, original, file);
for (const [key, value] of Object.entries(data)) {
if (typeof value === "object") {
output[key] = lokaliseTransform(value, path, original);
} else {
output[key] = value.replace(re_key_reference, (_match, lokalise_key) => {
output[key] = value.replace(KEY_REFERENCE, (_match, lokalise_key) => {
const replace = lokalise_key.split("::").reduce((tr, k) => {
if (!tr) {
throw Error(
`Invalid key placeholder ${lokalise_key} in ${file.path}`
);
throw Error(`Invalid key placeholder ${lokalise_key} in ${path}`);
}
return tr[k];
}, original);
if (typeof replace !== "string") {
throw Error(
`Invalid key placeholder ${lokalise_key} in ${file.path}`
);
throw Error(`Invalid key placeholder ${lokalise_key} in ${path}`);
}
return replace;
});
}
});
}
return output;
}
};
gulp.task("clean-translations", async () => deleteSync([workDir]));
gulp.task("clean-translations", () => deleteAsync([workDir]));
gulp.task("ensure-translations-build-dir", async () => {
mkdirSync(workDir, { recursive: true });
});
const makeWorkDir = () => mkdir(workDir, { recursive: true });
gulp.task("create-test-metadata", () =>
env.isProdBuild()
? Promise.resolve()
: writeFile(
workDir + "/testMetadata.json",
JSON.stringify({ test: { nativeName: "Test" } })
)
);
gulp.task("create-test-translation", () =>
const createTestTranslation = () =>
env.isProdBuild()
? Promise.resolve()
: gulp
.src(path.join(paths.translations_src, "en.json"))
.pipe(transform((data, _file) => recursiveEmpty(data)))
.pipe(rename("test.json"))
.pipe(gulp.dest(workDir))
);
.src(EN_SRC)
.pipe(new CustomJSON(null, testReviver))
.pipe(rename(`${TEST_LOCALE}.json`))
.pipe(gulp.dest(workDir));
/**
* This task will build a master translation file, to be used as the base for
@@ -159,279 +163,164 @@ gulp.task("create-test-translation", () =>
* project is buildable immediately after merging new translation keys, since
* the Lokalise update to translations/en.json will not happen immediately.
*/
gulp.task("build-master-translation", () => {
const src = [path.join(paths.translations_src, "en.json")];
const createMasterTranslation = () =>
gulp
.src([EN_SRC, ...(mergeBackend ? [`${inBackendDir}/en.json`] : [])])
.pipe(new CustomJSON(lokaliseTransform))
.pipe(new MergeJSON("en"))
.pipe(gulp.dest(workDir));
if (mergeBackend) {
src.push(path.join(inBackendDir, "en.json"));
const FRAGMENTS = ["base"];
const toggleSupervisorFragment = async () => {
FRAGMENTS[0] = "supervisor";
};
const panelFragment = (fragment) =>
fragment !== "base" && fragment !== "supervisor";
const HASHES = new Map();
const createTranslations = async () => {
// Parse and store the master to avoid repeating this for each locale, then
// add the panel fragments when processing the app.
const enMaster = JSON.parse(await readFile(`${workDir}/en.json`, "utf-8"));
if (FRAGMENTS[0] === "base") {
FRAGMENTS.push(...Object.keys(enMaster.ui.panel));
}
return gulp
.src(src)
.pipe(transform((data, file) => lokaliseTransform(data, data, file)))
// The downstream pipeline is setup first. It hashes the merged data for
// each locale, then fragmentizes and flattens the data for final output.
const translationFiles = await glob([
`${inFrontendDir}/!(en).json`,
...(env.isProdBuild() ? [] : [`${workDir}/${TEST_LOCALE}.json`]),
]);
const hashStream = new Transform({
objectMode: true,
transform: async (file, _, callback) => {
const hash = env.isProdBuild()
? createHash("md5").update(file.contents).digest("hex")
: "dev";
HASHES.set(file.stem, hash);
file.stem += `-${hash}`;
callback(null, file);
},
}).setMaxListeners(translationFiles.length + 1);
const fragmentsStream = hashStream
.pipe(
merge({
fileName: "en.json",
})
)
.pipe(gulp.dest(fullDir));
});
gulp.task("build-merged-translations", () =>
gulp
.src([
inFrontendDir + "/*.json",
"!" + inFrontendDir + "/en.json",
...(env.isProdBuild() ? [] : [workDir + "/test.json"]),
])
.pipe(transform((data, file) => lokaliseTransform(data, data, file)))
.pipe(
flatmap((stream, file) => {
// For each language generate a merged json file. It begins with the master
// translation as a failsafe for untranslated strings, and merges all parent
// tags into one file for each specific subtag
//
// TODO: This is a naive interpretation of BCP47 that should be improved.
// Will be OK for now as long as we don't have anything more complicated
// than a base translation + region.
const tr = path.basename(file.history[0], ".json");
const subtags = tr.split("-");
const src = [fullDir + "/en.json"];
for (let i = 1; i <= subtags.length; i++) {
const lang = subtags.slice(0, i).join("-");
if (lang === "test") {
src.push(workDir + "/test.json");
} else if (lang !== "en") {
src.push(inFrontendDir + "/" + lang + ".json");
if (mergeBackend) {
src.push(inBackendDir + "/" + lang + ".json");
}
new CustomJSON((data) =>
FRAGMENTS.map((fragment) => {
switch (fragment) {
case "base":
// Remove the panels and supervisor to create the base translations
return [
flatten({
...data,
ui: { ...data.ui, panel: undefined },
supervisor: undefined,
}),
"",
];
case "supervisor":
// Supervisor key is at the top level
return [flatten(data.supervisor), ""];
default:
// Create a fragment with only the given panel
return [
flatten(data.ui.panel[fragment], `ui.panel.${fragment}.`),
fragment,
];
}
}
return gulp
.src(src, { allowEmpty: true })
.pipe(transform((data) => emptyFilter(data)))
.pipe(
merge({
fileName: tr + ".json",
})
)
.pipe(gulp.dest(fullDir));
})
)
);
let taskName;
const splitTasks = [];
TRANSLATION_FRAGMENTS.forEach((fragment) => {
taskName = "build-translation-fragment-" + fragment;
gulp.task(taskName, () =>
// Return only the translations for this fragment.
gulp
.src(fullDir + "/*.json")
.pipe(
transform((data) => ({
ui: {
panel: {
[fragment]: data.ui.panel[fragment],
},
},
}))
)
.pipe(gulp.dest(workDir + "/" + fragment))
);
splitTasks.push(taskName);
});
taskName = "build-translation-core";
gulp.task(taskName, () =>
// Remove the fragment translations from the core translation.
gulp
.src(fullDir + "/*.json")
.pipe(
transform((data, _file) => {
TRANSLATION_FRAGMENTS.forEach((fragment) => {
delete data.ui.panel[fragment];
});
delete data.supervisor;
return data;
})
)
.pipe(gulp.dest(coreDir))
);
splitTasks.push(taskName);
gulp.task("build-flattened-translations", () =>
// Flatten the split versions of our translations, and move them into outDir
gulp
.src(
TRANSLATION_FRAGMENTS.map(
(fragment) => workDir + "/" + fragment + "/*.json"
).concat(coreDir + "/*.json"),
{ base: workDir }
)
.pipe(
transform((data) =>
// Polymer.AppLocalizeBehavior requires flattened json
flatten(data)
})
)
)
.pipe(
rename((filePath) => {
if (filePath.dirname === "core") {
filePath.dirname = "";
.pipe(gulp.dest(outDir));
// Send the English master downstream first, then for each other locale
// generate merged JSON data to continue piping. It begins with the master
// translation as a failsafe for untranslated strings, and merges all parent
// tags into one file for each specific subtag
//
// TODO: This is a naive interpretation of BCP47 that should be improved.
// Will be OK for now as long as we don't have anything more complicated
// than a base translation + region.
gulp
.src(`${workDir}/en.json`)
.pipe(new PassThrough({ objectMode: true }))
.pipe(hashStream, { end: false });
const mergesFinished = [];
for (const translationFile of translationFiles) {
const locale = basename(translationFile, ".json");
const subtags = locale.split("-");
const mergeFiles = [];
for (let i = 1; i <= subtags.length; i++) {
const lang = subtags.slice(0, i).join("-");
if (lang === TEST_LOCALE) {
mergeFiles.push(`${workDir}/${TEST_LOCALE}.json`);
} else if (lang !== "en") {
mergeFiles.push(`${inFrontendDir}/${lang}.json`);
if (mergeBackend) {
mergeFiles.push(`${inBackendDir}/${lang}.json`);
}
// In dev we create the file with the fake hash in the filename
if (!env.isProdBuild()) {
filePath.basename += "-dev";
}
})
)
.pipe(gulp.dest(outDir))
);
const fingerprints = {};
gulp.task("build-translation-fingerprints", () => {
// Fingerprint full file of each language
const files = readdirSync(fullDir);
for (let i = 0; i < files.length; i++) {
fingerprints[files[i].split(".")[0]] = {
// In dev we create fake hashes
hash: env.isProdBuild()
? createHash("md5")
.update(readFileSync(path.join(fullDir, files[i]), "utf-8"))
.digest("hex")
: "dev",
};
}
// In dev we create the file with the fake hash in the filename
if (env.isProdBuild()) {
mapFiles(outDir, ".json", (filename) => {
const parsed = path.parse(filename);
// nl.json -> nl-<hash>.json
if (!(parsed.name in fingerprints)) {
throw new Error(`Unable to find hash for ${filename}`);
}
renameSync(
filename,
`${parsed.dir}/${parsed.name}-${fingerprints[parsed.name].hash}${
parsed.ext
}`
);
});
}
const mergeStream = gulp
.src(mergeFiles, { allowEmpty: true })
.pipe(new MergeJSON(locale, enMaster, emptyReviver));
mergesFinished.push(finished(mergeStream));
mergeStream.pipe(hashStream, { end: false });
}
const stream = source("translationFingerprints.json");
stream.write(JSON.stringify(fingerprints));
process.nextTick(() => stream.end());
return stream.pipe(vinylBuffer()).pipe(gulp.dest(workDir));
});
// Wait for all merges to finish, then it's safe to end writing to the
// downstream pipeline and wait for all fragments to finish writing.
await Promise.all(mergesFinished);
hashStream.end();
await finished(fragmentsStream);
};
gulp.task("build-translation-fragment-supervisor", () =>
const writeTranslationMetaData = () =>
gulp
.src(fullDir + "/*.json")
.pipe(transform((data) => data.supervisor))
.src([`${paths.translations_src}/translationMetadata.json`])
.pipe(
rename((filePath) => {
// In dev we create the file with the fake hash in the filename
new CustomJSON((meta) => {
// Add the test translation in development.
if (!env.isProdBuild()) {
filePath.basename += "-dev";
meta[TEST_LOCALE] = { nativeName: "Translation Test" };
}
})
)
.pipe(gulp.dest(workDir + "/supervisor"))
);
gulp.task("build-translation-flatten-supervisor", () =>
gulp
.src(workDir + "/supervisor/*.json")
.pipe(
transform((data) =>
// Polymer.AppLocalizeBehavior requires flattened json
flatten(data)
)
)
.pipe(gulp.dest(outDir))
);
gulp.task("build-translation-write-metadata", () =>
gulp
.src([
path.join(paths.translations_src, "translationMetadata.json"),
...(env.isProdBuild() ? [] : [workDir + "/testMetadata.json"]),
workDir + "/translationFingerprints.json",
])
.pipe(merge({}))
.pipe(
transform((data) => {
const newData = {};
Object.entries(data).forEach(([key, value]) => {
// Filter out translations without native name.
if (value.nativeName) {
newData[key] = value;
} else {
// Filter out locales without a native name, and add the hashes.
for (const locale of Object.keys(meta)) {
if (!meta[locale].nativeName) {
meta[locale] = undefined;
console.warn(
`Skipping language ${key}. Native name was not translated.`
`Skipping locale ${locale} because native name is not translated.`
);
} else {
meta[locale].hash = HASHES.get(locale);
}
});
return newData;
}
return {
fragments: FRAGMENTS.filter(panelFragment),
translations: meta,
};
})
)
.pipe(
transform((data) => ({
fragments: TRANSLATION_FRAGMENTS,
translations: data,
}))
)
.pipe(rename("translationMetadata.json"))
.pipe(gulp.dest(workDir))
);
gulp.task(
"create-translations",
gulp.series(
gulp.parallel("create-test-metadata", "create-test-translation"),
"build-master-translation",
"build-merged-translations",
gulp.parallel(...splitTasks),
"build-flattened-translations"
)
);
.pipe(gulp.dest(workDir));
gulp.task(
"build-translations",
gulp.series(
gulp.parallel(
"fetch-nightly-translations",
gulp.series("clean-translations", "ensure-translations-build-dir")
gulp.series("clean-translations", makeWorkDir)
),
"create-translations",
"build-translation-fingerprints",
"build-translation-write-metadata"
createTestTranslation,
createMasterTranslation,
createTranslations,
writeTranslationMetaData
)
);
gulp.task(
"build-supervisor-translations",
gulp.series(
gulp.parallel(
"fetch-nightly-translations",
gulp.series("clean-translations", "ensure-translations-build-dir")
),
gulp.parallel("create-test-metadata", "create-test-translation"),
"build-master-translation",
"build-merged-translations",
"build-translation-fragment-supervisor",
"build-translation-flatten-supervisor",
"build-translation-fingerprints",
"build-translation-write-metadata"
)
gulp.series(toggleSupervisorFragment, "build-translations")
);

View File

@@ -99,7 +99,7 @@ gulp.task("webpack-watch-app", () => {
).watch({ poll: isWsl }, doneHandler());
gulp.watch(
path.join(paths.translations_src, "en.json"),
gulp.series("create-translations", "copy-translations-app")
gulp.series("build-translations", "copy-translations-app")
);
});

View File

@@ -1,16 +0,0 @@
const path = require("path");
const fs = require("fs");
// Helper function to map recursively over files in a folder and it's subfolders
module.exports.mapFiles = function mapFiles(startPath, filter, mapFunc) {
const files = fs.readdirSync(startPath);
for (let i = 0; i < files.length; i++) {
const filename = path.join(startPath, files[i]);
const stat = fs.lstatSync(filename);
if (stat.isDirectory()) {
mapFiles(filename, filter, mapFunc);
} else if (filename.indexOf(filter) >= 0) {
mapFunc(filename);
}
}
};

View File

@@ -10,6 +10,7 @@ const WebpackBar = require("webpackbar");
const {
TransformAsyncModulesPlugin,
} = require("transform-async-modules-webpack-plugin");
const { dependencies } = require("../package.json");
const paths = require("./paths.cjs");
const bundle = require("./bundle.cjs");
@@ -156,11 +157,15 @@ const createWebpackConfig = ({
transform: (stats) => JSON.stringify(filterStats(stats)),
}),
!latestBuild &&
new TransformAsyncModulesPlugin({ browserslistEnv: "legacy" }),
new TransformAsyncModulesPlugin({
browserslistEnv: "legacy",
runtime: { version: dependencies["@babel/runtime"] },
}),
].filter(Boolean),
resolve: {
extensions: [".ts", ".js", ".json"],
alias: {
"lit/static-html$": "lit/static-html.js",
"lit/decorators$": "lit/decorators.js",
"lit/directive$": "lit/directive.js",
"lit/directives/until$": "lit/directives/until.js",

View File

@@ -1,7 +1,6 @@
import "@material/mwc-button/mwc-button";
import { mdiCast, mdiCastConnected } from "@mdi/js";
import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-listbox/paper-listbox";
import { ActionDetail } from "@material/mwc-list/mwc-list";
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
import { Auth, Connection } from "home-assistant-js-websocket";
import { CSSResultGroup, LitElement, TemplateResult, css, html } from "lit";
import { customElement, property, state } from "lit/decorators";
@@ -28,6 +27,7 @@ import { LovelaceViewConfig } from "../../../../src/data/lovelace/config/view";
import "../../../../src/layouts/hass-loading-screen";
import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config";
import "./hc-layout";
import "../../../../src/components/ha-list-item";
@customElement("hc-cast")
class HcCast extends LitElement {
@@ -83,34 +83,37 @@ class HcCast extends LitElement {
`
: html`
<div class="section-header">PICK A VIEW</div>
<paper-listbox
attr-for-selected="data-path"
.selected=${this.castManager.status.lovelacePath || ""}
>
<mwc-list @action=${this._handlePickView} activatable>
${(
this.lovelaceViews ?? [
generateDefaultViewConfig({}, {}, {}, {}, () => ""),
]
).map(
(view, idx) => html`
<paper-icon-item
@click=${this._handlePickView}
data-path=${view.path || idx}
(view, idx) =>
html`<ha-list-item
graphic="avatar"
.activated=${this.castManager.status?.lovelacePath ===
(view.path ?? idx)}
.selected=${this.castManager.status?.lovelacePath ===
(view.path ?? idx)}
>
${view.title || view.path || "Unnamed view"}
${view.icon
? html`
<ha-icon
.icon=${view.icon}
slot="item-icon"
slot="graphic"
></ha-icon>
`
: ""}
${view.title || view.path}
</paper-icon-item>
`
)}
</paper-listbox>
: html`<ha-svg-icon
slot="item-icon"
.path=${mdiViewDashboard}
></ha-svg-icon>`}</ha-list-item
> `
)}</mwc-list
>
`}
<div class="card-actions">
${this.castManager.status
? html`
@@ -182,8 +185,8 @@ class HcCast extends LitElement {
this.castManager.requestSession();
}
private async _handlePickView(ev: Event) {
const path = (ev.currentTarget as any).getAttribute("data-path");
private async _handlePickView(ev: CustomEvent<ActionDetail>) {
const path = this.lovelaceViews![ev.detail.index].path ?? ev.detail.index;
await ensureConnectedCastSession(this.castManager!, this.auth!);
castSendShowLovelaceView(this.castManager, this.auth.data.hassUrl, path);
}
@@ -246,25 +249,14 @@ class HcCast extends LitElement {
height: 18px;
}
paper-listbox {
padding-top: 0;
}
paper-listbox ha-icon {
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;
color: var(--secondary-text-color);
}
paper-icon-item {
cursor: pointer;
}
paper-icon-item[disabled] {
cursor: initial;
}
:host([hide-icons]) paper-icon-item {
--paper-item-icon-width: 0px;
:host([hide-icons]) ha-icon {
display: none;
}
.spacer {

View File

@@ -28,7 +28,7 @@ class HcLaunchScreen extends LitElement {
:host {
display: block;
height: 100vh;
background-color: white;
background-color: #f2f4f9;
font-size: 24px;
}
.container {
@@ -43,6 +43,9 @@ class HcLaunchScreen extends LitElement {
max-width: 80%;
object-fit: cover;
}
.status {
color: #1d2126;
}
`;
}
}

View File

@@ -2,6 +2,7 @@ import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, query } from "lit/decorators";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
import { getPanelTitleFromUrlPath } from "../../../../src/data/panel";
import { Lovelace } from "../../../../src/panels/lovelace/types";
import "../../../../src/panels/lovelace/views/hui-view";
import { HomeAssistant } from "../../../../src/types";
@@ -61,7 +62,12 @@ class HcLovelace extends LitElement {
const index = this._viewIndex;
if (index !== undefined) {
const dashboardTitle = this.lovelaceConfig.title || this.urlPath;
const title = getPanelTitleFromUrlPath(
this.hass,
this.urlPath || "lovelace"
);
const dashboardTitle = title || this.urlPath;
const viewTitle =
this.lovelaceConfig.views[index].title ||
@@ -80,10 +86,17 @@ class HcLovelace extends LitElement {
this.lovelaceConfig.views[index].background ||
this.lovelaceConfig.background;
if (configBackground) {
const backgroundStyle =
typeof configBackground === "string"
? configBackground
: configBackground?.image
? `center / cover no-repeat url('${configBackground.image}')`
: undefined;
if (backgroundStyle) {
this._huiView!.style.setProperty(
"--lovelace-background",
configBackground
backgroundStyle
);
} else {
this._huiView!.style.removeProperty("--lovelace-background");

View File

@@ -35,6 +35,7 @@ import { loadLovelaceResources } from "../../../../src/panels/lovelace/common/lo
import { HassElement } from "../../../../src/state/hass-element";
import { castContext } from "../cast_context";
import "./hc-launch-screen";
import { getPanelTitleFromUrlPath } from "../../../../src/data/panel";
const DEFAULT_CONFIG: LovelaceDashboardStrategyConfig = {
strategy: {
@@ -270,7 +271,7 @@ export class HcMain extends HassElement {
}
this._error = undefined;
if (msg.urlPath === "lovelace") {
if (msg.urlPath === "lovelace" || msg.urlPath === undefined) {
msg.urlPath = null;
}
this._lovelacePath = msg.viewPath;
@@ -359,7 +360,11 @@ export class HcMain extends HassElement {
}
private _handleNewLovelaceConfig(lovelaceConfig: LovelaceConfig) {
castContext.setApplicationState(lovelaceConfig.title || "");
const title = getPanelTitleFromUrlPath(
this.hass!,
this._urlPath || "lovelace"
);
castContext.setApplicationState(title || "");
this._lovelaceConfig = lovelaceConfig;
}

View File

@@ -4,6 +4,7 @@ import { energyEntities } from "../stubs/entities";
import { DemoConfig } from "./types";
export const demoConfigs: Array<() => Promise<DemoConfig>> = [
() => import("./sections").then((mod) => mod.demoSections),
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),
() => import("./kernehed").then((mod) => mod.demoKernehed),

View File

@@ -0,0 +1,16 @@
import { html } from "lit";
import { DemoConfig } from "../types";
export const demoLovelaceDescription: DemoConfig["description"] = (
localize
) => html`
<p>
${localize("ui.panel.page-demo.config.sections.description", {
blog_post: html`<a
href="https://www.home-assistant.io/blog/2024/03/04/dashboard-chapter-1/"
target="_blank"
>${localize("ui.panel.page-demo.config.sections.description_blog_post")}
</a>`,
})}
</p>
`;

View File

@@ -0,0 +1,474 @@
import { convertEntities } from "../../../../src/fake_data/entity";
import { DemoConfig } from "../types";
export const demoEntitiesSections: DemoConfig["entities"] = () =>
convertEntities({
"cover.living_room_garden_shutter": {
entity_id: "cover.living_room_garden_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Living room garden shutter",
supported_features: 15,
},
},
"cover.living_room_graveyard_shutter": {
entity_id: "cover.living_room_graveyard_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Living room graveyard shutter",
supported_features: 15,
},
},
"cover.living_room_left_shutter": {
entity_id: "cover.living_room_left_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Living room left shutter",
supported_features: 15,
},
},
"cover.living_room_right_shutter": {
entity_id: "cover.living_room_right_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Living room right shutter",
supported_features: 15,
},
},
"light.floor_lamp": {
entity_id: "light.floor_lamp",
state: "on",
attributes: {
min_color_temp_kelvin: 2000,
max_color_temp_kelvin: 6535,
min_mireds: 153,
max_mireds: 500,
supported_color_modes: ["color_temp", "xy"],
color_mode: "color_temp",
brightness: 178,
color_temp_kelvin: 2583,
color_temp: 387,
hs_color: [28.664, 69.597],
rgb_color: [255, 162, 77],
xy_color: [0.538, 0.389],
icon: "mdi:floor-lamp",
friendly_name: "Floor lamp",
supported_features: 44,
},
},
"light.living_room_spotlights": {
entity_id: "light.living_room_spotlights",
state: "on",
attributes: {
supported_color_modes: ["brightness"],
color_mode: "brightness",
brightness: 126,
icon: "mdi:ceiling-light-multiple",
friendly_name: "Living room spotlights",
supported_features: 32,
},
},
"light.bar_lamp": {
entity_id: "light.bar_lamp",
state: "on",
attributes: {
min_color_temp_kelvin: 2202,
max_color_temp_kelvin: 4504,
min_mireds: 222,
max_mireds: 454,
effect_list: ["None", "candle"],
supported_color_modes: ["color_temp"],
effect: null,
color_mode: null,
brightness: null,
color_temp_kelvin: null,
color_temp: null,
hs_color: null,
rgb_color: null,
xy_color: null,
mode: "normal",
dynamics: "none",
icon: "mdi:lightbulb-variant",
friendly_name: "Bar lamp",
supported_features: 44,
},
},
"sensor.living_room_temperature": {
entity_id: "sensor.living_room_temperature",
state: "22.8",
attributes: {
state_class: "measurement",
unit_of_measurement: "°C",
device_class: "temperature",
friendly_name: "Living room Temperature",
},
},
"media_player.living_room_nest_mini": {
entity_id: "media_player.living_room_nest_mini",
state: "off",
attributes: {
device_class: "speaker",
friendly_name: "Living room Nest Mini",
supported_features: 152461,
},
},
"cover.kitchen_shutter": {
entity_id: "cover.kitchen_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Kitchen shutter ",
supported_features: 15,
},
},
"light.kitchen_spotlights": {
entity_id: "light.kitchen_spotlights",
state: "off",
attributes: {
supported_color_modes: ["brightness"],
color_mode: null,
brightness: null,
icon: "mdi:ceiling-light-multiple",
friendly_name: "Kitchen spotlights ",
supported_features: 32,
},
},
"light.worktop_spotlights": {
entity_id: "light.worktop_spotlights",
state: "off",
attributes: {
supported_color_modes: ["brightness"],
color_mode: null,
brightness: null,
icon: "mdi:ceiling-light-multiple",
friendly_name: "Worktop spotlights ",
supported_features: 32,
},
},
"binary_sensor.fridge_door": {
entity_id: "binary_sensor.fridge_door",
state: "off",
attributes: {
device_class: "door",
icon: "mdi:fridge",
friendly_name: "Fridge door",
},
},
"media_player.kitchen_nest_audio": {
entity_id: "media_player.kitchen_nest_audio",
state: "on",
attributes: {
device_class: "speaker",
friendly_name: "Kitchen Nest Audio",
supported_features: 152461,
},
},
"binary_sensor.tesla_wall_connector_vehicle_connected": {
entity_id: "binary_sensor.tesla_wall_connector_vehicle_connected",
state: "off",
attributes: {
device_class: "plug",
friendly_name: "Wall Connector Vehicle connected",
},
},
"sensor.tesla_wall_connector_session_energy": {
entity_id: "sensor.tesla_wall_connector_session_energy",
state: "16.3",
attributes: {
state_class: "total_increasing",
unit_of_measurement: "kWh",
device_class: "energy",
friendly_name: "Tesla Wall Connector Session energy",
},
},
"sensor.electric_meter_power": {
entity_id: "sensor.electric_meter_power",
state: "797.86",
attributes: {
state_class: "measurement",
unit_of_measurement: "W",
device_class: "power",
icon: "mdi:meter-electric",
friendly_name: "Electric meter Power",
},
},
"sensor.eletric_meter_voltage": {
entity_id: "sensor.eletric_meter_voltage",
state: "232.19",
attributes: {
state_class: "measurement",
unit_of_measurement: "V",
device_class: "voltage",
friendly_name: "Electric meter voltage",
},
},
"sensor.electricity_maps_grid_fossil_fuel_percentage": {
entity_id: "sensor.electricity_maps_grid_fossil_fuel_percentage",
state: "9.84",
attributes: {
state_class: "measurement",
country_code: "FR",
unit_of_measurement: "%",
attribution: "Data provided by Electricity Maps",
icon: "mdi:barrel",
friendly_name: "Electricity Maps Grid fossil fuel percentage",
},
},
"sensor.electricity_maps_co2_intensity": {
entity_id: "sensor.electricity_maps_co2_intensity",
state: "62.0",
attributes: {
state_class: "measurement",
country_code: "FR",
unit_of_measurement: "gCO2eq/kWh",
attribution: "Data provided by Electricity Maps",
friendly_name: "Electricity Maps CO2 intensity",
icon: "mdi:molecule-co2",
},
},
"sun.sun": {
entity_id: "sun.sun",
state: "above_horizon",
attributes: {
next_dawn: "2024-03-05T05:50:21.964405+00:00",
next_dusk: "2024-03-04T18:08:54.311334+00:00",
next_midnight: "2024-03-05T00:00:00+00:00",
next_noon: "2024-03-05T12:00:05+00:00",
next_rising: "2024-03-05T06:23:42.739159+00:00",
next_setting: "2024-03-04T17:35:26.271171+00:00",
elevation: 30.38,
azimuth: 204.42,
rising: false,
friendly_name: "Sun",
},
},
"sensor.rain": {
entity_id: "sensor.moon_phase",
state: "7.2",
attributes: {
state_class: "total_increasing",
unit_of_measurement: "mm",
device_class: "precipitation",
friendly_name: "Rain",
},
},
"climate.ground_floor": {
entity_id: "climate.ground_floor",
state: "heat",
attributes: {
hvac_modes: ["auto", "heat", "off"],
min_temp: 7,
max_temp: 35,
preset_modes: [
"comfort",
"away",
"eco",
"frost_protection",
"external",
"home",
],
current_temperature: 20.8,
temperature: 21,
preset_mode: "comfort",
icon: "mdi:home-floor-0",
friendly_name: "Ground floor Thermostat",
supported_features: 401,
},
},
"climate.first_floor": {
entity_id: "climate.first_floor",
state: "heat",
attributes: {
hvac_modes: ["auto", "heat", "off"],
min_temp: 7,
max_temp: 35,
preset_modes: [
"comfort",
"away",
"eco",
"frost_protection",
"external",
"home",
],
current_temperature: 21.7,
temperature: 21,
preset_mode: "comfort",
icon: "mdi:home-floor-1",
friendly_name: "First floor Thermostat",
supported_features: 401,
},
},
"cover.study_shutter": {
entity_id: "cover.study_shutter",
state: "open",
attributes: {
current_position: 100,
device_class: "shutter",
friendly_name: "Study shutter",
supported_features: 15,
},
},
"light.study_spotlights": {
entity_id: "light.study_spotlights",
state: "off",
attributes: {
supported_color_modes: ["brightness"],
color_mode: null,
brightness: null,
icon: "mdi:ceiling-light-multiple",
friendly_name: "Study spotlights",
supported_features: 32,
},
},
"media_player.study_nest_hub": {
entity_id: "media_player.study_nest_hub",
state: "off",
attributes: {
friendly_name: "Study Nest Hub",
supported_features: 152461,
},
},
"sensor.standing_desk_height": {
entity_id: "sensor.standing_desk_height",
state: "72",
attributes: {
unit_of_measurement: "cm",
icon: "mdi:tape-measure",
friendly_name: "Standing desk Height",
},
},
"light.outdoor_light": {
entity_id: "light.outdoor_light",
state: "on",
attributes: {
supported_color_modes: ["brightness"],
color_mode: null,
brightness: 255,
icon: "mdi:outdoor-lamp",
friendly_name: "Outdoor light",
supported_features: 32,
},
},
"light.flood_light": {
entity_id: "light.flood_light",
state: "off",
attributes: {
effect_list: ["None", "candle"],
supported_color_modes: ["brightness"],
effect: null,
color_mode: null,
brightness: null,
mode: "normal",
dynamics: "none",
icon: "mdi:light-flood-down",
friendly_name: "Flood light",
supported_features: 44,
},
},
"sensor.outdoor_motion_sensor_temperature": {
entity_id: "sensor.outdoor_motion_sensor_temperature",
state: "10.2",
attributes: {
state_class: "measurement",
unit_of_measurement: "°C",
device_class: "temperature",
friendly_name: "Outdoor motion sensor Temperature",
},
},
"binary_sensor.outdoor_motion_sensor_motion": {
entity_id: "binary_sensor.outdoor_motion_sensor_motion",
state: "off",
attributes: {
device_class: "motion",
friendly_name: "Outdoor motion sensor Motion",
},
},
"sensor.outdoor_motion_sensor_illuminance": {
entity_id: "sensor.outdoor_motion_sensor_illuminance",
state: "555",
attributes: {
state_class: "measurement",
light_level: 27444,
unit_of_measurement: "lx",
device_class: "illuminance",
friendly_name: "Outdoor motion sensor Illuminance",
},
},
"automation.home_assistant_auto_update": {
entity_id: "automation.home_assistant_auto_update",
state: "off",
attributes: {
id: "1700669321947",
last_triggered: "2024-02-29T18:02:05.343139+00:00",
mode: "queued",
current: 0,
max: 50,
icon: "mdi:auto-mode",
friendly_name: "Home Assistant Auto-update",
},
},
"update.home_assistant_operating_system_update": {
entity_id: "update.home_assistant_operating_system_update",
state: "off",
attributes: {
auto_update: false,
installed_version: "12.1",
in_progress: false,
latest_version: "12.1",
release_summary: null,
release_url:
"https://github.com/home-assistant/operating-system/commits/dev",
skipped_version: null,
title: "Home Assistant Operating System",
entity_picture:
"https://brands.home-assistant.io/homeassistant/icon.png",
friendly_name: "Home Assistant Operating System Update",
supported_features: 3,
},
},
"update.home_assistant_supervisor_update": {
entity_id: "update.home_assistant_supervisor_update",
state: "off",
attributes: {
auto_update: true,
installed_version: "2024.02.2",
in_progress: false,
latest_version: "2024.02.2",
release_summary: null,
release_url:
"https://github.com/home-assistant/supervisor/commits/main",
skipped_version: null,
title: "Home Assistant Supervisor",
entity_picture: "https://brands.home-assistant.io/hassio/icon.png",
friendly_name: "Home Assistant Supervisor Update",
supported_features: 1,
},
},
"update.home_assistant_core_update": {
entity_id: "update.home_assistant_supervisor_update",
state: "off",
attributes: {
auto_update: false,
installed_version: "2024.4.0",
in_progress: false,
latest_version: "2024.4.0",
release_summary: null,
release_url: "https://github.com/home-assistant/core/commits/dev",
skipped_version: null,
title: "Home Assistant Core",
entity_picture:
"https://brands.home-assistant.io/homeassistant/icon.png",
friendly_name: "Home Assistant Core Update",
supported_features: 11,
},
},
});

View File

@@ -0,0 +1,14 @@
import { DemoConfig } from "../types";
import { demoLovelaceDescription } from "./description";
import { demoEntitiesSections } from "./entities";
import { demoLovelaceSections } from "./lovelace";
export const demoSections: DemoConfig = {
authorName: "Home Assistant",
authorUrl: "https://github.com/home-assistant/frontend/",
name: "Home Demo",
description: demoLovelaceDescription,
lovelace: demoLovelaceSections,
entities: demoEntitiesSections,
theme: () => ({}),
};

View File

@@ -0,0 +1,281 @@
import { DemoConfig } from "../types";
export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({
title: "Home Assistant Demo",
views: [
{
type: "sections",
title: "Demo",
path: "home",
icon: "mdi:home-assistant",
sections: [
{
title: "Welcome 👋",
cards: [{ type: "custom:ha-demo-card" }],
},
{
cards: [
{
type: "tile",
entity: "cover.living_room_garden_shutter",
name: "Garden",
},
{
type: "tile",
entity: "cover.living_room_graveyard_shutter",
name: "Rear",
},
{
type: "tile",
entity: "cover.living_room_left_shutter",
name: "Left",
},
{
type: "tile",
entity: "cover.living_room_right_shutter",
name: "Right",
},
{
type: "tile",
entity: "light.floor_lamp",
},
{
type: "tile",
entity: "light.living_room_spotlights",
name: "Spotlights",
features: [
{
type: "light-brightness",
},
],
},
{
type: "tile",
entity: "light.bar_lamp",
},
{
graph: "line",
type: "sensor",
entity: "sensor.living_room_temperature",
detail: 1,
name: "Temperature",
},
{
type: "tile",
entity: "media_player.living_room_nest_mini",
name: "Nest Mini",
},
],
title: "🛋️ Living room ",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "cover.kitchen_shutter",
name: "Shutter",
},
{
type: "tile",
entity: "light.kitchen_spotlights",
name: "Spotlights",
features: [
{
type: "light-brightness",
},
],
},
{
type: "tile",
entity: "light.worktop_spotlights",
name: "Worktop",
},
{
type: "tile",
entity: "binary_sensor.fridge_door",
name: "Fridge",
},
{
type: "tile",
entity: "media_player.kitchen_nest_audio",
name: "Nest Audio",
},
],
title: "👩‍🍳 Kitchen",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "binary_sensor.tesla_wall_connector_vehicle_connected",
name: "EV",
icon: "mdi:car",
},
{
type: "tile",
entity: "sensor.tesla_wall_connector_session_energy",
name: "Last charge",
color: "green",
},
{
type: "tile",
entity: "sensor.electric_meter_power",
color: "deep-orange",
name: "Home power",
},
{
type: "tile",
entity: "sensor.eletric_meter_voltage",
name: "Voltage",
color: "deep-orange",
},
{
type: "tile",
entity: "sensor.electricity_maps_grid_fossil_fuel_percentage",
name: "Fossil fuel",
color: "brown",
},
{
type: "tile",
entity: "sensor.electricity_maps_co2_intensity",
name: "CO2 Intensity",
color: "dark-grey",
},
],
title: "⚡️ Energy",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "sun.sun",
},
{
type: "tile",
entity: "sensor.rain",
color: "blue",
},
{
features: [
{
type: "target-temperature",
},
],
type: "tile",
name: "Downstairs",
entity: "climate.ground_floor",
state_content: ["preset_mode", "current_temperature"],
},
{
features: [
{
type: "target-temperature",
},
],
type: "tile",
name: "Upstairs",
entity: "climate.first_floor",
state_content: ["preset_mode", "current_temperature"],
},
],
title: "🌤️ Climate",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "cover.study_shutter",
name: "Shutter",
},
{
type: "tile",
entity: "light.study_spotlights",
name: "Spotlights",
},
{
type: "tile",
entity: "media_player.study_nest_hub",
name: "Nest Hub",
},
{
type: "tile",
entity: "sensor.standing_desk_height",
name: "Desk",
color: "brown",
icon: "mdi:desk",
},
],
title: "🧑‍💻 Study",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "light.outdoor_light",
name: "Door light",
},
{
type: "tile",
entity: "light.flood_light",
},
{
graph: "line",
type: "sensor",
entity: "sensor.outdoor_motion_sensor_temperature",
detail: 1,
name: "Temperature",
},
{
type: "tile",
entity: "binary_sensor.outdoor_motion_sensor_motion",
name: "Motion",
color: "blue",
},
{
type: "tile",
entity: "sensor.outdoor_motion_sensor_illuminance",
color: "amber",
name: "Illuminance",
},
],
title: "🌳 Outdoor",
},
{
type: "grid",
cards: [
{
type: "tile",
entity: "automation.home_assistant_auto_update",
name: "Auto-update",
color: "green",
},
{
type: "tile",
entity: "update.home_assistant_operating_system_update",
name: "OS",
icon: "mdi:home-assistant",
},
{
type: "tile",
entity: "update.home_assistant_supervisor_update",
icon: "mdi:home-assistant",
name: "Supervisor",
},
{
type: "tile",
entity: "update.home_assistant_core_update",
name: "Core",
icon: "mdi:home-assistant",
},
],
title: "🎉 Updates",
},
],
},
],
});

View File

@@ -1,3 +1,4 @@
import { TemplateResult } from "lit";
import { LocalizeFunc } from "../../../src/common/translations/localize";
import { LovelaceConfig } from "../../../src/data/lovelace/config/types";
import { Entity } from "../../../src/fake_data/entity";
@@ -7,6 +8,9 @@ export interface DemoConfig {
name: string;
authorName: string;
authorUrl: string;
description?:
| string
| ((localize: LocalizeFunc) => string | TemplateResult<1>);
lovelace: (localize: LocalizeFunc) => LovelaceConfig;
entities: (localize: LocalizeFunc) => Entity[];
theme: () => Record<string, string> | null;

View File

@@ -1,8 +1,9 @@
import "@material/mwc-button";
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { until } from "lit/directives/until";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/ha-card";
import "../../../src/components/ha-button";
import "../../../src/components/ha-circular-progress";
import { LovelaceCardConfig } from "../../../src/data/lovelace/config/card";
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
@@ -11,7 +12,6 @@ import {
demoConfigs,
selectedDemoConfig,
selectedDemoConfigIndex,
setDemoConfig,
} from "../configs/demo-configs";
@customElement("ha-demo-card")
@@ -39,38 +39,57 @@ export class HADemoCard extends LitElement implements LovelaceCard {
<div class="picker">
<div class="label">
${this._switching
? html`<ha-circular-progress
indeterminate
></ha-circular-progress>`
? html`
<ha-circular-progress indeterminate></ha-circular-progress>
`
: until(
selectedDemoConfig.then(
(conf) => html`
${conf.name}
<small>
<a target="_blank" href=${conf.authorUrl}>
${this.hass.localize(
"ui.panel.page-demo.cards.demo.demo_by",
{ name: conf.authorName }
)}
</a>
${this.hass.localize(
"ui.panel.page-demo.cards.demo.demo_by",
{
name: html`
<a target="_blank" href=${conf.authorUrl}>
${conf.authorName}
</a>
`,
}
)}
</small>
`
),
""
)}
</div>
<mwc-button @click=${this._nextConfig} .disabled=${this._switching}>
<ha-button @click=${this._nextConfig} .disabled=${this._switching}>
${this.hass.localize("ui.panel.page-demo.cards.demo.next_demo")}
</mwc-button>
</ha-button>
</div>
<div class="content small-hidden">
${this.hass.localize("ui.panel.page-demo.cards.demo.introduction")}
<div class="content">
<p class="small-hidden">
${this.hass.localize("ui.panel.page-demo.cards.demo.introduction")}
</p>
${until(
selectedDemoConfig.then((conf) => {
if (typeof conf.description === "function") {
return conf.description(this.hass.localize);
}
if (conf.description) {
return html`<p>${conf.description}</p>`;
}
return nothing;
}),
nothing
)}
</div>
<div class="actions small-hidden">
<a href="https://www.home-assistant.io" target="_blank">
<mwc-button>
<ha-button>
${this.hass.localize("ui.panel.page-demo.cards.demo.learn_more")}
</mwc-button>
</ha-button>
</a>
</div>
</ha-card>
@@ -94,13 +113,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
private async _updateConfig(index: number) {
this._switching = true;
try {
await setDemoConfig(this.hass, this.lovelace!, index);
} catch (err: any) {
alert("Failed to switch config :-(");
} finally {
this._switching = false;
}
fireEvent(this, "set-demo-config" as any, { index });
}
static get styles(): CSSResultGroup {
@@ -108,6 +121,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
css`
a {
color: var(--primary-color);
display: inline-block;
}
.actions a {
@@ -115,7 +129,11 @@ export class HADemoCard extends LitElement implements LovelaceCard {
}
.content {
padding: 16px;
padding: 0 16px;
}
.content p {
margin: 16px 0;
}
.picker {
@@ -125,7 +143,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
height: 60px;
}
.picker mwc-button {
.picker ha-button {
margin-right: 8px;
}
@@ -138,9 +156,8 @@ export class HADemoCard extends LitElement implements LovelaceCard {
}
.actions {
padding-left: 8px;
padding: 0px 8px 4px 8px;
}
@media only screen and (max-width: 500px) {
.small-hidden {
display: none;

View File

@@ -10,6 +10,7 @@ import {
import { HomeAssistantAppEl } from "../../src/layouts/home-assistant";
import { HomeAssistant } from "../../src/types";
import { selectedDemoConfig } from "./configs/demo-configs";
import { mockAreaRegistry } from "./stubs/area_registry";
import { mockAuth } from "./stubs/auth";
import { mockConfigEntries } from "./stubs/config_entries";
import { mockEnergy } from "./stubs/energy";
@@ -23,10 +24,10 @@ import { mockLovelace } from "./stubs/lovelace";
import { mockMediaPlayer } from "./stubs/media_player";
import { mockPersistentNotification } from "./stubs/persistent_notification";
import { mockRecorder } from "./stubs/recorder";
import { mockTodo } from "./stubs/todo";
import { mockSensor } from "./stubs/sensor";
import { mockSystemLog } from "./stubs/system_log";
import { mockTemplate } from "./stubs/template";
import { mockTodo } from "./stubs/todo";
import { mockTranslations } from "./stubs/translations";
@customElement("ha-demo")
@@ -62,6 +63,7 @@ export class HaDemo extends HomeAssistantAppEl {
mockEnergy(hass);
mockPersistentNotification(hass);
mockConfigEntries(hass);
mockAreaRegistry(hass);
mockEntityRegistry(hass, [
{
config_entry_id: "co2signal",
@@ -72,6 +74,8 @@ export class HaDemo extends HomeAssistantAppEl {
id: "sensor.co2_intensity",
name: null,
icon: null,
labels: [],
categories: {},
platform: "co2signal",
hidden_by: null,
entity_category: null,
@@ -88,6 +92,8 @@ export class HaDemo extends HomeAssistantAppEl {
id: "sensor.co2_intensity",
name: null,
icon: null,
labels: [],
categories: {},
platform: "co2signal",
hidden_by: null,
entity_category: null,

View File

@@ -4,4 +4,11 @@ import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockAreaRegistry = (
hass: MockHomeAssistant,
data: AreaRegistryEntry[] = []
) => hass.mockWS("config/area_registry/list", () => data);
) => {
hass.mockWS("config/area_registry/list", () => data);
const areas = {};
data.forEach((area) => {
areas[area.area_id] = area;
});
hass.updateHass({ areas });
};

View File

@@ -10,6 +10,7 @@ export const mockConfigEntries = (hass: MockHomeAssistant) => {
supports_options: false,
supports_remove_device: false,
supports_unload: true,
supports_reconfigure: true,
pref_disable_new_entities: false,
pref_disable_polling: false,
disabled_by: null,

View File

@@ -4,4 +4,11 @@ import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockDeviceRegistry = (
hass: MockHomeAssistant,
data: DeviceRegistryEntry[] = []
) => hass.mockWS("config/device_registry/list", () => data);
) => {
hass.mockWS("config/device_registry/list", () => data);
const devices = {};
data.forEach((device) => {
devices[device.id] = device;
});
hass.updateHass({ devices });
};

View File

@@ -1,4 +1,4 @@
import { format, startOfToday, startOfTomorrow } from "date-fns/esm";
import { format, startOfToday, startOfTomorrow } from "date-fns";
import {
EnergyInfo,
EnergyPreferences,

View File

@@ -0,0 +1,7 @@
import { FloorRegistryEntry } from "../../../src/data/floor_registry";
import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockFloorRegistry = (
hass: MockHomeAssistant,
data: FloorRegistryEntry[] = []
) => hass.mockWS("config/floor_registry/list", () => data);

View File

@@ -0,0 +1,7 @@
import { LabelRegistryEntry } from "../../../src/data/label_registry";
import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockLabelRegistry = (
hass: MockHomeAssistant,
data: LabelRegistryEntry[] = []
) => hass.mockWS("config/label_registry/list", () => data);

View File

@@ -1,9 +1,12 @@
import type { LocalizeFunc } from "../../../src/common/translations/localize";
import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
import { selectedDemoConfig } from "../configs/demo-configs";
import {
selectedDemoConfig,
selectedDemoConfigIndex,
setDemoConfig,
} from "../configs/demo-configs";
import "../custom-cards/cast-demo-row";
import "../custom-cards/ha-demo-card";
import type { HADemoCard } from "../custom-cards/ha-demo-card";
export const mockLovelace = (
hass: MockHomeAssistant,
@@ -19,17 +22,22 @@ export const mockLovelace = (
hass.mockWS("lovelace/resources", () => Promise.resolve([]));
};
customElements.whenDefined("hui-view").then(() => {
customElements.whenDefined("hui-root").then(() => {
// eslint-disable-next-line
const HUIView = customElements.get("hui-view");
// Patch HUI-VIEW to make the lovelace object available to the demo card
const oldCreateCard = HUIView!.prototype.createCardElement;
const HUIRoot = customElements.get("hui-root")!;
HUIView!.prototype.createCardElement = function (config) {
const el = oldCreateCard.call(this, config);
if (el.tagName === "HA-DEMO-CARD") {
(el as HADemoCard).lovelace = this.lovelace;
}
return el;
const oldFirstUpdated = HUIRoot.prototype.firstUpdated;
HUIRoot.prototype.firstUpdated = function (changedProperties) {
oldFirstUpdated.call(this, changedProperties);
this.addEventListener("set-demo-config", async (ev) => {
const index = (ev as CustomEvent).detail.index;
try {
await setDemoConfig(this.hass, this.lovelace!, index);
} catch (err: any) {
setDemoConfig(this.hass, this.lovelace!, selectedDemoConfigIndex);
alert("Failed to switch config :-(");
}
});
};
});

View File

@@ -1,7 +1,9 @@
import { load } from "js-yaml";
import { html, css, LitElement, PropertyValues } from "lit";
import { LitElement, PropertyValueMap, css, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { createCardElement } from "../../../src/panels/lovelace/create-element/create-card-element";
import memoizeOne from "memoize-one";
import "../../../src/panels/lovelace/cards/hui-card";
import type { HuiCard } from "../../../src/panels/lovelace/cards/hui-card";
import { HomeAssistant } from "../../../src/types";
export interface DemoCardConfig {
@@ -19,7 +21,12 @@ class DemoCard extends LitElement {
@state() private _size?: number;
@query("#card") private _card!: HTMLElement;
@query("hui-card", false) private _card?: HuiCard;
private _config = memoizeOne((config: string) => {
const c = (load(config) as any)[0];
return c;
});
render() {
return html`
@@ -30,63 +37,32 @@ class DemoCard extends LitElement {
: ""}
</h2>
<div class="root">
<div id="card"></div>
${this.showConfig ? html`<pre>${this.config.config.trim()}</pre>` : ""}
<hui-card
.config=${this._config(this.config.config)}
.hass=${this.hass}
@card-updated=${this._cardUpdated}
></hui-card>
${this.showConfig
? html`<pre>${this.config.config.trim()}</pre>`
: nothing}
</div>
`;
}
updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (changedProps.has("config")) {
const card = this._card;
while (card.lastChild) {
card.removeChild(card.lastChild);
}
const el = this._createCardElement((load(this.config.config) as any)[0]);
card.appendChild(el);
this._getSize(el);
}
if (changedProps.has("hass")) {
const card = this._card.lastChild;
if (card) {
(card as any).hass = this.hass;
}
}
private async _cardUpdated(ev) {
ev.stopPropagation();
this._updateSize();
}
async _getSize(el) {
await customElements.whenDefined(el.localName);
if (!("getCardSize" in el)) {
this._size = undefined;
return;
}
this._size = await el.getCardSize();
private async _updateSize() {
this._size = await this._card?.getCardSize();
}
_createCardElement(cardConfig) {
const element = createCardElement(cardConfig);
if (this.hass) {
element.hass = this.hass;
}
element.addEventListener(
"ll-rebuild",
(ev) => {
ev.stopPropagation();
this._rebuildCard(element, cardConfig);
},
{ once: true }
);
return element;
}
_rebuildCard(cardElToReplace, config) {
const newCardEl = this._createCardElement(config);
cardElToReplace.parentElement.replaceChild(newCardEl, cardElToReplace);
protected update(
_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>
): void {
super.update(_changedProperties);
this._updateSize();
}
static styles = css`
@@ -101,7 +77,7 @@ class DemoCard extends LitElement {
font-size: 0.5em;
color: var(--primary-text-color);
}
#card {
hui-card {
max-width: 400px;
width: 100vw;
}

View File

@@ -17,6 +17,7 @@ export const basicTrace: DemoTrace = {
{
path: "trigger/0",
timestamp: "2021-03-25T04:36:51.223693+00:00",
changed_variables: {},
},
],
"condition/0": [

View File

@@ -17,6 +17,7 @@ export const motionLightTrace: DemoTrace = {
{
path: "trigger/0",
timestamp: "2021-03-25T04:36:51.223693+00:00",
changed_variables: {},
},
],
"action/0": [

View File

@@ -64,6 +64,12 @@ const ACTIONS = [
entity_id: "input_boolean.toggle_4",
},
},
{
sequence: [
{ scene: "scene.kitchen_morning" },
{ service: "light.turn_off", target: { entity_id: "light.kitchen" } },
],
},
{
parallel: [
{ scene: "scene.kitchen_morning" },
@@ -136,7 +142,7 @@ export class DemoAutomationDescribeAction extends LitElement {
<div class="action">
<span>
${this._action
? describeAction(this.hass, [], this._action)
? describeAction(this.hass, [], [], [], this._action)
: "<invalid YAML>"}
</span>
<ha-yaml-editor
@@ -149,7 +155,7 @@ export class DemoAutomationDescribeAction extends LitElement {
${ACTIONS.map(
(conf) => html`
<div class="action">
<span>${describeAction(this.hass, [], conf as any)}</span>
<span>${describeAction(this.hass, [], [], [], conf as any)}</span>
<pre>${dump(conf)}</pre>
</div>
`

View File

@@ -21,10 +21,10 @@ const ENTITIES = [
}),
];
const conditions = [
{ condition: "and" },
{ condition: "not" },
{ condition: "or" },
const conditions: Condition[] = [
{ condition: "and", conditions: [] },
{ condition: "not", conditions: [] },
{ condition: "or", conditions: [] },
{ condition: "state", entity_id: "light.kitchen", state: "on" },
{
condition: "numeric_state",
@@ -34,11 +34,11 @@ const conditions = [
above: 20,
},
{ condition: "sun", after: "sunset" },
{ condition: "sun", after: "sunrise", offset: "-01:00" },
{ condition: "sun", after: "sunrise", before_offset: 3600 },
{ condition: "zone", entity_id: "device_tracker.person", zone: "zone.home" },
{ condition: "trigger", id: "motion" },
{ condition: "time" },
{ condition: "template" },
{ condition: "template", value_template: "" },
];
const initialCondition: Condition = {

View File

@@ -20,6 +20,7 @@ import { HaWaitForTriggerAction } from "../../../../src/panels/config/automation
import { HaWaitAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-wait_template";
import { Action } from "../../../../src/data/script";
import { HaConditionAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-condition";
import { HaSequenceAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-sequence";
import { HaParallelAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-parallel";
import { HaIfAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-if";
import { HaStopAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-stop";
@@ -39,6 +40,7 @@ const SCHEMAS: { name: string; actions: Action[] }[] = [
{ name: "If-Then", actions: [HaIfAction.defaultConfig] },
{ name: "Choose", actions: [HaChooseAction.defaultConfig] },
{ name: "Variables", actions: [{ variables: { hello: "1" } }] },
{ name: "Sequence", actions: [HaSequenceAction.defaultConfig] },
{ name: "Parallel", actions: [HaParallelAction.defaultConfig] },
{ name: "Stop", actions: [HaStopAction.defaultConfig] },
];

View File

@@ -55,6 +55,7 @@ export class DemoAutomationTraceTimeline extends LitElement {
super.firstUpdated(changedProps);
const hass = provideHass(this);
hass.updateTranslations(null, "en");
hass.updateTranslations("config", "en");
}
static get styles() {

View File

@@ -60,6 +60,7 @@ export class DemoAutomationTrace extends LitElement {
super.firstUpdated(changedProps);
const hass = provideHass(this);
hass.updateTranslations(null, "en");
hass.updateTranslations("config", "en");
}
static get styles() {

View File

@@ -162,7 +162,7 @@ export class DemoHaBarButton extends LitElement {
}
.custom-group {
--control-button-group-thickness: 100px;
--control-button-group-border-radius: 18px;
--control-button-group-border-radius: 36px;
--control-button-group-spacing: 20px;
}
.custom-group ha-control-button {

View File

@@ -94,7 +94,7 @@ export class DemoHarControlNumberButtons extends LitElement {
--control-number-buttons-background-color: #2196f3;
--control-number-buttons-background-opacity: 0.1;
--control-number-buttons-thickness: 100px;
--control-number-buttons-border-radius: 24px;
--control-number-buttons-border-radius: 36px;
}
`;
}

View File

@@ -186,8 +186,8 @@ export class DemoHaControlSelect extends LitElement {
.custom {
--mdc-icon-size: 24px;
--control-select-color: var(--state-fan-active-color);
--control-select-thickness: 100px;
--control-select-border-radius: 24px;
--control-select-thickness: 130px;
--control-select-border-radius: 36px;
}
.vertical-selects {
height: 300px;

View File

@@ -150,8 +150,8 @@ export class DemoHaBarSlider extends LitElement {
--control-slider-color: #ffcf4c;
--control-slider-background: #ffcf4c;
--control-slider-background-opacity: 0.2;
--control-slider-thickness: 100px;
--control-slider-border-radius: 24px;
--control-slider-thickness: 130px;
--control-slider-border-radius: 36px;
}
.vertical-sliders {
height: 300px;

View File

@@ -117,8 +117,8 @@ export class DemoHaControlSwitch extends LitElement {
.custom {
--control-switch-on-color: var(--green-color);
--control-switch-off-color: var(--red-color);
--control-switch-thickness: 100px;
--control-switch-border-radius: 24px;
--control-switch-thickness: 130px;
--control-switch-border-radius: 36px;
--control-switch-padding: 6px;
--mdc-icon-size: 24px;
}

View File

@@ -59,6 +59,7 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
{
area_id: "backyard",
@@ -77,6 +78,7 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
{
area_id: null,
@@ -95,30 +97,37 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
];
const AREAS: AreaRegistryEntry[] = [
{
area_id: "backyard",
floor_id: null,
name: "Backyard",
icon: null,
picture: null,
aliases: [],
labels: [],
},
{
area_id: "bedroom",
floor_id: null,
name: "Bedroom",
icon: "mdi:bed",
picture: null,
aliases: [],
labels: [],
},
{
area_id: "livingroom",
floor_id: null,
name: "Livingroom",
icon: "mdi:sofa",
picture: null,
aliases: [],
labels: [],
},
];

View File

@@ -17,6 +17,10 @@ import { provideHass } from "../../../../src/fake_data/provide_hass";
import { ProvideHassElement } from "../../../../src/mixins/provide-hass-lit-mixin";
import type { HomeAssistant } from "../../../../src/types";
import "../../components/demo-black-white-row";
import { FloorRegistryEntry } from "../../../../src/data/floor_registry";
import { LabelRegistryEntry } from "../../../../src/data/label_registry";
import { mockFloorRegistry } from "../../../../demo/src/stubs/floor_registry";
import { mockLabelRegistry } from "../../../../demo/src/stubs/label_registry";
const ENTITIES = [
getEntity("alarm_control_panel", "alarm", "disarmed", {
@@ -55,6 +59,7 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
{
area_id: "backyard",
@@ -73,6 +78,7 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
{
area_id: null,
@@ -91,30 +97,78 @@ const DEVICES = [
hw_version: null,
via_device_id: null,
serial_number: null,
labels: [],
},
];
const AREAS: AreaRegistryEntry[] = [
{
area_id: "backyard",
floor_id: "ground",
name: "Backyard",
icon: null,
picture: null,
aliases: [],
labels: [],
},
{
area_id: "bedroom",
floor_id: "first",
name: "Bedroom",
icon: "mdi:bed",
picture: null,
aliases: [],
labels: [],
},
{
area_id: "livingroom",
floor_id: "ground",
name: "Livingroom",
icon: "mdi:sofa",
picture: null,
aliases: [],
labels: [],
},
];
const FLOORS: FloorRegistryEntry[] = [
{
floor_id: "ground",
name: "Ground floor",
level: 0,
icon: null,
aliases: [],
},
{
floor_id: "first",
name: "First floor",
level: 1,
icon: "mdi:numeric-1",
aliases: [],
},
{
floor_id: "second",
name: "Second floor",
level: 2,
icon: "mdi:numeric-2",
aliases: [],
},
];
const LABELS: LabelRegistryEntry[] = [
{
label_id: "energy",
name: "Energy",
icon: null,
color: "yellow",
description: null,
},
{
label_id: "entertainment",
name: "Entertainment",
icon: "mdi:popcorn",
color: "blue",
description: null,
},
];
@@ -125,7 +179,12 @@ const SCHEMAS: {
{
name: "One of each",
input: {
label: { name: "Label", selector: { label: {} } },
floor: { name: "Floor", selector: { floor: {} } },
area: { name: "Area", selector: { area: {} } },
device: { name: "Device", selector: { device: {} } },
entity: { name: "Entity", selector: { entity: {} } },
target: { name: "Target", selector: { target: {} } },
state: {
name: "State",
selector: { state: { entity_id: "alarm_control_panel.alarm" } },
@@ -134,15 +193,12 @@ const SCHEMAS: {
name: "Attribute",
selector: { attribute: { entity_id: "" } },
},
device: { name: "Device", selector: { device: {} } },
config_entry: {
name: "Integration",
selector: { config_entry: {} },
},
duration: { name: "Duration", selector: { duration: {} } },
addon: { name: "Addon", selector: { addon: {} } },
area: { name: "Area", selector: { area: {} } },
target: { name: "Target", selector: { target: {} } },
number_box: {
name: "Number Box",
selector: {
@@ -291,6 +347,8 @@ const SCHEMAS: {
entity: { name: "Entity", selector: { entity: { multiple: true } } },
device: { name: "Device", selector: { device: { multiple: true } } },
area: { name: "Area", selector: { area: { multiple: true } } },
floor: { name: "Floor", selector: { floor: { multiple: true } } },
label: { name: "Label", selector: { label: { multiple: true } } },
select: {
name: "Select Multiple",
selector: {
@@ -347,6 +405,8 @@ class DemoHaSelector extends LitElement implements ProvideHassElement {
mockDeviceRegistry(hass, DEVICES);
mockConfigEntries(hass);
mockAreaRegistry(hass, AREAS);
mockFloorRegistry(hass, FLOORS);
mockLabelRegistry(hass, LABELS);
mockHassioSupervisor(hass);
hass.mockWS("auth/sign_path", (params) => params);
hass.mockWS("media_player/browse_media", this._browseMedia);

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeDateTimeNumeric extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeNumeric(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeDateTimeSeconds extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeDateTimeShortYear extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTimeWithYear(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeDateTimeShort extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatShortDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeDateTime extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatDateTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -35,59 +35,57 @@ export class DemoDateTimeDate extends LitElement {
<div class="center">Month-Day-Year</div>
<div class="center">Year-Month-Day</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.DMY,
},
demoConfig
)}
</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.MDY,
},
demoConfig
)}
</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.YMD,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.DMY,
},
demoConfig
)}
</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.MDY,
},
demoConfig
)}
</div>
<div class="center">
${formatDateNumeric(
date,
{
...defaultLocale,
language: key,
date_format: DateFormat.YMD,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeTimeSeconds extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWithSeconds(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeTimeWeekday extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTimeWeekday(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -56,48 +56,46 @@ export class DemoDateTimeTime extends LitElement {
<div class="center">12 Hours</div>
<div class="center">24 Hours</div>
</div>
${Object.entries(translationMetadata.translations)
.filter(([key, _]) => key !== "test")
.map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
${Object.entries(translationMetadata.translations).map(
([key, value]) => html`
<div class="container">
<div>${value.nativeName}</div>
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.language,
},
demoConfig
)}
</div>
`
)}
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.am_pm,
},
demoConfig
)}
</div>
<div class="center">
${formatTime(
this.date,
{
...defaultLocale,
language: key,
time_format: TimeFormat.twenty_four,
},
demoConfig
)}
</div>
</div>
`
)}
</mwc-list>
`;
}

View File

@@ -11,7 +11,7 @@ const ENTITIES = [
latitude: 32.877105,
longitude: 117.232185,
gps_accuracy: 91,
battery: 71,
battery: 25,
friendly_name: "Paulus",
}),
getEntity("device_tracker", "demo_anne_therese", "school", {
@@ -19,7 +19,7 @@ const ENTITIES = [
latitude: 32.877105,
longitude: 117.232185,
gps_accuracy: 91,
battery: 71,
battery: 50,
friendly_name: "Anne Therese",
}),
getEntity("device_tracker", "demo_home_boy", "home", {
@@ -27,7 +27,7 @@ const ENTITIES = [
latitude: 32.877105,
longitude: 117.232185,
gps_accuracy: 91,
battery: 71,
battery: 75,
friendly_name: "Home Boy",
}),
getEntity("light", "bed_light", "on", {
@@ -39,21 +39,53 @@ const ENTITIES = [
getEntity("light", "ceiling_lights", "off", {
friendly_name: "Ceiling Lights",
}),
getEntity("sensor", "battery_1", 20, {
device_class: "battery",
friendly_name: "Battery 1",
unit_of_measurement: "%",
}),
getEntity("sensor", "battery_2", 35, {
device_class: "battery",
friendly_name: "Battery 2",
unit_of_measurement: "%",
}),
getEntity("sensor", "battery_3", 40, {
device_class: "battery",
friendly_name: "Battery 3",
unit_of_measurement: "%",
}),
getEntity("sensor", "battery_4", 80, {
device_class: "battery",
friendly_name: "Battery 4",
unit_of_measurement: "%",
}),
getEntity("input_number", "min_battery_level", 30, {
mode: "slider",
step: 10,
min: 0,
max: 100,
icon: "mdi:battery-alert-variant",
friendly_name: "Minimum Battery Level",
unit_of_measurement: "%",
}),
];
const CONFIGS = [
{
heading: "Unfiltered controller",
heading: "Unfiltered entities",
config: `
- type: entities
entities:
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
- device_tracker.demo_anne_therese
- device_tracker.demo_home_boy
- device_tracker.demo_paulus
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
`,
},
{
heading: "Filtered entities card",
heading: "On and home entities",
config: `
- type: entity-filter
entities:
@@ -63,9 +95,28 @@ const CONFIGS = [
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
state_filter:
- "on"
- home
conditions:
- condition: state
state:
- "on"
- home
`,
},
{
heading: "Same state as Bed Light",
config: `
- type: entity-filter
entities:
- device_tracker.demo_anne_therese
- device_tracker.demo_home_boy
- device_tracker.demo_paulus
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
conditions:
- condition: state
state:
- light.bed_light
`,
},
{
@@ -79,9 +130,11 @@ const CONFIGS = [
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
state_filter:
- "on"
- not_home
conditions:
- condition: state
state:
- "on"
- home
card:
type: entities
title: Custom Title
@@ -99,15 +152,101 @@ const CONFIGS = [
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
state_filter:
- "on"
- not_home
conditions:
- condition: state
state:
- "on"
- home
card:
type: glance
show_state: true
title: Custom Title
`,
},
{
heading:
"Filtered entities by battery attribute (< '30') using state filter",
config: `
- type: entity-filter
entities:
- device_tracker.demo_anne_therese
- device_tracker.demo_home_boy
- device_tracker.demo_paulus
state_filter:
- operator: <
attribute: battery
value: "30"
`,
},
{
heading: "Unfiltered number entities",
config: `
- type: entities
entities:
- input_number.min_battery_level
- sensor.battery_1
- sensor.battery_3
- sensor.battery_2
- sensor.battery_4
`,
},
{
heading: "Battery lower than 50%",
config: `
- type: entity-filter
entities:
- sensor.battery_1
- sensor.battery_3
- sensor.battery_2
- sensor.battery_4
conditions:
- condition: numeric_state
below: 50
`,
},
{
heading: "Battery lower than min battery level",
config: `
- type: entity-filter
entities:
- sensor.battery_1
- sensor.battery_3
- sensor.battery_2
- sensor.battery_4
conditions:
- condition: numeric_state
below: input_number.min_battery_level
`,
},
{
heading: "Battery between min battery level and 70%",
config: `
- type: entity-filter
entities:
- sensor.battery_1
- sensor.battery_3
- sensor.battery_2
- sensor.battery_4
conditions:
- condition: numeric_state
above: input_number.min_battery_level
below: 70
`,
},
{
heading: "Error: Entities must be specified",
config: `
- type: entity-filter
`,
},
{
heading: "Error: Incorrect filter config",
config: `
- type: entity-filter
entities:
- sensor.gas_station_lowest_price
`,
},
];
@customElement("demo-lovelace-entity-filter-card")

View File

@@ -36,6 +36,45 @@ const ENTITIES = [
friendly_name: "Nest",
supported_features: 43,
}),
getEntity("climate", "overkiz_radiator", "heat", {
current_temperature: 18,
min_temp: 7,
max_temp: 35,
temperature: 20,
hvac_modes: ["heat", "auto", "off"],
friendly_name: "Overkiz radiator",
supported_features: 17,
preset_mode: "comfort",
preset_modes: [
"none",
"frost_protection",
"eco",
"comfort",
"comfort-1",
"comfort-2",
"auto",
"boost",
"external",
"prog",
],
}),
getEntity("climate", "overkiz_towel_dryer", "heat", {
current_temperature: null,
min_temp: 7,
max_temp: 35,
hvac_modes: ["heat", "off"],
friendly_name: "Overkiz towel dryer",
supported_features: 16,
preset_mode: "eco",
preset_modes: [
"none",
"frost_protection",
"eco",
"comfort",
"comfort-1",
"comfort-2",
],
}),
getEntity("climate", "sensibo", "fan_only", {
current_temperature: null,
temperature: null,
@@ -46,7 +85,9 @@ const ENTITIES = [
friendly_name: "Sensibo purifier",
fan_modes: ["low", "high"],
fan_mode: "low",
supported_features: 9,
swing_modes: ["on", "off", "both", "vertical", "horizontal"],
swing_mode: "vertical",
supported_features: 41,
}),
getEntity("climate", "unavailable", "unavailable", {
supported_features: 43,
@@ -59,8 +100,6 @@ const CONFIGS = [
config: `
- type: thermostat
entity: climate.ecobee
- type: thermostat
entity: climate.nest
`,
},
{
@@ -70,6 +109,66 @@ const CONFIGS = [
entity: climate.nest
`,
},
{
heading: "Feature example",
config: `
- type: thermostat
entity: climate.overkiz_radiator
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- 'off'
- auto
- type: climate-preset-modes
style: icons
preset_modes:
- none
- frost_protection
- eco
- comfort
- comfort-1
- comfort-2
- auto
- boost
- external
- prog
- type: climate-preset-modes
style: dropdown
preset_modes:
- none
- frost_protection
- eco
- comfort
- comfort-1
- comfort-2
- auto
- boost
- external
- prog
`,
},
{
heading: "Preset only example",
config: `
- type: thermostat
entity: climate.overkiz_towel_dryer
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- 'off'
- type: climate-preset-modes
style: icons
preset_modes:
- none
- frost_protection
- eco
- comfort
- comfort-1
- comfort-2
`,
},
{
heading: "Fan only example",
config: `
@@ -85,6 +184,14 @@ const CONFIGS = [
fan_modes:
- low
- high
- type: climate-swing-modes
style: icons
swing_modes:
- 'on'
- 'off'
- 'both'
- 'vertical'
- 'horizontal'
`,
},
{

View File

@@ -2,6 +2,7 @@ import { html, LitElement, PropertyValues, TemplateResult } from "lit";
import { customElement, query } from "lit/decorators";
import { CoverEntityFeature } from "../../../../src/data/cover";
import { LightColorMode } from "../../../../src/data/light";
import { LockEntityFeature } from "../../../../src/data/lock";
import { VacuumEntityFeature } from "../../../../src/data/vacuum";
import { getEntity } from "../../../../src/fake_data/entity";
import { provideHass } from "../../../../src/fake_data/provide_hass";
@@ -20,6 +21,11 @@ const ENTITIES = [
getEntity("light", "unavailable", "unavailable", {
friendly_name: "Unavailable entity",
}),
getEntity("lock", "front_door", "locked", {
friendly_name: "Front Door Lock",
device_class: "lock",
supported_features: LockEntityFeature.OPEN,
}),
getEntity("climate", "thermostat", "heat", {
current_temperature: 73,
min_temp: 45,
@@ -138,6 +144,24 @@ const CONFIGS = [
- type: "color-temp"
`,
},
{
heading: "Lock commands feature",
config: `
- type: tile
entity: lock.front_door
features:
- type: "lock-commands"
`,
},
{
heading: "Lock open door feature",
config: `
- type: tile
entity: lock.front_door
features:
- type: "lock-open-door"
`,
},
{
heading: "Vacuum commands feature",
config: `

View File

@@ -368,6 +368,7 @@ export class DemoEntityState extends LitElement {
hass.localize,
entry.stateObj,
hass.locale,
[], // numericDeviceClasses
hass.config,
hass.entities
)}`,
@@ -406,6 +407,7 @@ export class DemoEntityState extends LitElement {
entity_id: "select.speed",
translation_key: "speed",
platform: "demo",
labels: [],
},
},
});

View File

@@ -31,10 +31,13 @@ const createConfigEntry = (
supports_options: false,
supports_remove_device: false,
supports_unload: true,
supports_reconfigure: true,
disabled_by: null,
pref_disable_new_entities: false,
pref_disable_polling: false,
reason: null,
error_reason_translation_key: null,
error_reason_translation_placeholders: null,
...override,
});
@@ -198,6 +201,8 @@ const createEntityRegistryEntries = (
has_entity_name: false,
unique_id: "updater",
options: null,
labels: [],
categories: {},
},
];
@@ -221,6 +226,7 @@ const createDeviceRegistryEntries = (
name_by_user: null,
disabled_by: null,
configuration_url: null,
labels: [],
},
];

View File

@@ -11,7 +11,7 @@ import "../../components/demo-more-infos";
import { ClimateEntityFeature } from "../../../../src/data/climate";
const ENTITIES = [
getEntity("climate", "thermostat", "heat", {
getEntity("climate", "radiator", "heat", {
friendly_name: "Basic heater",
hvac_modes: ["heat", "off"],
hvac_mode: "heat",
@@ -80,6 +80,24 @@ const ENTITIES = [
max_humidity: 100,
humidity: 50,
}),
getEntity("climate", "towel_dryer", "heat", {
friendly_name: "Preset only heater",
hvac_modes: ["heat", "off"],
hvac_mode: "heat",
preset_modes: [
"none",
"frost_protection",
"eco",
"comfort",
"comfort-1",
"comfort-2",
],
preset_mode: "eco",
current_temperature: null,
min_temp: 7,
max_temp: 35,
supported_features: ClimateEntityFeature.PRESET_MODE,
}),
getEntity("climate", "unavailable", "unavailable", {
friendly_name: "Unavailable heater",
hvac_modes: ["heat", "off"],

View File

@@ -1,4 +1,7 @@
import { globIterate } from "glob";
import { availableParallelism } from "node:os";
process.env.UV_THREADPOOL_SIZE = availableParallelism();
const gulpImports = [];

View File

@@ -1263,6 +1263,7 @@ class HassioAddonInfo extends LitElement {
.card-actions {
justify-content: space-between;
display: flex;
direction: var(--direction);
}
.changelog {
display: contents;

View File

@@ -1,6 +1,8 @@
import Fuse from "fuse.js";
import type { IFuseOptions } from "fuse.js";
import Fuse from "fuse.js";
import { stripDiacritics } from "../../../src/common/string/strip-diacritics";
import { StoreAddon } from "../../../src/data/supervisor/store";
import { getStripDiacriticsFn } from "../../../src/util/fuse";
export function filterAndSort(addons: StoreAddon[], filter: string) {
const options: IFuseOptions<StoreAddon> = {
@@ -8,7 +10,8 @@ export function filterAndSort(addons: StoreAddon[], filter: string) {
isCaseSensitive: false,
minMatchCharLength: Math.min(filter.length, 2),
threshold: 0.2,
getFn: getStripDiacriticsFn,
};
const fuse = new Fuse(addons, options);
return fuse.search(filter).map((result) => result.item);
return fuse.search(stripDiacritics(filter)).map((result) => result.item);
}

View File

@@ -1,19 +1,19 @@
import { mdiStorePlus, mdiUpdate } from "@mdi/js";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { mdiRefresh, mdiStorePlus } from "@mdi/js";
import { CSSResultGroup, LitElement, TemplateResult, css, html } from "lit";
import { customElement, property } from "lit/decorators";
import { atLeastVersion } from "../../../src/common/config/version";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/ha-fab";
import { reloadHassioAddons } from "../../../src/data/hassio/addon";
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
import { Supervisor } from "../../../src/data/supervisor/supervisor";
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
import "../../../src/layouts/hass-subpage";
import "../../../src/layouts/hass-tabs-subpage";
import { haStyle } from "../../../src/resources/styles";
import { HomeAssistant, Route } from "../../../src/types";
import { supervisorTabs } from "../hassio-tabs";
import "./hassio-addons";
import "../../../src/layouts/hass-subpage";
import { reloadHassioAddons } from "../../../src/data/hassio/addon";
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
import { fireEvent } from "../../../src/common/dom/fire_event";
@customElement("hassio-dashboard")
class HassioDashboard extends LitElement {
@@ -43,7 +43,7 @@ class HassioDashboard extends LitElement {
<ha-icon-button
slot="toolbar-icon"
@click=${this._handleCheckUpdates}
.path=${mdiUpdate}
.path=${mdiRefresh}
.label=${this.supervisor.localize("store.check_updates")}
></ha-icon-button>
<hassio-addons

View File

@@ -154,12 +154,16 @@ class HassioHardwareDialog extends LitElement {
ha-icon-button {
position: absolute;
right: 16px;
inset-inline-end: 16px;
inset-inline-start: initial;
top: 10px;
text-decoration: none;
color: var(--primary-text-color);
}
h2 {
margin: 18px 42px 0 18px;
margin-inline-start: 18px;
margin-inline-end: 42px;
color: var(--primary-text-color);
}

View File

@@ -1,7 +1,5 @@
import "@material/mwc-button/mwc-button";
import { mdiDelete, mdiDeleteOff } from "@mdi/js";
import "@polymer/paper-item/paper-item";
import "@polymer/paper-item/paper-item-body";
import "@lrnwebcomponents/simple-tooltip/simple-tooltip";
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
@@ -27,6 +25,8 @@ import type { HomeAssistant } from "../../../../src/types";
import { HassioRepositoryDialogParams } from "./show-dialog-repositories";
import type { HaTextField } from "../../../../src/components/ha-textfield";
import "../../../../src/components/ha-textfield";
import "../../../../src/components/ha-list-new";
import "../../../../src/components/ha-list-item-new";
@customElement("dialog-hassio-repositories")
class HassioRepositoriesDialog extends LitElement {
@@ -106,44 +106,46 @@ class HassioRepositoriesDialog extends LitElement {
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
: ""}
<div class="form">
${repositories.length
? repositories.map(
(repo) => html`
<paper-item class="option">
<paper-item-body three-line>
<div>${repo.name}</div>
<div secondary>${repo.maintainer}</div>
<div secondary>${repo.url}</div>
</paper-item-body>
<div class="delete">
<ha-icon-button
.label=${this._dialogParams!.supervisor.localize(
"dialog.repositories.remove"
)}
.disabled=${usedRepositories.includes(repo.slug)}
.slug=${repo.slug}
.path=${usedRepositories.includes(repo.slug)
? mdiDeleteOff
: mdiDelete}
@click=${this._removeRepository}
>
</ha-icon-button>
<simple-tooltip
animation-delay="0"
position="bottom"
offset="1"
>
${this._dialogParams!.supervisor.localize(
usedRepositories.includes(repo.slug)
? "dialog.repositories.used"
: "dialog.repositories.remove"
)}
</simple-tooltip>
</div>
</paper-item>
`
)
: html`<paper-item> No repositories </paper-item>`}
<ha-list-new>
${repositories.length
? repositories.map(
(repo) => html`
<ha-list-item-new class="option">
${repo.name}
<div slot="supporting-text">
<div>${repo.maintainer}</div>
<div>${repo.url}</div>
</div>
<div class="delete" slot="end">
<ha-icon-button
.label=${this._dialogParams!.supervisor.localize(
"dialog.repositories.remove"
)}
.disabled=${usedRepositories.includes(repo.slug)}
.slug=${repo.slug}
.path=${usedRepositories.includes(repo.slug)
? mdiDeleteOff
: mdiDelete}
@click=${this._removeRepository}
>
</ha-icon-button>
<simple-tooltip
animation-delay="0"
position="bottom"
offset="1"
>
${this._dialogParams!.supervisor.localize(
usedRepositories.includes(repo.slug)
? "dialog.repositories.used"
: "dialog.repositories.remove"
)}
</simple-tooltip>
</div>
</ha-list-item-new>
`
)
: html`<ha-list-item-new> No repositories </ha-list-item-new>`}
</ha-list-new>
<div class="layout horizontal bottom">
<ha-textfield
class="flex-auto"
@@ -206,6 +208,9 @@ class HassioRepositoriesDialog extends LitElement {
div.delete ha-icon-button {
color: var(--error-color);
}
ha-list-item-new {
position: relative;
}
`,
];
}

View File

@@ -25,36 +25,36 @@
"license": "Apache-2.0",
"type": "module",
"dependencies": {
"@babel/runtime": "7.23.9",
"@braintree/sanitize-url": "7.0.0",
"@codemirror/autocomplete": "6.12.0",
"@codemirror/commands": "6.3.3",
"@codemirror/language": "6.10.1",
"@codemirror/legacy-modes": "6.3.3",
"@babel/runtime": "7.24.7",
"@braintree/sanitize-url": "7.0.3",
"@codemirror/autocomplete": "6.16.3",
"@codemirror/commands": "6.6.0",
"@codemirror/language": "6.10.2",
"@codemirror/legacy-modes": "6.4.0",
"@codemirror/search": "6.5.6",
"@codemirror/state": "6.4.0",
"@codemirror/view": "6.24.0",
"@codemirror/state": "6.4.1",
"@codemirror/view": "6.28.2",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.12.2",
"@formatjs/intl-displaynames": "6.6.6",
"@formatjs/intl-datetimeformat": "6.12.5",
"@formatjs/intl-displaynames": "6.6.8",
"@formatjs/intl-getcanonicallocales": "2.3.0",
"@formatjs/intl-listformat": "7.5.5",
"@formatjs/intl-locale": "3.4.5",
"@formatjs/intl-numberformat": "8.10.0",
"@formatjs/intl-pluralrules": "5.2.12",
"@formatjs/intl-relativetimeformat": "11.2.12",
"@fullcalendar/core": "6.1.10",
"@fullcalendar/daygrid": "6.1.10",
"@fullcalendar/interaction": "6.1.10",
"@fullcalendar/list": "6.1.10",
"@fullcalendar/luxon3": "6.1.10",
"@fullcalendar/timegrid": "6.1.10",
"@formatjs/intl-listformat": "7.5.7",
"@formatjs/intl-locale": "4.0.0",
"@formatjs/intl-numberformat": "8.10.3",
"@formatjs/intl-pluralrules": "5.2.14",
"@formatjs/intl-relativetimeformat": "11.2.14",
"@fullcalendar/core": "6.1.11",
"@fullcalendar/daygrid": "6.1.11",
"@fullcalendar/interaction": "6.1.11",
"@fullcalendar/list": "6.1.11",
"@fullcalendar/luxon3": "6.1.11",
"@fullcalendar/timegrid": "6.1.11",
"@lezer/highlight": "1.2.0",
"@lit-labs/context": "0.4.1",
"@lit-labs/motion": "1.0.7",
"@lit-labs/observers": "2.0.2",
"@lit-labs/virtualizer": "2.0.12",
"@lrnwebcomponents/simple-tooltip": "patch:@lrnwebcomponents/simple-tooltip@npm%3A8.0.0#~/.yarn/patches/@lrnwebcomponents-simple-tooltip-npm-8.0.0-77591f2e0c.patch",
"@lit-labs/virtualizer": "2.0.13",
"@lrnwebcomponents/simple-tooltip": "8.0.2",
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
"@material/mwc-base": "0.27.0",
@@ -70,8 +70,8 @@
"@material/mwc-list": "0.27.0",
"@material/mwc-menu": "0.27.0",
"@material/mwc-radio": "0.27.0",
"@material/mwc-ripple": "0.27.0",
"@material/mwc-select": "0.27.0",
"@material/mwc-snackbar": "0.27.0",
"@material/mwc-switch": "0.27.0",
"@material/mwc-tab": "0.27.0",
"@material/mwc-tab-bar": "0.27.0",
@@ -80,17 +80,16 @@
"@material/mwc-top-app-bar": "0.27.0",
"@material/mwc-top-app-bar-fixed": "0.27.0",
"@material/top-app-bar": "=14.0.0-canary.53b3cad2f.0",
"@material/web": "=1.2.0",
"@material/web": "1.5.0",
"@mdi/js": "7.4.47",
"@mdi/svg": "7.4.47",
"@polymer/paper-item": "3.0.1",
"@polymer/paper-listbox": "3.0.1",
"@polymer/paper-tabs": "3.1.0",
"@polymer/paper-toast": "3.0.1",
"@polymer/polymer": "3.5.1",
"@thomasloven/round-slider": "0.6.0",
"@vaadin/combo-box": "24.3.6",
"@vaadin/vaadin-themable-mixin": "24.3.6",
"@vaadin/combo-box": "24.4.0",
"@vaadin/vaadin-themable-mixin": "24.4.0",
"@vibrant/color": "3.2.1-alpha.1",
"@vibrant/core": "3.2.1-alpha.1",
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
@@ -98,27 +97,28 @@
"@webcomponents/scoped-custom-element-registry": "0.0.9",
"@webcomponents/webcomponentsjs": "2.8.0",
"app-datepicker": "5.1.1",
"chart.js": "4.4.1",
"chart.js": "4.4.3",
"color-name": "2.0.0",
"comlink": "4.4.1",
"core-js": "3.36.0",
"cropperjs": "1.6.1",
"date-fns": "2.30.0",
"date-fns-tz": "2.0.0",
"core-js": "3.37.1",
"cropperjs": "1.6.2",
"date-fns": "3.6.0",
"date-fns-tz": "3.1.3",
"deep-clone-simple": "1.1.1",
"deep-freeze": "0.0.1",
"element-internals-polyfill": "1.3.10",
"element-internals-polyfill": "1.3.11",
"fuse.js": "7.0.0",
"google-timezones-json": "1.2.0",
"hls.js": "1.5.5",
"home-assistant-js-websocket": "9.1.0",
"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.5.11",
"intl-messageformat": "10.5.14",
"js-yaml": "4.1.0",
"leaflet": "1.9.4",
"leaflet-draw": "1.0.4",
"lit": "2.8.0",
"luxon": "3.4.4",
"marked": "12.0.0",
"marked": "12.0.2",
"memoize-one": "6.0.0",
"node-vibrant": "3.2.1-alpha.1",
"proxy-polyfill": "0.3.2",
@@ -129,127 +129,122 @@
"rrule": "2.8.1",
"sortablejs": "1.15.2",
"stacktrace-js": "2.0.2",
"superstruct": "1.0.3",
"superstruct": "1.0.4",
"tinykeys": "2.1.0",
"tsparticles-engine": "2.12.0",
"tsparticles-preset-links": "2.12.0",
"ua-parser-js": "1.0.37",
"ua-parser-js": "1.0.38",
"unfetch": "5.0.0",
"vis-data": "7.1.9",
"vis-network": "9.1.9",
"vue": "2.7.16",
"vue2-daterange-picker": "0.6.8",
"weekstart": "2.0.0",
"workbox-cacheable-response": "7.0.0",
"workbox-core": "7.0.0",
"workbox-expiration": "7.0.0",
"workbox-precaching": "7.0.0",
"workbox-routing": "7.0.0",
"workbox-strategies": "7.0.0",
"xss": "1.0.14"
"workbox-cacheable-response": "7.1.0",
"workbox-core": "7.1.0",
"workbox-expiration": "7.1.0",
"workbox-precaching": "7.1.0",
"workbox-routing": "7.1.0",
"workbox-strategies": "7.1.0",
"xss": "1.0.15"
},
"devDependencies": {
"@babel/core": "7.23.9",
"@babel/helper-define-polyfill-provider": "0.5.0",
"@babel/plugin-proposal-decorators": "7.23.9",
"@babel/plugin-transform-runtime": "7.23.9",
"@babel/preset-env": "7.23.9",
"@babel/preset-typescript": "7.23.3",
"@bundle-stats/plugin-webpack-filter": "4.10.0",
"@babel/core": "7.24.7",
"@babel/helper-define-polyfill-provider": "0.6.2",
"@babel/plugin-proposal-decorators": "7.24.7",
"@babel/plugin-transform-runtime": "7.24.7",
"@babel/preset-env": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@bundle-stats/plugin-webpack-filter": "4.13.2",
"@koa/cors": "5.0.0",
"@lokalise/node-api": "12.1.0",
"@octokit/auth-oauth-device": "6.0.1",
"@octokit/plugin-retry": "6.0.1",
"@octokit/rest": "20.0.2",
"@lokalise/node-api": "12.5.0",
"@octokit/auth-oauth-device": "7.1.1",
"@octokit/plugin-retry": "7.1.1",
"@octokit/rest": "21.0.0",
"@open-wc/dev-server-hmr": "0.1.4",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-commonjs": "26.0.1",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-replace": "5.0.5",
"@rollup/plugin-replace": "5.0.7",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "6.0.13",
"@types/chromecast-caf-sender": "1.0.8",
"@types/chromecast-caf-receiver": "6.0.16",
"@types/chromecast-caf-sender": "1.0.10",
"@types/color-name": "1.1.4",
"@types/glob": "8.1.0",
"@types/gulp-if": "^3",
"@types/html-minifier-terser": "7.0.2",
"@types/js-yaml": "4.0.9",
"@types/leaflet": "1.9.8",
"@types/leaflet": "1.9.12",
"@types/leaflet-draw": "1.0.11",
"@types/lodash.merge": "4.6.9",
"@types/luxon": "3.4.2",
"@types/mocha": "10.0.6",
"@types/mocha": "10.0.7",
"@types/qrcode": "1.5.5",
"@types/serve-handler": "6.1.4",
"@types/sortablejs": "1.15.7",
"@types/tar": "6.1.11",
"@types/sortablejs": "1.15.8",
"@types/tar": "6.1.13",
"@types/ua-parser-js": "0.7.39",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1",
"@typescript-eslint/eslint-plugin": "7.13.1",
"@typescript-eslint/parser": "7.13.1",
"@web/dev-server": "0.1.38",
"@web/dev-server-rollup": "0.4.1",
"babel-loader": "9.1.3",
"babel-plugin-template-html-minifier": "4.1.0",
"chai": "5.1.0",
"chai": "5.1.1",
"del": "7.1.0",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-webpack": "0.13.8",
"eslint-plugin-disable": "2.0.3",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-lit": "1.11.0",
"eslint-plugin-lit": "1.14.0",
"eslint-plugin-lit-a11y": "4.1.2",
"eslint-plugin-unused-imports": "3.1.0",
"eslint-plugin-wc": "2.0.4",
"eslint-plugin-unused-imports": "4.0.0",
"eslint-plugin-wc": "2.1.0",
"fancy-log": "2.0.0",
"fs-extra": "11.2.0",
"glob": "10.3.10",
"gulp": "4.0.2",
"gulp-flatmap": "1.0.2",
"gulp-if": "3.0.0",
"gulp-json-transform": "0.4.8",
"gulp-merge-json": "2.1.2",
"glob": "10.4.2",
"gulp": "5.0.0",
"gulp-json-transform": "0.5.0",
"gulp-rename": "2.0.0",
"gulp-zopfli-green": "6.0.1",
"html-minifier-terser": "7.2.0",
"husky": "9.0.11",
"instant-mocha": "1.5.2",
"jszip": "3.10.1",
"lint-staged": "15.2.2",
"lint-staged": "15.2.7",
"lit-analyzer": "2.0.3",
"lodash.merge": "4.6.2",
"lodash.template": "4.5.0",
"magic-string": "0.30.7",
"magic-string": "0.30.10",
"map-stream": "0.0.7",
"mocha": "10.3.0",
"mocha": "10.4.0",
"object-hash": "3.0.0",
"open": "10.0.3",
"open": "10.1.0",
"pinst": "3.0.0",
"prettier": "3.2.5",
"prettier": "3.3.2",
"rollup": "2.79.1",
"rollup-plugin-string": "3.0.0",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-visualizer": "5.12.0",
"serve-handler": "6.1.5",
"sinon": "17.0.1",
"sinon": "18.0.0",
"source-map-url": "0.4.1",
"systemjs": "6.14.3",
"tar": "6.2.0",
"systemjs": "6.15.1",
"tar": "7.4.0",
"terser-webpack-plugin": "5.3.10",
"transform-async-modules-webpack-plugin": "1.0.2",
"transform-async-modules-webpack-plugin": "1.1.1",
"ts-lit-plugin": "2.0.2",
"typescript": "5.3.3",
"vinyl-buffer": "1.0.1",
"vinyl-paths": "5.0.0",
"vinyl-source-stream": "2.0.0",
"webpack": "5.90.2",
"typescript": "5.5.2",
"webpack": "5.92.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-dev-server": "5.0.4",
"webpack-manifest-plugin": "5.0.0",
"webpack-stats-plugin": "1.1.3",
"webpackbar": "6.0.0",
"workbox-build": "7.0.0"
"webpackbar": "6.0.1",
"workbox-build": "7.1.1"
},
"_comment": "Polymer 3.2 contained a bug, fixed in https://github.com/Polymer/polymer/pull/5569, add as patch",
"resolutions": {
@@ -258,8 +253,9 @@
"lit": "2.8.0",
"clean-css": "5.3.3",
"@lit/reactive-element": "1.6.3",
"@fullcalendar/daygrid": "6.1.11",
"sortablejs@1.15.2": "patch:sortablejs@npm%3A1.15.2#~/.yarn/patches/sortablejs-npm-1.15.2-73347ae85a.patch",
"leaflet-draw@1.0.4": "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch"
},
"packageManager": "yarn@4.1.0"
"packageManager": "yarn@4.3.1"
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,3 @@
<svg width="1200" height="1227" viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 430 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 52 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20240207.0"
version = "20240627.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.10.0"
requires-python = ">=3.11.0"
[project.urls]
"Homepage" = "https://github.com/home-assistant/frontend"

View File

@@ -40,6 +40,11 @@
"matchPackageNames": ["tsparticles-engine"],
"matchPackagePrefixes": ["tsparticles-preset-"]
},
{
"description": "Group date-fns with dependent timezone package",
"groupName": "date-fns",
"matchPackageNames": ["date-fns", "date-fns-tz"]
},
{
"description": "Group and temporarily disable WDS packages",
"groupName": "Web Dev Server",

View File

@@ -1,3 +1,5 @@
import { theme2hex } from "./convert-color";
export const COLORS = [
"#44739e",
"#984ea3",
@@ -65,10 +67,10 @@ export function getColorByIndex(index: number) {
export function getGraphColorByIndex(
index: number,
style: CSSStyleDeclaration
) {
): string {
// The CSS vars for the colors use range 1..n, so we need to adjust the index from the internal 0..n color index range.
return (
const themeColor =
style.getPropertyValue(`--graph-color-${index + 1}`) ||
getColorByIndex(index)
);
getColorByIndex(index);
return theme2hex(themeColor);
}

View File

@@ -1,3 +1,4 @@
import colors from "color-name";
import { expandHex } from "./hex";
const rgb_hex = (component: number): string => {
@@ -126,3 +127,18 @@ export const rgb2hs = (rgb: [number, number, number]): [number, number] =>
export const hs2rgb = (hs: [number, number]): [number, number, number] =>
hsv2rgb([hs[0], hs[1], 255]);
export function theme2hex(themeColor: string): string {
if (themeColor.startsWith("#")) {
return themeColor;
}
const rgbFromColorName = colors[themeColor];
if (!rgbFromColorName) {
// We have a named color, and there's nothing in the table,
// so nothing further we can do with it.
// Compare/border/background color will all be the same.
return themeColor;
}
return rgb2hex(rgbFromColorName);
}

View File

@@ -1,19 +1,25 @@
import { PageNavigation } from "../../layouts/hass-tabs-subpage";
import { HomeAssistant } from "../../types";
import { ensureArray } from "../array/ensure-array";
import { isComponentLoaded } from "./is_component_loaded";
export const canShowPage = (hass: HomeAssistant, page: PageNavigation) =>
(isCore(page) || isLoadedIntegration(hass, page)) &&
!hideAdvancedPage(hass, page);
!hideAdvancedPage(hass, page) &&
isNotLoadedIntegration(hass, page);
const isLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) =>
page.component
? isComponentLoaded(hass, page.component)
: page.components
? page.components.some((integration) =>
isComponentLoaded(hass, integration)
)
: true;
!page.component ||
ensureArray(page.component).some((integration) =>
isComponentLoaded(hass, integration)
);
const isNotLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) =>
!page.not_component ||
!ensureArray(page.not_component).some((integration) =>
isComponentLoaded(hass, integration)
);
const isCore = (page: PageNavigation) => page.core;
const isAdvancedPage = (page: PageNavigation) => page.advancedOnly;
const userWantsAdvanced = (hass: HomeAssistant) => hass.userData?.showAdvanced;

View File

@@ -31,6 +31,7 @@ import {
mdiFormatListBulleted,
mdiFormatListCheckbox,
mdiFormTextbox,
mdiForumOutline,
mdiGauge,
mdiGoogleAssistant,
mdiGoogleCirclesCommunities,
@@ -98,7 +99,7 @@ export const FIXED_DOMAIN_ICONS = {
calendar: mdiCalendar,
climate: mdiThermostat,
configurator: mdiCog,
conversation: mdiMicrophoneMessage,
conversation: mdiForumOutline,
counter: mdiCounter,
date: mdiCalendar,
datetime: mdiCalendarClock,
@@ -231,9 +232,12 @@ export const SENSOR_ENTITIES = [
"calendar",
"camera",
"device_tracker",
"image",
"weather",
];
export const ASSIST_ENTITIES = ["conversation", "stt", "tts"];
/** Domains that render an input element instead of a text value when displayed in a row.
* Those rows should then not show a cursor pointer when hovered (which would normally
* be the default) unless the element itself enforces it (e.g. a button). Also those elements

View File

@@ -1,4 +1,4 @@
import { utcToZonedTime, zonedTimeToUtc } from "date-fns-tz";
import { toZonedTime, fromZonedTime } from "date-fns-tz";
import { HassConfig } from "home-assistant-js-websocket";
import { FrontendLocaleData, TimeZone } from "../../data/translation";
@@ -8,10 +8,10 @@ const calcZonedDate = (
fn: (date: Date, options?: any) => Date | number | boolean,
options?
) => {
const inputZoned = utcToZonedTime(date, tz);
const inputZoned = toZonedTime(date, tz);
const fnZoned = fn(inputZoned, options);
if (fnZoned instanceof Date) {
return zonedTimeToUtc(fnZoned, tz) as Date;
return fromZonedTime(fnZoned, tz) as Date;
}
return fnZoned;
};
@@ -37,3 +37,20 @@ export const calcDateProperty = (
locale.time_zone === TimeZone.server
? (calcZonedDate(date, config.time_zone, fn, options) as number | boolean)
: fn(date, options);
export const calcDateDifferenceProperty = (
endDate: Date,
startDate: Date,
fn: (date: Date, options?: any) => boolean | number,
locale: FrontendLocaleData,
config: HassConfig
) =>
calcDateProperty(
endDate,
fn,
locale,
config,
locale.time_zone === TimeZone.server
? toZonedTime(startDate, config.time_zone)
: startDate
);

View File

@@ -1,8 +1,6 @@
import { getWeekStartByLocale } from "weekstart";
import { FrontendLocaleData, FirstWeekday } from "../../data/translation";
import "../../resources/intl-polyfill";
export const weekdays = [
"sunday",
"monday",

View File

@@ -1,7 +1,6 @@
import { HassConfig } from "home-assistant-js-websocket";
import memoizeOne from "memoize-one";
import { DateFormat, FrontendLocaleData } from "../../data/translation";
import "../../resources/intl-polyfill";
import { resolveTimeZone } from "./resolve-time-zone";
// Tuesday, August 10

View File

@@ -1,7 +1,6 @@
import { HassConfig } from "home-assistant-js-websocket";
import memoizeOne from "memoize-one";
import { FrontendLocaleData } from "../../data/translation";
import "../../resources/intl-polyfill";
import { formatDateNumeric } from "./format_date";
import { formatTime } from "./format_time";
import { resolveTimeZone } from "./resolve-time-zone";

View File

@@ -1,6 +1,5 @@
import { HaDurationData } from "../../components/ha-duration-input";
import { FrontendLocaleData } from "../../data/translation";
import "../../resources/intl-polyfill";
const leftPad = (num: number) => (num < 10 ? `0${num}` : num);

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