Compare commits

..

720 Commits

Author SHA1 Message Date
Bram Kragten
871f0f9e0d 20230605.0 (#16787) 2023-06-05 19:19:02 +02:00
Bram Kragten
93e31df106 Use integration_type as header for config entries (#16786) 2023-06-05 19:18:42 +02:00
Bram Kragten
47fdae764f Improve display of disabled config entries (#16784) 2023-06-05 19:00:06 +02:00
Bram Kragten
b8efc06caa Bumped version to 20230605.0 2023-06-05 18:22:38 +02:00
Bram Kragten
fcacdf6534 Add all devices and entities link to integration page (#16781) 2023-06-05 15:52:11 +00:00
Paul Bottein
45d260f0ce Move add config entry button to card (#16783) 2023-06-05 15:49:05 +00:00
renovate[bot]
d5f46a69b0 Update dependency @octokit/plugin-retry to v4.1.5 (#16782)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 17:45:44 +02:00
Bram Kragten
fe8eb333b9 Limit integration card to 1 action row (#16780) 2023-06-05 17:23:28 +02:00
Paul Bottein
677cd2de10 Fix integration card tooltip (#16779)
* Fix integration card tooltip

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

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-06-05 14:13:27 +00:00
Bram Kragten
1470eb484f Add more info controls for date/time/datetime (#16775)
* Add more info controls for date/time/datetime

* Discard changes to src/panels/lovelace/entity-rows/hui-date-entity-row.ts

* handle unavailable
2023-06-05 16:10:38 +02:00
Bram Kragten
10ee8fda5b Improve protocol integration add device / integration (#16767) 2023-06-05 14:08:55 +00:00
Bram Kragten
e044ddcb57 Align+fix date time entity rows (#16774) 2023-06-05 13:55:15 +00:00
Bram Kragten
29c564bb69 Fix maps card with location sources (#16778) 2023-06-05 15:53:57 +02:00
Bram Kragten
1bf03f020e Fix closing notification drawer (#16769) 2023-06-05 14:26:51 +02:00
Bram Kragten
6c684fd8ee Show number config entries when no devices/entities (#16766) 2023-06-05 14:17:03 +02:00
Simon Lamon
ddaf403378 Fix dropdown selection in General Settings (#16754) 2023-06-05 11:57:20 +00:00
Paul Bottein
b337074758 Fix collapsed masonry view in safari (#16772) 2023-06-05 13:48:16 +02:00
Bram Kragten
a96eff4d25 Fix padding on thread config panel (#16770) 2023-06-05 13:06:54 +02:00
puddly
e6bdc3a15e Disable ZHA channel changing when multi-PAN is in use (#16731)
* Show baudrate and port in the ZHA network info

* Do not allow changing the Zigbee channel with the multiprotocol addon

* Include translations as well

* Update src/translations/en.json

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-06-05 10:27:36 +00:00
renovate[bot]
33e15eec22 Update dependency @lit-labs/context to v0.3.2 (#16760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 09:50:00 +02:00
renovate[bot]
3c0afd6cde Update dependency lit to v2.7.5 (#16763)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 09:48:45 +02:00
Joakim Sørensen
31a3fa02d9 Allow for lazy loading images in markdown (#16746) 2023-06-05 09:46:38 +02:00
Paul Bottein
71954f545c Fix white brightness effect on color wheel (#16738) 2023-06-05 09:39:53 +02:00
Paul Bottein
9f3e8abe69 Don't show edit favorite colors button if the light doesn't support it (#16750) 2023-06-05 09:39:36 +02:00
renovate[bot]
21f983572c Update dependency @octokit/plugin-retry to v4.1.4 (#16762)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 01:20:24 -04:00
renovate[bot]
5667d71b02 Update dependency @rollup/plugin-node-resolve to v15.1.0 (#16741)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 23:40:50 -04:00
Bram Kragten
0d0e5fdaaa Hide ignored entries (#16737) 2023-06-02 12:08:02 +02:00
karwosts
b1f5ff26d9 Fix device selector when picking devices with no entities (#16734) 2023-06-02 11:26:07 +02:00
renovate[bot]
27451ca30e Update typescript-eslint monorepo to v5.59.8 (#16730) 2023-06-01 22:09:45 -04:00
Paul Bottein
928b4e6f1e Add native color picker option (fix for firefox) (#16729) 2023-06-01 16:31:18 +00:00
Bram Kragten
82fd56efe7 20230601.1 (#16728) 2023-06-01 18:07:46 +02:00
Paul Bottein
b63a32109e Add native color picker option (#16726) 2023-06-01 18:06:26 +02:00
Bram Kragten
efb0098eac Merge branch 'master' into dev 2023-06-01 18:04:54 +02:00
Bram Kragten
a67b845812 Bumped version to 20230601.1 2023-06-01 18:01:55 +02:00
renovate[bot]
d29b7626f3 Update babel monorepo to v7.22.4 (#16724) 2023-06-01 17:13:30 +02:00
Paul Bottein
47ac7062dc Increase size of color wheel cursor on mobile (#16723) 2023-06-01 16:36:32 +02:00
Paul Bottein
e7f5d927b1 Open right mode when editing favorite color (#16719)
* Open right mode when editing favorite color

* Add missing type
2023-06-01 16:35:24 +02:00
Paul Bottein
6b06393559 Fix outlined button margin on iOS app (#16717) 2023-06-01 14:20:56 +02:00
Paul Bottein
efa02c309b Put button menu above toolbar in automation editor (#16716) 2023-06-01 13:35:23 +02:00
Bram Kragten
9b2e77e781 Align integration card, limit height of logo (#16714) 2023-06-01 12:01:09 +02:00
Joakim Sørensen
24b4060c97 Add missing imports in backup dialogs (#16715) 2023-06-01 09:54:53 +00:00
Paul Bottein
5e4c1ab4fc Share clipboard between automation and script (#16713) 2023-06-01 09:40:02 +00:00
Paul Bottein
287e6dbb60 Fix define variables action (#16712) 2023-06-01 11:38:59 +02:00
Paul Bottein
40c9292e16 Improve padding on integration logo (#16711) 2023-06-01 11:35:42 +02:00
Paul Bottein
d51dd00ec7 Add domain icon for time and datetime (#16710) 2023-06-01 09:07:18 +00:00
Paul Bottein
0db50d13d3 Clean helper config entry fetching in settings (#16709) 2023-06-01 10:37:34 +02:00
Paulus Schoutsen
9eb3618d97 20230601.0 (#16705)
* Fix fetching helper config entry (#16704)

* Fix fetching helper config entry

* willUpdate

* Bumped version to 20230601.0

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-31 20:54:02 -04:00
Paulus Schoutsen
03eee9c7d5 Bumped version to 20230601.0 2023-05-31 20:49:41 -04:00
Bram Kragten
a49d59f4c6 Fix fetching helper config entry (#16704)
* Fix fetching helper config entry

* willUpdate
2023-06-01 00:58:03 +02:00
Bram Kragten
990ade4294 20230531.0 (#16697) 2023-05-31 15:45:11 +02:00
Patrick ZAJDA
a4c57f09ad Set alt attribute to Assistant name in the exposed entities settings (#16698) 2023-05-31 13:36:16 +00:00
Bram Kragten
c1fa6d6f8c Merge branch 'master' into dev 2023-05-31 15:20:23 +02:00
Bram Kragten
3bfcb808f5 Bumped version to 20230531.0 2023-05-31 15:17:21 +02:00
Paul Bottein
9a30fe81c6 Use delete instead of remove for favorite colors (#16696) 2023-05-31 13:16:00 +00:00
Paul Bottein
c864edee72 Reset edit mode when closing more info dialog (#16695) 2023-05-31 13:11:10 +00:00
Bram Kragten
36268d5048 fix error messages of addon mount picker (#16694) 2023-05-31 15:00:32 +02:00
karwosts
5217d427e9 Support to|from null in UI for ha-automation-trigger-state (#15071)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-31 12:28:16 +00:00
karwosts
aea668e754 Minor UI bugfixes for selector-datetime and dialog-date-picker (#15759)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-31 12:26:01 +00:00
Bram Kragten
2219c9bbd3 Throttle replace state in restore scroll (#16693) 2023-05-31 12:18:48 +00:00
Bram Kragten
9b896c63b6 Fix my link for config flow start (#16689) 2023-05-31 14:05:11 +02:00
Bram Kragten
30af576ff5 Remove unused old code (#16691) 2023-05-31 12:04:45 +00:00
Bram Kragten
585db6ab3f Close dialog when clicked on link (#16690) 2023-05-31 14:01:47 +02:00
karwosts
046475e7ac Fix blueprint script editor defaults handling (#16196) 2023-05-31 12:58:22 +02:00
karwosts
648383addd Fix ha-combo-box open direction (#16119) 2023-05-31 12:55:44 +02:00
Paul Bottein
10018b4c32 Update default colors for more info light favorite colors (#16688)
Update default favorite color for more-info-light
2023-05-31 12:48:49 +02:00
Philip Allgaier
872d3e4875 Make badge colors use the generic error/warning/success/info colors (#14728) 2023-05-31 12:44:48 +02:00
Bram Kragten
881f5e5012 Fix energy compare (#16687) 2023-05-31 12:42:03 +02:00
Bram Kragten
9797950f32 Use memoize in formatDateNumeric (#16686) 2023-05-31 12:36:52 +02:00
Bram Kragten
25986f239e Blueprints: show error in alert dialog when clicked (#16684) 2023-05-31 12:35:38 +02:00
Raman Gupta
b586210ff1 Support zwave config parameters not on endpoint 0 (#16597)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-31 12:11:26 +02:00
karwosts
748925ede9 Localize time string in time trigger and condition (#16681) 2023-05-31 12:07:30 +02:00
Paul Bottein
a9f1c4a198 Add button bar for light modes (#16683)
* Add button bar for light modes

* Add disabled style

* Fix favorite colors display condition

* Fix color temp button
2023-05-31 11:48:22 +02:00
Bram Kragten
d914fb0cfc Revert "Use ES modules and dynamic import for Webpack latest builds (… (#16679)
Revert "Use ES modules and dynamic import for Webpack latest builds (#16620)"

This reverts commit 7b350e31dd.
2023-05-30 17:56:38 -04:00
Bram Kragten
5218e1352e async cleanup 2023-05-30 23:43:13 +02:00
Bram Kragten
eb0759a3b3 Fix integration translations (#16678) 2023-05-30 23:20:12 +02:00
Bram Kragten
88522ed155 change order 2023-05-30 22:59:34 +02:00
Bram Kragten
64e7fc6591 Fix my link for integration (#16676) 2023-05-30 22:02:52 +02:00
Christoph Wen, B.Sc
2ad6253b72 Add setting to localize numeric dates independent from language (#15770) (#16489) 2023-05-30 19:39:27 +00:00
Bram Kragten
7e5a85dbe7 Allow to change switch as x (#16671) 2023-05-30 21:32:06 +02:00
Paul Bottein
0771a780d9 Light more info enhancement (#16673)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-30 18:41:12 +00:00
Steve Repsher
7b350e31dd Use ES modules and dynamic import for Webpack latest builds (#16620) 2023-05-30 18:27:49 +00:00
Bram Kragten
70fbf68603 Overhaul Integrations page, add integration page (#16640)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-05-30 20:09:26 +02:00
Bram Kragten
2b4f199337 Tweak style of related items (#16672) 2023-05-30 16:12:41 +00:00
Bram Kragten
a70d7d8de3 Related blueprints (#16618) 2023-05-30 15:04:45 +02:00
renovate[bot]
e0c1f98803 Update babel monorepo to v7.22.3 (#16668)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 10:40:14 +00:00
Bram Kragten
4b7a517d98 Fix async update localize (#16667) 2023-05-30 10:25:21 +00:00
renovate[bot]
26d4839dfd Update dependency @types/chromecast-caf-receiver to v6 (#15724)
* Update dependency @types/chromecast-caf-receiver to v6

* Import cast namespace from receiver for receiver/media entry

* Use sender event types in manager and remove anonymous listeners

* Apply suggestions from code review

* prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-30 09:30:04 +00:00
Jonas Bergler
c358d724a7 update hidden_description to explain the behavior of the visible setting more clearly. (#16662)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-30 09:27:22 +00:00
Allen Porter
0ab7934c09 Add a vertical scrollbar for the calendar list (#16657) 2023-05-30 10:49:14 +02:00
Allen Porter
6eac229901 Disable calendar selection when editing existing Calendar Events (#16656) 2023-05-30 10:48:34 +02:00
Joakim Sørensen
5006dfc138 Use __STATIC_PATH__ in more places so the supervisor panel can reach paths (#16665)
Use __STATIC_PATH__ in more places so the supervisor panel can reach paths
2023-05-30 10:45:58 +02:00
renovate[bot]
d9d38efd93 Update babel monorepo (#16658)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 00:40:11 -04:00
renovate[bot]
9fe3a500d5 Update workbox monorepo to v6.6.0 (#16659)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 00:29:12 -04:00
Raman Gupta
3df7c50690 Add frontend support for datetime platform (#14391)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-29 23:32:57 +02:00
Bram Kragten
38cf774a0d Use ESM version of hls.js (#16655) 2023-05-29 20:38:21 +02:00
renovate[bot]
98d22d38c3 Update vaadinWebComponents monorepo to v24.0.7 (#16653)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 16:30:29 +02:00
renovate[bot]
357dbb591b Update babel monorepo to v7.22.0 (#16654)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 16:29:54 +02:00
renovate[bot]
aa5df06bc3 Update dependency @lezer/highlight to v1.1.6 (#16652)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 16:28:24 +02:00
rtm516
07a66b4bff Fix topbar overflowing card for add-on store (#16637) 2023-05-29 14:22:03 +00:00
renovate[bot]
f466196fa8 Update dependency hls.js to v1.4.4 (#16651)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 16:10:15 +02:00
Marvin Wichmann
04ae0b34af Update WS commands for config entries (#16647) 2023-05-29 16:08:25 +02:00
Joakim Sørensen
6f48267dae Include share as mount usage option (#16636) 2023-05-29 11:43:12 +02:00
renovate[bot]
be1f5d99c8 Update dependency webpack to v5.84.1 (#16649) 2023-05-28 20:46:25 +00:00
renovate[bot]
27b9b4dcc5 Update fullcalendar monorepo to v6.1.8 (#16644)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 13:48:53 -04:00
renovate[bot]
08b57d6168 Update dependency webpack to v5.84.0 (#16641)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 13:46:32 -04:00
renovate[bot]
3e474daa32 Update dependency @lezer/highlight to v1.1.5 (#16638) 2023-05-27 13:11:42 -04:00
renovate[bot]
48c1e8b56c Update dependency @codemirror/state to v6.2.1 (#16632) 2023-05-27 13:09:19 -04:00
karwosts
fd0c0a95ca Add a description for time condition (#16499) 2023-05-27 18:27:24 +02:00
Paul Bottein
83570f2419 Add missing translations for effect and preset translation in more info (#16634) 2023-05-26 23:01:52 +02:00
Paul Bottein
633c6cfc9b Use colored slider background for more info (#16633) 2023-05-26 17:45:57 +02:00
Paul Bottein
54b4c9f347 Add favorite colors to more info light (#16592)
* Add default favorite colors

* Don't show favorite colors if no entity registry entry

* Move color picker in its own component

* Fix more info dialog width

* Make favorite color editable

* Don't include white mode as favorite

* Add label for favorite color button

* Add support for hs, rgbw and rgbww colors

* Adapt color wheel color according to white value

* Add translation

* Add keyboard control to color temp wheel

* Use bottom sheet style for edit favorite dialog

* Fix listener

* Edit color temp icon

* Disable favorite color when available

* Only admin can edit a color

* Refactor close action

* Clean css

* Use ha button

* Fix ha-border-radius for bottom sheet
2023-05-26 17:23:49 +02:00
starkillerOG
85e7986b44 Always show "polling for updates" switch (#16629)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-26 15:52:57 +02:00
Paul Bottein
da0cf9d950 Create outlined button component (#16631)
* Create outlined button component

* Fix css comment

* Don't use Md classes

* Simplify
2023-05-26 15:28:49 +02:00
Bram Kragten
ef51336770 Don't set name for entities that use device name already (#16613) 2023-05-26 14:54:49 +02:00
Bram Kragten
a09db75980 Bumped version to 20230526.0 2023-05-26 09:00:02 +02:00
J. Nick Koston
77d1b19ecb Complete persistent notifications migration (#16476)
* Complete migration of persistent notifications

* Complete migration of persistent notifications

* revert
2023-05-25 23:09:04 -04:00
renovate[bot]
fba12f35ac Update typescript-eslint monorepo to v5.59.7 (#16627) 2023-05-25 22:50:21 +00:00
renovate[bot]
00198c6937 Update vaadinWebComponents monorepo to v24.0.6 (#16621) 2023-05-25 18:35:51 -04:00
Paul Bottein
71bb540352 Use key instead of keycode for key event (#16625) 2023-05-25 18:47:57 +02:00
Bram Kragten
c4ff1a8646 fix keypress in code editor causing flow to submit (#16623) 2023-05-25 18:01:46 +02:00
Bram Kragten
a9c27ad8dd Save automation clipboard in session storage (#16624) 2023-05-25 17:58:05 +02:00
Joakim Sørensen
dacdc62672 Change OS version for mounts to placeholder (#16607) 2023-05-25 09:51:09 +02:00
karwosts
cccce5711c Fix displayed unit for fixed water price (#16616) 2023-05-24 18:21:41 +02:00
Joakim Sørensen
50bd9da94c Att tip to manage media dialog about network storage (#16612) 2023-05-24 17:18:46 +02:00
Bram Kragten
dde27c3524 Support entity reg id in device automations (#15387) 2023-05-24 14:37:45 +02:00
Joakim Sørensen
85acafe8a8 Fix reload mounts callback when doing changes in dialog (#16615) 2023-05-24 12:31:41 +00:00
Bram Kragten
c1748138a8 fix links to scripts from device and area pages (#16611)
Fixes #16602
2023-05-24 14:20:36 +02:00
Joakim Sørensen
9111f58e52 Add dialog to change default backup location (#16610)
* Add dialog to change default backup location

* Add guard

* Update src/components/ha-mount-picker.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-24 12:03:14 +02:00
karwosts
cefaaadf95 Fix line chart tooltips to use XY mode (#16605) 2023-05-24 11:52:26 +02:00
karwosts
29846a168e Add cut / copy / paste support to automation & script editor (#16488) 2023-05-24 11:47:33 +02:00
renovate[bot]
31c89d70c5 Update dependency @octokit/rest to v19.0.11 (#16606)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-23 22:37:51 -04:00
renovate[bot]
d5cea75fe4 Update dependency glob to v10.2.6 (#16608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-23 22:36:12 -04:00
renovate[bot]
35d212e850 Update dependency @octokit/rest to v19.0.9 (#16598) 2023-05-23 12:07:01 -04:00
karwosts
aea098ff17 Fix compare button for energy cards on manual dashboard (#16579) 2023-05-23 14:55:12 +02:00
karwosts
c5205ae8db Add a description for time pattern trigger (#16520) 2023-05-23 14:47:41 +02:00
Paul Bottein
303087d049 Fix documentation form (#16601) 2023-05-23 14:45:53 +02:00
Paul Bottein
e9d9d89d79 New color picker for HS and color temp (#16549)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-23 14:45:23 +02:00
Bram Kragten
a5b5e61ed4 Add backup location selector (#16567)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-05-23 13:35:31 +02:00
Joakim Sørensen
22dc757382 Add guards for network storage (#16591) 2023-05-23 12:33:12 +02:00
Bram Kragten
4ccfd6a3fc Add options flow button to conversation agent in assist pipeline dialog (#16595) 2023-05-23 12:32:18 +02:00
Erik Montnemery
5a36f100a9 Add WS command for getting a config entry (#16600)
* Add WS command for getting a config entry

* Correct typing
2023-05-23 10:43:53 +02:00
renovate[bot]
847c8407de Update dependency eslint to v8.41.0 (#16596) 2023-05-22 20:21:48 -04:00
J. Nick Koston
ed1784b70f Avoid entity registry subscribe for the media browser (#16537) 2023-05-22 19:43:01 +02:00
Trevor North
e8521c59eb Add sensor device class volatile_organic_compounds_parts (#16576)
Add support for volatile_organic_compounds_parts
2023-05-22 08:42:15 +00:00
Bram Kragten
34e59e543b Add support for offline db migration (#16566) 2023-05-22 10:39:06 +02:00
Steve Repsher
330aa23801 Use .nvmrc for GitHub actions (#16569) 2023-05-22 10:38:54 +02:00
Steve Repsher
06db338a15 Upgrade node to v18 (LTS) (#16589) 2023-05-22 10:38:24 +02:00
renovate[bot]
8cff4cda47 Update dependency sinon to v15.1.0 (#16587)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 22:25:40 -04:00
renovate[bot]
f7e7c916ba Update dependency @types/marked to v4.3.1 (#16588)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 22:24:02 -04:00
renovate[bot]
13ab5ab70a Update dependency leaflet to v1.9.4 (#16586)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 22:22:56 -04:00
renovate[bot]
cc61131e4b Lock file maintenance (#16578)
* Lock file maintenance

* Update @codemirror/language to eliminate issue with duplicate

* Update @codemirror/view to eliminate issue with duplicate

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-05-21 04:15:17 +00:00
Bram Kragten
099aa54b80 Add support for external assist (#16556)
* Add support for external assist

* Update hui-root.ts
2023-05-20 21:37:08 -04:00
renovate[bot]
e35d795ba8 Update dependency terser-webpack-plugin to v5.3.9 (#16585) 2023-05-21 00:58:31 +00:00
renovate[bot]
39de8cd6ba Update dependency webpack to v5.83.1 (#16583) 2023-05-20 18:26:53 -04:00
renovate[bot]
fdddf27162 Update dependency glob to v10.2.5 (#16584) 2023-05-20 18:23:33 -04:00
renovate[bot]
cec7a24234 Update dependency @lrnwebcomponents/simple-tooltip to v7 (#16548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-20 18:10:19 +02:00
renovate[bot]
ea2e9de37a Update dependency @codemirror/view to v6.11.3 (#16582) 2023-05-20 11:52:58 -04:00
renovate[bot]
d9cb288c1d Update dependency tar to v6.1.15 (#16581) 2023-05-20 10:48:03 -04:00
renovate[bot]
53bd4298e7 Update typescript-eslint monorepo to v5.59.6 (#16577) 2023-05-18 17:08:14 -04:00
renovate[bot]
5bea929c1e Update dependency glob to v10.2.4 (#16573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-18 08:39:40 -04:00
Bram Kragten
eb220fa1a0 Fix overflow menu being above dialogs (#16558)
Fix device actions being above dialogs
2023-05-17 10:23:30 -04:00
Franck Nijhof
67b64b2d5c Add entity attribute value translations for media_player (#16559)
Add entity attribute translations for media_player
2023-05-17 15:27:32 +02:00
Franck Nijhof
42aa4ab7c2 Add entity attribute value translations for vacuum (#16564) 2023-05-17 15:27:05 +02:00
Franck Nijhof
d873f26db3 Add entity attribute value translations for humidifier (#16565) 2023-05-17 15:26:16 +02:00
Franck Nijhof
e354f5de12 Add entity attribute value translations for remote (#16563) 2023-05-17 15:25:21 +02:00
Bram Kragten
92ed62985d Focus pin input when adding zwave device (#16557) 2023-05-17 12:53:01 +02:00
Bram Kragten
cbcca6e190 Increase weight of name and domain in add integration search (#16562) 2023-05-17 12:51:31 +02:00
Franck Nijhof
2ed48d67c6 Exclude device trackers from person more info (#16554) 2023-05-17 08:33:19 +02:00
renovate[bot]
8fb2bf472a Update dependency @octokit/rest to v19.0.8 (#16555)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 23:47:09 -04:00
renovate[bot]
51bdf85642 Update dependency @codemirror/view to v6.11.2 (#16553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 21:39:30 +00:00
renovate[bot]
b7a4eb33cf Update dependency @rollup/plugin-commonjs to v25 (#16551) 2023-05-16 09:53:59 -04:00
renovate[bot]
3c2d326b54 Update dependency @codemirror/autocomplete to v6.7.1 (#16547) 2023-05-16 07:51:05 -04:00
renovate[bot]
24e6d19e18 Update vaadinWebComponents monorepo to v24.0.5 (#16544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 02:22:28 +00:00
renovate[bot]
9370411019 Update CodeMirror (#16545)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 02:22:09 +00:00
renovate[bot]
d5c7e7849e Update fullcalendar monorepo to v6.1.7 (#16542) 2023-05-15 22:09:45 -04:00
renovate[bot]
c5e62248b9 Update typescript-eslint monorepo to v5.59.5 (#16543) 2023-05-15 22:07:29 -04:00
renovate[bot]
c5e0efb8e0 Update dependency webpack to v5.82.1 (#16540) 2023-05-16 01:53:51 +00:00
renovate[bot]
82f88ca7d7 Update dependency webpack-cli to v5.1.1 (#16541) 2023-05-15 21:38:39 -04:00
renovate[bot]
c676cddb13 Update dependency glob to v10.2.3 (#16538) 2023-05-15 19:53:55 -04:00
renovate[bot]
036e2a9e46 Update dependency hls.js to v1.4.3 (#16539) 2023-05-15 19:51:44 -04:00
renovate[bot]
319d8bec29 Update dependency @types/tar to v6.1.5 (#16535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-15 21:35:46 +00:00
renovate[bot]
aa864cf0b6 Update dependency @lit-labs/virtualizer to v2.0.2 (#16534)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-15 21:22:52 +00:00
Steve Repsher
eabd8b54f4 Correct Terser ECMA option (#16518) 2023-05-15 09:54:59 +02:00
Bram Kragten
aa063d0a3e Replace onboarding inputs with default inputs (#16514) 2023-05-12 13:15:28 +02:00
Paul Bottein
75f080ee85 Add last-changed date to more-info (#16509) 2023-05-12 10:58:52 +00:00
Bruno Luvizotto
557fe33807 Add interval duration to history tooltip (#16486) 2023-05-12 12:50:34 +02:00
Paul Bottein
5bd49c18d1 Update more info light actions (#16512) 2023-05-12 00:17:02 +02:00
Paul Bottein
a461d58df2 Fix more info dialog margin for material web button (#16513) 2023-05-11 17:16:15 +02:00
karwosts
ae8eafe8f9 Honor entity ordering in statistics graph card (#16504) 2023-05-11 11:21:18 +02:00
Paul Bottein
450565799e Allow adding variable action in the automation UI (#16502) 2023-05-11 11:19:36 +02:00
Erik Montnemery
72403f4276 Remove calculation of change from frontend (#16477) 2023-05-11 10:17:12 +02:00
renovate[bot]
d66ca0467e Update dependency webpack-dev-server to v4.15.0 (#16501) 2023-05-10 18:12:00 -04:00
Bram Kragten
d46201ebd8 fix supervisor ingress routing (#16474) 2023-05-10 16:03:19 +02:00
Bram Kragten
689d123890 Add search to add-ons page (#16459) 2023-05-10 14:59:24 +02:00
Bram Kragten
bcdb24849d Add support for filtering service fields (#16004)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-05-10 14:59:13 +02:00
Paul Bottein
3838d76094 Ha dialog header (#16485) 2023-05-10 14:34:19 +02:00
Bram Kragten
3325cbfa28 Use entity id as label in entity picker dev tools (#16484) 2023-05-10 10:23:33 +02:00
renovate[bot]
24fc2a0ccc Update dependency webpack-cli to v5.1.0 (#16495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-10 00:29:02 -04:00
renovate[bot]
d6ea6f8041 Update dependency terser-webpack-plugin to v5.3.8 (#16493) 2023-05-09 22:11:35 -04:00
renovate[bot]
8384ef7a5c Update dependency webpack-dev-server to v4.14.0 (#16494) 2023-05-09 22:09:49 -04:00
renovate[bot]
2869c5f26b Update dependency core-js to v3.30.2 (#16490) 2023-05-09 20:04:47 -04:00
renovate[bot]
c098c55b8f Update dependency idb-keyval to v6.2.1 (#16487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 16:20:53 -04:00
Bram Kragten
fec974712f Add any to number selector step typing (#16483) 2023-05-09 14:30:52 +02:00
Bruno Luvizotto
0be5aa108c Fix history redraw timer (#16472) 2023-05-09 12:32:13 +02:00
Joakim Sørensen
ec36d4a381 Use "any" as step for add-on configuration floats (#16478) 2023-05-09 12:22:17 +02:00
Joakim Sørensen
ccf3238318 Fix link to new automation (#16479) 2023-05-09 11:12:00 +02:00
renovate[bot]
bcfa6c5a4b Update dependency eslint to v8.40.0 (#16475) 2023-05-08 18:51:17 -04:00
G Johansson
e371f5d406 Lock entity options (#16344) 2023-05-08 22:06:21 +02:00
Bram Kragten
6d4e3a0de3 Allow supervisor panel to unsubscribe, cleanup (#16470) 2023-05-08 15:56:05 -04:00
renovate[bot]
b845c54948 Update dependency open to v9 (#15909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-08 16:11:05 +00:00
renovate[bot]
87951ebf82 Pin dependency @types/babel__plugin-transform-runtime to 7.9.2 (#16471)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-08 16:10:15 +00:00
Steve Repsher
586079917d Convert remaining gulp modules to ESM (#16430) 2023-05-08 17:43:29 +02:00
Steve Repsher
aa3fd70966 Use Babel runtime for helpers and regenerator (33%+ bundle reduction) (#16466) 2023-05-08 14:47:53 +02:00
bikeshop45
a5ba2499c0 Fix attribute url links (#16462) 2023-05-08 09:13:35 +00:00
Joakim Sørensen
36a87da1fe Add UI for network mounts (#16357)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-08 10:18:09 +02:00
Bram Kragten
8f75c314f5 Fix supervisor loading race (#16460) 2023-05-07 22:48:16 -04:00
renovate[bot]
d04fc53f08 Update dependency hls.js to v1.4.1 (#16461) 2023-05-07 17:36:26 -04:00
renovate[bot]
c65c6f8767 Update dependency lit to v2.7.4 (#16464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-07 21:59:44 +02:00
renovate[bot]
b81668fbce Update dependency @codemirror/autocomplete to v6.6.1 (#16452)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 14:17:03 -04:00
renovate[bot]
2d8e23ba48 Update dependency eslint-plugin-wc to v1.5.0 (#16448) 2023-05-06 13:20:54 -04:00
renovate[bot]
e947f8120c Update dependency eslint to v8.39.0 (#16447) 2023-05-06 13:14:16 -04:00
renovate[bot]
6424020f64 Update dependency date-fns to v2.30.0 (#16446) 2023-05-06 17:06:08 +02:00
renovate[bot]
a611930fa7 Update formatjs monorepo (#16449) 2023-05-06 17:05:17 +02:00
renovate[bot]
f0e990f330 Update CodeMirror (#16443) 2023-05-06 10:13:27 -04:00
renovate[bot]
8c1d2362a4 Update CodeMirror (#16441) 2023-05-06 02:37:14 -04:00
renovate[bot]
69067010a3 Update dependency @types/marked to v4.3.0 (#16442) 2023-05-06 06:32:32 +00:00
renovate[bot]
0b0ba97aee Update fullcalendar monorepo to v6.1.6 (#16439) 2023-05-06 03:22:08 +00:00
renovate[bot]
792fe15dac Update typescript-eslint monorepo to v5.59.2 (#16440) 2023-05-06 03:21:24 +00:00
renovate[bot]
d5b8fa482c Update dependency lit to v2.7.3 (#16435) 2023-05-05 23:11:04 -04:00
renovate[bot]
2fefbbfe24 Update dependency tar to v6.1.14 (#16438) 2023-05-06 03:05:58 +00:00
renovate[bot]
22c509533a Update dependency qrcode to v1.5.3 (#16437) 2023-05-05 23:02:41 -04:00
renovate[bot]
544dfa0973 Update dependency @babel/core to v7.21.8 (#16432) 2023-05-05 22:56:07 -04:00
renovate[bot]
aac3ec353b Update dependency prettier to v2.8.8 (#16436) 2023-05-05 22:45:35 -04:00
renovate[bot]
efbc6d9069 Update dependency lint-staged to v13.2.2 (#16433) 2023-05-05 22:44:19 -04:00
renovate[bot]
4e390b4c57 Update dependency @lit-labs/virtualizer to v2 (#15932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-05 15:51:12 +00:00
renovate[bot]
849e65a2b3 Update dependency @lit-labs/context to v0.3.1 (#16428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 17:35:27 +02:00
renovate[bot]
a6fdb54697 Update dependency glob to v10.2.2 (#16429)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 15:32:34 +00:00
Sven Serlier
aa196704b7 Update URL (#16427) 2023-05-05 15:16:49 +00:00
renovate[bot]
c93fcb8a2a Update dependency @material/web to v1.0.0-pre.7 (#15940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-05 15:13:25 +00:00
renovate[bot]
5768764282 Update babel monorepo to v7.21.5 (#16426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 14:55:01 +00:00
renovate[bot]
e6c8881b21 Update Yarn to v3.5.1 (#16425)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 14:48:45 +00:00
renovate[bot]
ac30335fc2 Update vaadinWebComponents monorepo to v24 (major) (#15778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 16:33:29 +02:00
renovate[bot]
1e5c30a259 Update dependency @lrnwebcomponents/simple-tooltip to v4.2.0 (#16024)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 16:32:06 +02:00
renovate[bot]
1da009b473 Update dependency hls.js to v1.4.0 (#16191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 16:31:07 +02:00
Bram Kragten
bc81499e7c Bumped version to 20230503.3 2023-05-05 16:26:53 +02:00
Paul Bottein
c31378ad75 Fetch entries integration onboarding (#16424)
* Fetch loaded entries in integration onboarding

* Proper fix
2023-05-05 16:26:44 +02:00
Paul Bottein
02542e528e Fetch entries integration onboarding (#16424)
* Fetch loaded entries in integration onboarding

* Proper fix
2023-05-05 14:24:32 +00:00
Paul Bottein
8ce8b63cfc Adapt unsupported microphone message (#16419) 2023-05-05 16:15:23 +02:00
puddly
c7ec6903fe ZHA channel changing dialog and settings redesign (#16381) 2023-05-05 15:05:08 +02:00
Raman Gupta
ecb2a73e2b Add frontend support for date platform (#14389)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-05-05 15:01:47 +02:00
Raman Gupta
59db31cdb5 Remove CSS component from time entity row (#16416) 2023-05-05 15:01:13 +02:00
Paul Bottein
643556ded3 Adapt unsupported microphone message (#16419) 2023-05-05 00:18:18 +02:00
Bram Kragten
4e5a18d272 Remove polymer types, cleanups (#16385)
* Remove polymer types, cleanups

* Delete updated.ts
2023-05-04 15:24:24 +00:00
Raman Gupta
ab237f19c0 Add frontend support for time platform (#14390) 2023-05-04 17:05:30 +02:00
Joe
3fa3d333c4 Collapse empty Masonry columns (#5315, #6632) (#16351) 2023-05-04 17:04:03 +02:00
Bram Kragten
1cb7e798da Bump webpack to 5.82 (#16412) 2023-05-04 11:02:31 -04:00
Bram Kragten
11640b31f6 Update tts media browser to use voices (#16362) 2023-05-04 16:33:52 +02:00
Steve Repsher
4740ce685f Redefine browser requirements for legacy (ES5) builds (#16384) 2023-05-04 16:33:13 +02:00
Steve Repsher
d2321b535c Refactor Intl polyfills and remove from ES5 entrypoints (#16349) 2023-05-04 15:49:56 +02:00
Steve Repsher
f185e886c3 Convert top gulp modules to ESM (#16387) 2023-05-04 15:49:41 +02:00
Bram Kragten
8695bbc490 Move globalThis polyfill to compatibility, add more compatibility (#16386) 2023-05-04 15:49:28 +02:00
Bram Kragten
11f77b09e6 Bumped version to 20230503.2 2023-05-04 15:46:34 +02:00
Bram Kragten
ba7d7556a8 fix expose view for yaml config (#16408) 2023-05-04 15:42:14 +02:00
Bram Kragten
31da0d8678 Fix codemirror selection color (#16409) 2023-05-04 15:41:57 +02:00
Bram Kragten
9f195534b5 Fix entity areas in expose (#16402) 2023-05-04 15:41:40 +02:00
Bram Kragten
060f6ce3d8 fix expose view for yaml config (#16408) 2023-05-04 15:30:47 +02:00
Bram Kragten
ed19cfeaaa Fix codemirror selection color (#16409) 2023-05-04 15:13:32 +02:00
Paul Bottein
79d6453c7e Don't hide battery entities in compute card function (#16373) 2023-05-03 19:44:01 +02:00
Bram Kragten
694fc7d4ba Fix entity areas in expose (#16402) 2023-05-03 19:02:20 +02:00
Bram Kragten
a293e7b91c 20230503.1 (#16399) 2023-05-03 16:15:27 +02:00
Bram Kragten
8205a30baf Bumped version to 20230503.1 2023-05-03 16:14:23 +02:00
Bram Kragten
25af9a9770 Enable Google assistant no 2fa for all entities (#16397) 2023-05-03 16:12:49 +02:00
Paul Bottein
6c25e23ad2 RTL fixes for voice assistant page (#16398) 2023-05-03 13:14:02 +00:00
Paul Bottein
a39c2a314a Branding adjustment for cloud discover (#16396)
* Branding adjustment for cloud discover

* Amazing
2023-05-03 14:59:35 +02:00
Bram Kragten
1ea70f3191 20230503.0 (#16395) 2023-05-03 14:14:02 +02:00
Bram Kragten
02a94c04af Bumped version to 20230503.0 2023-05-03 14:13:12 +02:00
Bram Kragten
fc97ca324c Add support for native names for other languages than HA has (#16393)
* Add support for native names for other languages than HA has

* catch unsupported locales
2023-05-03 13:54:59 +02:00
Paul Bottein
4a0d84d2f6 Open more info from voice settings (#16392)
* Open more info from voice settings

* review
2023-05-03 10:58:43 +00:00
Bram Kragten
b550c67a9f Fetch supported items when startup is done (#16390) 2023-05-03 12:36:16 +02:00
Bram Kragten
a3ec83a684 Only count exposed entities with a state (#16391)
Only count entities with a state
2023-05-03 11:47:58 +02:00
Bram Kragten
822f47143b keep expose entity dialog modal longer (#16389) 2023-05-03 10:59:36 +02:00
c0ffeeca7
da1df9d8cc Fix minor typo on expose entities dialog (#16388)
- slight rephrasing suggestion.
2023-05-03 10:38:26 +02:00
Bram Kragten
aa155261f5 Update ha-integration-card.ts 2023-05-02 22:39:56 +02:00
Bram Kragten
29aa762f7c 20230502.0 (#16382) 2023-05-02 22:01:32 +02:00
Bram Kragten
d56e4afe92 Bumped version to 20230502.0 2023-05-02 21:58:23 +02:00
Bram Kragten
e766c277f5 Update expose for entities not in the entity registry (#16377) 2023-05-02 21:57:51 +02:00
Bram Kragten
6c0011fb45 fix race in assist pipeline dialog (#16380) 2023-05-02 21:41:44 +02:00
Bram Kragten
a6e71f4c0a Optimise supervisor entrypoint (#16379) 2023-05-02 20:45:35 +02:00
Bram Kragten
d6382e59c6 Add name for google translate tts (#16378) 2023-05-02 20:34:52 +02:00
Paul Bottein
ab308af61f Improve assist dialog (#16371)
* Improve RTL, style and interaction

* Add message for microphone not supported

* Fix style

* Add explanation as a message

* Update message

* Update translation variable
2023-05-02 16:54:25 +00:00
Paul Bottein
15eab18e07 Reduce height for config entry list in integration page (#16370) 2023-05-02 11:12:13 +02:00
Paul Bottein
c8e0227a5c Fix dashboard theme background (#16368) 2023-05-02 11:11:44 +02:00
Bram Kragten
f2a8528429 Use language picker for cloud tts language (#16363)
* Use language picker for cloud tts language

* Update ha-browse-media-tts.ts
2023-05-02 10:49:01 +02:00
Steve Repsher
3ed3dab0a1 Clean up imports for some layouts (#16365) 2023-05-01 20:34:21 +02:00
Bram Kragten
d0c7f65256 20230501.0 (#16364) 2023-05-01 19:55:38 +02:00
Bram Kragten
f99f554f19 Bumped version to 20230501.0 2023-05-01 19:54:40 +02:00
Bram Kragten
e069b5eed1 Update en.json 2023-05-01 17:15:26 +02:00
Allen Porter
3a481ebb1a Fix edits for single instance of all day recurring event (#16354) 2023-05-01 14:48:57 +02:00
Steve Repsher
a209fadf18 List Core JS polyfills for browserslist environments (#16356) 2023-05-01 14:47:57 +02:00
Bram Kragten
9f1bd1e085 Fix unused entities (#16359) 2023-05-01 14:46:54 +02:00
Bram Kragten
edc6da04f7 Make sure stt_binary_handler_id is reset (#16360) 2023-05-01 14:46:44 +02:00
Bram Kragten
2fb1dd0ec1 Add icon at unsupported message in voice settings (#16358) 2023-05-01 14:28:26 +02:00
Paul Bottein
3f2aac0842 Fix cloud subscription message in pipeline creation (#16348) 2023-04-28 17:03:34 -04:00
Paul Bottein
71dd822978 20230428.0 (#16347) 2023-04-28 17:40:58 +02:00
Paul Bottein
d1877595a5 Bumped version to 20230428.0 2023-04-28 17:19:43 +02:00
Paul Bottein
6379713f57 Fix drag and drop with sortablejs (#16343) 2023-04-28 14:40:01 +02:00
Paul Bottein
3b33195ff6 Add camera view support to image element (#16346) 2023-04-28 14:17:33 +02:00
c0ffeeca7
c7f1f1bcd1 Fix typo (#16341)
* Fix typo

* Fix typo
2023-04-28 08:01:24 +00:00
Paul Bottein
c50aad8403 20230427.0 (#16338) 2023-04-27 17:31:29 +02:00
Paul Bottein
fac4795f14 Bumped version to 20230427.0 2023-04-27 17:16:04 +02:00
Bram Kragten
062e402ef1 Show if entity is supported in expose list (#16335)
* Show if entity is supported in expose list

* Add translations and refactor code

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-04-27 17:12:12 +02:00
Bram Kragten
29be64a858 Add not supported warning in entity voice settings (#16336)
* Add not supported warning in entity voice settings

* Add alexa support and improve style

* Only toggle supported

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-04-27 17:11:49 +02:00
Paul Bottein
b3b74b8328 Move debug and preferred button to top (#16337) 2023-04-27 15:02:57 +02:00
Paul Bottein
37ba34cb0d Virtualize the add exposed entity list (#16333) 2023-04-27 13:22:37 +02:00
dependabot[bot]
8ecdde3507 Bump yaml from 2.2.1 to 2.2.2 (#16310) 2023-04-27 10:12:03 +02:00
Paul Bottein
04d34aa80c Improve search and filtering in expose entity page (#16330) 2023-04-27 09:50:19 +02:00
J. Nick Koston
26bb1ba146 Revert "Avoid fetching unused stats state column for more info" (#16328)
Revert "Avoid fetching unused stats state column for more info (#16141)"

This reverts commit 49a14a7265.
2023-04-27 09:31:06 +02:00
Bram Kragten
b7667d2cbf 20230426.0 (#16327) 2023-04-26 18:31:51 +02:00
Bram Kragten
0c36600a81 Merge branch 'master' into dev 2023-04-26 18:17:33 +02:00
Bram Kragten
feaf61a0ae Bumped version to 20230426.0 2023-04-26 18:15:53 +02:00
Bram Kragten
3e2844a65a Only show assistants that are active (#16325)
* Only show assistants that are active

* also use in texts

* Add entity id

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

* remove voiceAssistantKeys

* Update entity-voice-settings.ts

* update styling

* search case
2023-04-26 18:15:10 +02:00
Paul Bottein
3a2d7baa25 Fix empty translation (#16326) 2023-04-26 18:14:57 +02:00
Paul Bottein
349cca5ff2 Update icons to expose/unexpose entity (#16323) 2023-04-26 17:08:15 +02:00
Paul Bottein
5cd3ce66f6 Keep area field next to use device area field (#16324) 2023-04-26 14:54:59 +00:00
Bram Kragten
8cf8c41698 Show number of exposed entities (#16321) 2023-04-26 14:23:23 +00:00
Bram Kragten
ff4c01e15c Replace paper-item in integration card (#16317) 2023-04-26 16:11:54 +02:00
Paul Bottein
addb66f21d Inform user that subscription is needed for cloud services (#16318) 2023-04-26 13:42:44 +00:00
Bram Kragten
a5759e36b2 Fix helper entity settings (removing) (#16320) 2023-04-26 15:29:59 +02:00
Bram Kragten
9852186ff7 Update my link for voice assistants (#16319
Making it consistant with others and match

https://github.com/home-assistant/my.home-assistant.io/pull/353
2023-04-26 14:51:31 +02:00
Bram Kragten
19c9486351 Update entity settings, combine basic editor with normal editor (#16297) 2023-04-26 12:23:53 +02:00
Bram Kragten
8c06712ab7 Allow to select a pipeline in voice command dialog (#16291) 2023-04-26 12:10:17 +02:00
Bram Kragten
63de324224 Fix my link add integration: search for discovered items (#16315)
* fix my link add integration

* add confirm back

* Update dialog-add-integration.ts
2023-04-26 12:02:50 +02:00
Bram Kragten
10d476195d Ask to use cloud pipeline as preferred (#16286)
* Ask to use cloud pipeline as preferred

* Update
2023-04-26 00:36:51 -04:00
Johan Frick
e0c4b85ef1 Fix options typo for ha-form in gallery (#16305) 2023-04-25 19:59:58 +00:00
Bram Kragten
3441a86613 Update general step description of pipeline dialog (#16307)
update general step description of pipeline dialog
2023-04-25 21:44:51 +02:00
Paul Bottein
643b168c69 Add icon and state formatting for tts and stt domain (#16304) 2023-04-25 21:40:22 +02:00
Paul Bottein
db0e5a8a41 Add translations to pipeline UI (#16303) 2023-04-25 20:01:48 +02:00
Ben Randall
64a693332b Fix height of main automation trace element (#16283)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-25 13:46:15 +00:00
Bram Kragten
327927baa7 Update expose mobile view (#16302) 2023-04-25 13:33:21 +00:00
karwosts
ce8fc17ef8 Markdown feature parity for blueprint scripts vs automations (#16250) 2023-04-25 15:31:52 +02:00
Paul Bottein
62ed1d54b0 Voice assistant cloud upsell (#16299) 2023-04-25 12:41:53 +02:00
Bram Kragten
2498f1db41 Fix tts in voice command for iOS (#16300) 2023-04-25 10:02:31 +00:00
Bram Kragten
8a50bb058d Fix audio playing on iOS (#16298) 2023-04-25 09:38:14 +00:00
Bram Kragten
e793675c47 Fix dialog text colors theme (#16296)
* Fix dialog text colors theme

* fix drawer border
2023-04-25 00:23:08 +02:00
Paul Bottein
07cef18918 Try TTS in pipeline form (#16292) 2023-04-24 19:39:16 +02:00
Bram Kragten
a0263f25c4 Improve tts playback in voice command dialog (#16288) 2023-04-24 18:45:00 +02:00
Paul Bottein
52546ab567 Fix media browser bar position (#16293)
Fixes media browser bar position
2023-04-24 18:09:21 +02:00
Bram Kragten
c0ec7e4f09 Remove wrong language from stt event (#16285) 2023-04-24 18:08:36 +02:00
renovate[bot]
8b61390e19 Update vaadinWebComponents monorepo to v23.3.11 (#16289) 2023-04-24 11:55:11 +00:00
Steve Repsher
9ba114777e Add browserslist config and use for Babel preset environment (#16267) 2023-04-24 11:28:27 +02:00
Steve Repsher
4e1e76ccc2 Add module preload to demo page (#16274) 2023-04-24 11:27:40 +02:00
dependabot[bot]
609300f40b Bump home-assistant/wheels from 2022.10.1 to 2023.04.0 (#16284)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 11:10:41 +02:00
renovate[bot]
eac9ac4757 Update dependency google-timezones-json to v1.1.0 (#16282) 2023-04-23 19:37:23 -04:00
Bram Kragten
708d1b81da Mark lang and country required in onboarding (#16277) 2023-04-23 19:33:44 -04:00
Bram Kragten
35baf4c779 Fix audio recorder (#16280)
FIx audio recorder
2023-04-23 13:48:46 -04:00
renovate[bot]
8d1ae71741 Update dependency sinon to v15.0.4 (#16278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-23 13:20:24 -04:00
Bram Kragten
9b32c9c6b4 Voice picker: Guard for select undefined, update debug pipelines (#16279)
* Voice picker: Guard for select undefined

* Update types, make debug a little nicer

* Add type to stt-start event

* Add language to STT data in render pipeline

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-23 17:04:43 +00:00
renovate[bot]
439f34f724 Update dependency @codemirror/commands to v6.2.3 (#16276) 2023-04-22 16:50:59 +00:00
Bram Kragten
cef3b99e16 fix add assist dialog (#16275) 2023-04-22 12:43:04 -04:00
renovate[bot]
9dbdf611c5 Update formatjs monorepo (#16273) 2023-04-22 12:31:03 -04:00
Bram Kragten
86f8d2d737 remove underline, format language 2023-04-22 15:42:46 +02:00
Bram Kragten
1ded47d368 Use assist_pipeline in voice command dialog (#16257)
* Remove speech recognition, add basic pipeline support

* Add basic voice support

* cleanup

* only use tts if pipeline supports it

* Update ha-voice-command-dialog.ts

* Fix types

* handle stop during stt

* Revert "Fix types"

This reverts commit 741781e392.

* active read only

* Update ha-voice-command-dialog.ts

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-04-21 21:50:30 -04:00
Bram Kragten
85a27e8bb1 Update add assistant dialog (#16266)
* Update add assistant dialog

* fix default agent to ha when no supported

* Update ha-tts-voice-picker.ts

* Update assist-pipeline-detail-conversation.ts

* Update ha-dialog.ts

* dont override config

* Update ha-language-picker.ts
2023-04-21 20:41:30 -04:00
renovate[bot]
878f3b8df4 Update typescript-eslint monorepo to v5.59.0 (#16271)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-21 23:26:24 +00:00
renovate[bot]
50c25a8276 Update dependency glob to v10.2.1 (#16268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-21 19:07:25 -04:00
renovate[bot]
c0de3b8269 Update formatjs monorepo (#16254)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-21 13:15:18 -04:00
Bram Kragten
09f4e19d4c Pipelines: Add voice selector, implement supported languages (#16261) 2023-04-20 22:53:05 +02:00
Bram Kragten
6e91ac2a34 fix css selector 2023-04-20 18:53:28 +02:00
Paul Bottein
49b0c7c3d1 Move error outside ha form for assist pipeline form (#16258) 2023-04-20 18:49:27 +02:00
Paul Bottein
be1867900e Use supported_languages for stt, tts and conversation (#16256)
* Use supported_languages for stt, tts and conversation

* Fix disabled condition
2023-04-20 18:01:42 +02:00
Yosi Levy
a43f49f4af Fix some RTL aligments (#16252) 2023-04-20 17:05:24 +02:00
Paul Bottein
ea0f29782d Assist pipeline language voice (#16255)
* Update types

* Split form into multiple components

* Improve design

* Send all data

* Update wording
2023-04-20 11:02:48 -04:00
Paul Bottein
65161ce581 Language selector (#16253)
* Add language selector

* Use intl display names

* Use language picker in general settings and profile

* Add nativeName option

* Add format language util

* Add display-name polyfill

* Add native name to selector

* Rename variable
2023-04-20 10:12:49 -04:00
Bram Kragten
088cc69083 Add pipeline picker/selector (#16224)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-04-20 09:41:47 +00:00
Bram Kragten
be005b4c88 Add language to conversation agent picker (#16244) 2023-04-20 11:26:42 +02:00
Steve Repsher
aac28efd32 Streamline HTML generation and consolidate templates (#16117) 2023-04-20 11:10:12 +02:00
Bram Kragten
0d020e0300 Fix stt/tts pickers (#16241) 2023-04-20 11:03:47 +02:00
Steve Repsher
eeb84f65b9 Remove unnecessary Babel plugins from dependencies (#16251) 2023-04-20 11:00:04 +02:00
Steve Repsher
22f5d6cacb Migrate Babel loose options to assumptions (#16245) 2023-04-20 10:59:08 +02:00
renovate[bot]
52a7b41096 Lock file maintenance (#16248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-20 03:18:13 +00:00
renovate[bot]
f9f87d1147 Lock file maintenance (#16246) 2023-04-19 19:00:16 -04:00
Paul Bottein
0b3dff00df Revert "Add language selector" (#16247)
Revert "Add language selector (#16242)"

This reverts commit d89ac0f30d.
2023-04-19 23:58:58 +02:00
renovate[bot]
d48a4ab00a Lock file maintenance (#16231)
* Lock file maintenance

* bump @codemirror/view and eslint-plugin-lit to remove duplicates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-04-19 21:08:48 +00:00
Paul Bottein
d89ac0f30d Add language selector (#16242) 2023-04-19 21:21:27 +02:00
Paul Bottein
3cb3f8d352 Add aliases description in voice dialog (#16233)
* Add aliases description in voice dialog

* Update style

* Remove duplicate margin
2023-04-19 13:52:55 +00:00
Bram Kragten
f507a7b8b3 Use yaml to show raw pipeline debug data (#16234) 2023-04-19 15:27:01 +02:00
Paul Bottein
910244f751 Fix sidebar tooltip (#16238) 2023-04-19 14:23:04 +02:00
Bram Kragten
0ce3757b80 Remove default options from tts/stt/conversation agent (#16236) 2023-04-19 14:05:25 +02:00
Paul Bottein
c470ced308 Use right naming convention for ui_action and ui_color selector (#16235) 2023-04-19 12:13:19 +02:00
Bram Kragten
d8cb5a6a42 Prevent delete pipeline if preferred (#16237) 2023-04-19 12:12:47 +02:00
karwosts
afa071465c ha-selector-select fires spurious valueChanged on initialization (#16216) 2023-04-19 08:58:18 +02:00
renovate[bot]
4ff450c5c3 Update dependency webpack-dev-server to v4.13.3 (#16228) 2023-04-18 20:22:42 -04:00
Bram Kragten
790faa9c31 Display historic pipeline events in assist-render-pipeline-run (#16225)
* Display historic pipeline events in `assist-render-pipeline-run`

* Add debug pipeline page

* Update assist-pipeline-run-debug.ts

* dont show alert

* Update assist-pipeline-debug.ts

* simplify

* link to run debug pipeline
2023-04-18 10:45:33 -04:00
Stefan Agner
52f609f742 Write data disk with space everywhere (#16223) 2023-04-18 10:45:23 +02:00
renovate[bot]
51157caf22 Update dependency glob to v10.1.0 (#16221)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 22:35:22 -04:00
Bram Kragten
8edb48eedc Fetch latest pipeline run (#16220)
* Fetch latest pipeline run

very basic debug, showing raw event data

* Update dialog-voice-assistant-pipeline-detail.ts

* last one, not first
2023-04-17 19:13:05 -04:00
Bram Kragten
e32771fb14 Add tts selector (#16213
* Add tts selector

* Update selector.ts

* Update ha-selector-tts.ts

* Add default

* Update ha-tts-picker.ts

* Update ha-tts-picker.ts

* Not required
2023-04-17 22:52:35 +02:00
Bram Kragten
b2f66aa51c Add stt selector (#16215
* Add stt selector

* Update ha-stt-picker.ts

* Add default

* Update ha-stt-picker.ts

* Update ha-stt-picker.ts
2023-04-17 22:09:46 +02:00
Bram Kragten
bf70427760 Add conversation agent selector (#16212
* Add conversation agent selector

* Add default option

* Update ha-conversation-agent-picker.ts

* Update ha-conversation-agent-picker.ts
2023-04-17 20:54:30 +02:00
Stefan Agner
ac1e6b87ae Change dhcp to auto in network config (#16185) 2023-04-17 18:04:09 +02:00
Bram Kragten
7fa4a75009 Pipeline debug, set pipeline instead of lang (#16217) 2023-04-17 11:35:51 -04:00
Bram Kragten
0f622589a3 Allow to set a default pipeline (#16209) 2023-04-17 10:51:17 -04:00
karwosts
dae107d3e3 Fix ha-selector-select filter for multiple values case (#16093) 2023-04-17 11:16:16 +02:00
dependabot[bot]
09ff5cdb58 Bump actions/checkout from 3.5.0 to 3.5.2 (#16208)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 09:23:16 +02:00
renovate[bot]
1d42821ff5 Update dependency core-js to v3.30.1 (#16206) 2023-04-17 01:13:53 +00:00
renovate[bot]
6d0a468e09 Update dependency @codemirror/autocomplete to v6.5.1 (#16200) 2023-04-16 20:54:52 -04:00
renovate[bot]
6df02130d9 Update dependency @rollup/plugin-commonjs to v24.1.0 (#16189) 2023-04-15 16:31:40 -04:00
renovate[bot]
f9c790e0bb Update dependency html-minifier-terser to v7.2.0 (#16181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-14 18:13:39 -04:00
renovate[bot]
9d46f0cecd Update dependency @codemirror/view to v6.9.4 (#16183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-14 17:58:37 -04:00
Bram Kragten
e4302a0bb5 Fix onboarding add integration (#16163) 2023-04-14 14:38:34 -04:00
Eric Severance
b1f9469002 Add webhook trigger allowed_methods/local_only options (#11680)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-14 16:33:21 +02:00
Joakim Sørensen
0478aed28c Remove ha-call-api-button (#16182) 2023-04-14 14:35:25 +02:00
Joakim Sørensen
3a1fff81b8 Move add-on rebuild over to WS for newer core versions (#16180) 2023-04-14 07:33:03 -04:00
renovate[bot]
fa4550a848 Update typescript-eslint monorepo to v5.58.0 (#16176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 23:49:20 -04:00
Bram Kragten
689bc48f31 Rename voice_assistant to assist_pipeline (#16177) 2023-04-13 17:25:32 -04:00
Bram Kragten
a998465600 Fix demo deployment (#16178
Update demo_deployment.yaml
2023-04-13 21:37:03 +02:00
Bram Kragten
b21605e260 Fix demo deployment (#16178
Update demo_deployment.yaml
2023-04-13 21:34:06 +02:00
Paul Bottein
178ad2dffa Fix back button when directly opening subview (#16145) 2023-04-13 21:16:59 +02:00
Paul Bottein
2e7d973597 Use body scroll with ha-drawer (#16137) 2023-04-13 21:15:01 +02:00
Bram Kragten
a741faced1 Update assist config layout a bit (#16170
* Update assist config a bit

* update images

* Update assist-pref.ts
2023-04-13 15:27:17 +02:00
Paul Bottein
5e352f6194 Voice assistants pipeline UI (#16167) 2023-04-13 12:52:10 +00:00
renovate[bot]
639c120b56 Update dependency instant-mocha to v1.5.1 (#16160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 08:42:24 -04:00
J. Nick Koston
7f4dadfc20 Fix energy panel fetching all stats instead of only sum (#16161) 2023-04-13 11:48:14 +02:00
Joakim Sørensen
ddb523c133 Use certificate status for better feedback when initialising remote (#16147) 2023-04-13 11:11:47 +02:00
Bram Kragten
21645c2361 Bumped version to 20230411.1 2023-04-13 11:01:42 +02:00
Bram Kragten
e781be885d Fix context provider not updated on initializing of hass object (#16159) 2023-04-13 11:01:37 +02:00
akston
b15b0e25d6 Fix cropped person image transparency (#16112) 2023-04-13 11:01:18 +02:00
Paul Bottein
2d74873db0 Prevent edit and move view button triggered in the same time (#16143) 2023-04-13 11:00:57 +02:00
Bram Kragten
fbb59b1459 Fix context provider not updated on initializing of hass object (#16159) 2023-04-13 08:56:52 +00:00
renovate[bot]
1a9b99dd72 Update dependency glob to v10 (#16153)
* Update dependency glob to v10

* Use named export in gallery pages task

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-04-13 03:50:02 +00:00
Bram Kragten
442f73b8c5 Add initial expose UI (#16138)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-04-12 18:33:40 +02:00
Paul Bottein
a5edb4caaf Prevent edit and move view button triggered in the same time (#16143) 2023-04-12 14:07:54 +02:00
J. Nick Koston
49a14a7265 Avoid fetching unused stats state column for more info (#16141) 2023-04-12 10:00:03 +02:00
Bram Kragten
6a5568ad4f Optimize app entrypoint (#16048)
* Optimize app entrypoint

* review

* remove legacy support
2023-04-11 13:16:47 +00:00
akston
deb53eb180 Fix cropped person image transparency (#16112) 2023-04-11 15:08:29 +02:00
Paul Bottein
b076301513 Add sample rate to assist pipeline debug (#16135) 2023-04-11 08:32:18 -04:00
Bram Kragten
d50f2bf38c 20230411.0 (#16136) 2023-04-11 10:53:02 +02:00
Bram Kragten
a1180b7118 Merge branch 'master' into dev 2023-04-11 10:34:52 +02:00
Bram Kragten
0f45d2e842 Bumped version to 20230411.0 2023-04-11 10:32:24 +02:00
Bram Kragten
770675ab27 Fix button card not updating enough (#16102) 2023-04-11 10:25:54 +02:00
renovate[bot]
8a8da45761 Update dependency eslint to v8.38.0 (#16134) 2023-04-11 01:08:50 +00:00
Paul Bottein
97f983e34a Fix iOS dashboard scroll issue (#16129) 2023-04-10 22:17:37 +02:00
renovate[bot]
45d9b33c75 Update dependency lit to v2.7.2 (#16133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 15:30:38 -04:00
renovate[bot]
f3a1b6763f Update dependency eslint-plugin-lit-a11y to v2.4.1 (#16132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 15:28:38 -04:00
renovate[bot]
8c6d84e6b0 Update dependency lint-staged to v13.2.1 (#16127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 09:39:07 -04:00
renovate[bot]
2774db1b93 Update dependency @web/dev-server-rollup to v0.4.1 (#16126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 13:34:31 +00:00
renovate[bot]
da58aed64c Update dependency core-js to v3.30.0 (#16105)
* Update dependency core-js to v3.30.0

* Update babel preset

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-04-10 13:21:35 +00:00
renovate[bot]
88951a0a70 Update dependency @web/dev-server to v0.1.38 (#16124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 09:13:42 -04:00
renovate[bot]
54b4efee45 Update dependency @rollup/plugin-node-resolve to v15.0.2 (#16109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 08:53:07 -04:00
renovate[bot]
43bfe76f63 Update typescript-eslint monorepo to v5.57.1 (#16104) 2023-04-07 12:17:53 -04:00
renovate[bot]
657ae1a7fa Update dependency lit to v2.7.1 (#16103) 2023-04-07 03:05:15 +00:00
renovate[bot]
ac95820350 Update dependency glob to v9.3.4 (#16065) 2023-04-06 22:47:04 -04:00
renovate[bot]
bd45aa38b4 Update vaadinWebComponents monorepo to v23.3.10 (#16097) 2023-04-06 22:43:36 -04:00
Bram Kragten
494a9f8475 20230406.1 2023-04-06 18:28:17 +02:00
Bram Kragten
067cf19889 Bumped version to 20230406.1 2023-04-06 18:26:01 +02:00
Paul Bottein
cc4e815a58 Fix background and padding on dashboard views (#16098)Co-authored-by: Bram Kragten <mail@bramkragten.nl>
* Fix background and padding on dashboard views

* Clean code

* update fab position clean

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-06 18:25:23 +02:00
Paul Bottein
de00842f22 Revert "Fix background and padding on dashboard views"
This reverts commit 3d200da438.
2023-04-06 17:40:48 +02:00
Paul Bottein
3d200da438 Fix background and padding on dashboard views 2023-04-06 17:39:21 +02:00
Bram Kragten
0364c5e493 Revert "Fix theme background of view" (#16094
Revert "Fix theme background of view (#16083)"

This reverts commit 723b3844ac.
2023-04-06 17:19:12 +02:00
Bram Kragten
2750837d1e 20230406.0 (#16090) 2023-04-06 15:50:53 +02:00
Bram Kragten
d1ad72c6ff Bumped version to 20230406.0 2023-04-06 15:36:29 +02:00
Bram Kragten
723b3844ac Fix theme background of view (#16083) 2023-04-06 15:34:49 +02:00
Bram Kragten
54f8d33b1f Dont show options button for helpers that dont support it (#16089) 2023-04-06 15:32:16 +02:00
Bram Kragten
4c702ac7c2 fix analytics translations in onboarding (#16086) 2023-04-06 12:41:38 +00:00
Bram Kragten
c7b3c4df27 fix integration filter menu disappearing (#16088) 2023-04-06 14:40:02 +02:00
Bram Kragten
56cc4e8d4d Fix tooltip being cutoff in history panel (#16087) 2023-04-06 14:39:53 +02:00
Paul Bottein
0e8c280763 Change graph zone unit (#16082) 2023-04-06 14:14:24 +02:00
Paul Bottein
ff715c6cb7 Don't check for entity id format for card editors (#16081)
Don't check for entity id format for cards
2023-04-06 14:14:13 +02:00
Bram Kragten
d41cf17932 20230405.0 (#16067) 2023-04-05 12:53:45 +02:00
Bram Kragten
81ebdf1448 Bumped version to 20230405.0 2023-04-05 12:29:59 +02:00
Bram Kragten
c640d9edf2 update url of pipline-debug (#16066) 2023-04-05 12:29:13 +02:00
Bram Kragten
6d29b1cfb8 Fix chart mouse over in more info dialog (#16060) 2023-04-05 11:35:14 +02:00
Bram Kragten
e784205e1e fix panel card height (#16059) 2023-04-05 11:35:06 +02:00
Bram Kragten
1596578f96 Fix automation editor (#16057) 2023-04-05 10:20:21 +02:00
Bram Kragten
28304bb1dc Make deprecation warning instead of error (#16055) 2023-04-04 15:01:33 +02:00
Paul Bottein
32bbc9421b Translate theme settings (#16053) 2023-04-04 14:04:05 +02:00
Paul Bottein
6e35f841cc Fix more info vacuum status (#16051) 2023-04-04 13:36:45 +02:00
Paul Bottein
99e6547807 Fix fan speed for new more info and tile feature (#16050) 2023-04-04 13:36:33 +02:00
renovate[bot]
9764a0f23f Update dependency @webcomponents/webcomponentsjs to v2.8.0 (#16026)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-04 00:35:27 -04:00
renovate[bot]
12918580ac Update dependency webpack-dev-server to v4.13.2 (#16049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-04 03:48:54 +00:00
renovate[bot]
61a7652ae1 Update dependency @webcomponents/scoped-custom-element-registry to v0.0.9 (#16025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-03 23:29:49 -04:00
Paulus Schoutsen
c885d08a32 Merge runPipeline code and allow picking language (#16018)
* Merge runPipeline code and allow picking language

* Add download button

* Allow to continue audio conversations once stopped
2023-04-03 16:43:59 -04:00
Bram Kragten
322cc26ecc 20230403.0 (#16046) 2023-04-03 21:01:15 +02:00
Paul Bottein
6068d5e5cd Use state as mode for alarm mode tile feature (#16045
* Use state as mode for alarm mode tile feature

* reorder modes
2023-04-03 20:56:54 +02:00
Bram Kragten
890be2c177 Fix drawer in RTL (#16039
* Fix drawer in RTL

* format

* make it update when lang changes

* Update ha-drawer.ts

* Update ha-drawer.ts
2023-04-03 20:55:38 +02:00
Bram Kragten
423709dd23 Add deprecation warning Polymer (#16044) 2023-04-03 20:37:49 +02:00
Bram Kragten
4b73baa098 Bumped version to 20230403.0 2023-04-03 20:18:25 +02:00
Bram Kragten
dba16edabc make supported feature selector any instead of all (#16040)
make filterSupportedFeature any instead of all
2023-04-03 13:53:37 -04:00
Bram Kragten
975f371ba8 Add channel to thread network info (#16041) 2023-04-03 13:53:12 -04:00
Bram Kragten
36b2a1bca3 Add swipe to close action to drawer in modal mode (#16042) 2023-04-03 13:52:54 -04:00
Bram Kragten
fdf36adc3c Fix elements below scrollbar in Safari (#16037) 2023-04-03 19:44:40 +02:00
Paul Bottein
b506791535 Fix history scrollbar (#16036) 2023-04-03 18:41:51 +02:00
renovate[bot]
206574eb9f Update babel monorepo to v7.21.4 (#16029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-03 12:10:23 -04:00
Bram Kragten
19ab29d130 Handle safe areas (#16032) 2023-04-03 15:52:02 +02:00
Paul Bottein
f61f0e4e52 Fix for long translation in alarm more info in ios (#16034) 2023-04-03 13:11:57 +00:00
Bram Kragten
a32e6a9ac9 Don't open sidebar when a dialog is open (#16030) 2023-04-03 14:59:42 +02:00
Bram Kragten
d7b8823234 Prevent document scroll when modal drawer is open (#16033) 2023-04-03 14:59:31 +02:00
Steve Repsher
d9b0d5765a Add automatic retries to translation fetches (#16020) 2023-04-02 21:03:18 +02:00
Joakim Sørensen
6eb3fb1076 Use the name and size from the new disks property (#15954)
* Use the name and size from the new disks property

* Move SN down to secondary
2023-04-02 08:07:08 -04:00
Bram Kragten
8e7fc7b9c5 20230401.0 (#16015) 2023-04-01 18:47:28 +02:00
Bram Kragten
ddfe02eb70 Bumped version to 20230401.0 2023-04-01 18:20:48 +02:00
Bram Kragten
acaaf25500 Use ha-drawer instead of mwc-drawer (#16013) 2023-04-01 16:18:52 +00:00
renovate[bot]
c6c3e63101 Update dependency @web/dev-server to v0.1.37 (#16008) 2023-04-01 10:31:47 -04:00
renovate[bot]
e0fe4631f9 Update dependency eslint to v8.37.0 (#16007)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-01 01:56:46 -04:00
Paulus Schoutsen
232f70d44c Allow having conversations (#15961)
* Allow having conversations

* Add timeout to run-start data

* willUpdate
2023-03-31 15:44:32 -04:00
Bram Kragten
273904a6eb Add support for supported_features for entity selector (#16003) 2023-03-31 15:07:41 -04:00
Steve Repsher
91caffc4e1 Improve bundle chunk hashes and names (#15991) 2023-03-31 12:49:25 -04:00
Bram Kragten
e302c6c408 20230331.0 (#16001) 2023-03-31 17:16:48 +02:00
Bram Kragten
abcb904def Bumped version to 20230331.0 2023-03-31 16:37:33 +02:00
Bram Kragten
36c5d70597 Add sidebar actions to external bus (#15999) 2023-03-31 16:36:11 +02:00
Paul Bottein
b0b7998757 Fix for long translation in alarm more info (#16000) 2023-03-31 14:24:03 +00:00
Paul Bottein
33ec1e15a9 Fix labels on new more info (#15983) 2023-03-31 15:57:35 +02:00
Paul Bottein
d97ddcd31a Catch alarm control panel errors (#15998) 2023-03-31 15:51:44 +02:00
Paul Bottein
73c286a493 Fix ha header bar height (#15996)
* Fix ha header bar height in more info

* Fix ha header bar height in more places
2023-03-31 15:44:22 +02:00
Franck Nijhof
3e954eef02 Extend get_states (#15985) 2023-03-31 15:29:24 +02:00
Paul Bottein
a94b211d3e Fix ha-settings-row overflow (#15993) 2023-03-31 13:02:36 +02:00
renovate[bot]
1293e5f61f Update typescript-eslint monorepo to v5.57.0 (#15986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-30 15:35:02 -04:00
Bram Kragten
4483a8b9a2 20230330.0 (#15982) 2023-03-30 17:08:04 +02:00
Bram Kragten
287b0b9235 Bumped version to 20230330.0 2023-03-30 16:58:32 +02:00
Bram Kragten
3d6743ae3e Align header paddings (#15981) 2023-03-30 16:57:25 +02:00
Bram Kragten
5193f2c6a4 Fix header when sidebar always hidden (#15980) 2023-03-30 16:46:31 +02:00
Paul Bottein
e6772e8b89 Fix fan more info state display (#15979) 2023-03-30 16:20:30 +02:00
Bram Kragten
dcac853b71 Improve graph tooltips (#15887
* Improve graph tooltips

* Use xy for state charts

* intersect, bigger hitRadius

* improve energy

* fix position tooltips
2023-03-30 16:12:26 +02:00
Bram Kragten
0df096d68b Fix overflow, change position of action-handler (#15978) 2023-03-30 16:10:54 +02:00
Bram Kragten
ef10cc77f7 Fix lovelace background, tweak headers (#15977) 2023-03-30 16:10:43 +02:00
Paul Bottein
e52b2c49a6 Fix mouse event for remove icon in ha file upload (#15976) 2023-03-30 11:59:50 +00:00
Paul Bottein
78cc75c57c Fix cover more info state display (#15974) 2023-03-30 09:55:13 +00:00
Bram Kragten
2b38a1ce33 Fix dialogs under sidebar, headers (#15973) 2023-03-30 11:46:34 +02:00
Steve Repsher
1f1898fa46 Make module types explicit and convert some to ESM (#15964) 2023-03-30 11:23:43 +02:00
renovate[bot]
fcc95825e3 Update dependency sinon to v15.0.3 (#15972) 2023-03-29 21:03:33 -04:00
Bram Kragten
a4e36d6145 20230329.0 (#15971) 2023-03-29 18:09:10 +02:00
Bram Kragten
bdfdab439a Merge branch 'master' into dev 2023-03-29 17:54:53 +02:00
Bram Kragten
8c59537032 Bumped version to 20230329.0 2023-03-29 17:48:14 +02:00
Bram Kragten
f5a4affdec Use mwc-drawer (#10335
* Use mwc-drawer

* Update home-assistant-main.ts

* Implement top-app-bar

* Update home-assistant-main.ts

* update hui-root

* WIP

tabs don't work yet

* migrate most panels

* fixed

* notifications-drawer

* developer tools

* lovelace

* Update hui-root.ts

* Update hui-root.ts

* Update notification-drawer.ts

* fix dev tools

* Update ha-panel-developer-tools.ts
2023-03-29 17:46:34 +02:00
Bram Kragten
f19fdeacba bump @lit-labs/context, fix bug in button card + optimise (#15968) 2023-03-29 12:45:52 +00:00
Paul Bottein
e0f7544d2f Alarm mode tile feature (#15967) 2023-03-29 12:27:39 +02:00
Paul Bottein
4d2d7cd125 Use nothing in more lit template (#15966)
* Use nothing in more lit template

* Use nothing in more lit template
2023-03-29 12:20:25 +02:00
Bram Kragten
0f5320c6fb Drop polymer from authorize and onboarding entrypoint (#15760)
* Drop polymer from authorize and onboarding entrypoint

* Update ha-icon.ts

* dedupe
2023-03-29 12:17:42 +02:00
karwosts
4d52913a01 Add missing import for duration selector (#15960) 2023-03-28 20:25:06 -04:00
karwosts
0f97a76428 Fix map card error rendering (#15910) 2023-03-28 16:15:56 +00:00
Paul Bottein
f2cf598f98 Fan speed tile feature (#15958)
* Move fan speed rules outside fan more info

* Add fan speed tile feature

* Improve select style
2023-03-28 17:59:07 +02:00
Franck Nijhof
a6f9482bf6 Improve/extend description of conditions (#15943) 2023-03-28 16:43:00 +02:00
Paul Bottein
48c74c8660 Add more info alarm control panel (#15893)
* Add more info alarm control panel

* Improve buttons sizes

* Add triggered, arming and pending state

* Add keypad

* Improve alarm code dialog

* Fix code condition

* Clean code

* Fix mode selection with code

* Use nothing
2023-03-28 16:31:25 +02:00
Paul Bottein
3a700aebcc Improve padding to avoid input number overflow (#15888) 2023-03-28 14:40:02 +02:00
Paul Bottein
cd6aac85d2 Update oscillating icon (#15948) 2023-03-28 13:28:52 +02:00
renovate[bot]
77b227a7d1 Update vaadinWebComponents monorepo to v23.3.9 (#15951) 2023-03-27 21:11:59 -04:00
Stefan Agner
b785fedef2 Add-on store: Use more formal wording (#15952)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-27 22:18:18 +02:00
renovate[bot]
66a202be7e Update dependency @lezer/highlight to v1.1.4 (#15949) 2023-03-27 09:31:45 -04:00
renovate[bot]
0ad02013ba Update dependency prettier to v2.8.7 (#15950) 2023-03-27 09:30:40 -04:00
Paul Bottein
1b2eaedba0 Don't wait for slider release to update color temp (#15914) 2023-03-27 10:34:05 +02:00
Paul Bottein
8ea350a488 Add cover new more info (#15694)
* Add cover new  more info

* Improve tilt cover control

* Improve controls

* Better handle group

* Refactor toggle component

* Use deep purple for cover and adjust deep purple color

* Update purple color

* Feedbacks

* Change color

* Improve tilt backgroud constrast
2023-03-27 10:11:28 +02:00
dependabot[bot]
8ff56bd8f5 Bump actions/stale from 7.0.0 to 8.0.0 (#15945)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 09:41:03 +02:00
dependabot[bot]
dd7ec07f29 Bump actions/checkout from 3.4.0 to 3.5.0 (#15946)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 09:29:50 +02:00
Paulus Schoutsen
520f489830 Pipeline updates (#15926)
* Allow using TTS

* Allow streaming audio from frontens to STT

* Improve stop recording

* Even better stop
2023-03-26 22:42:08 -04:00
renovate[bot]
395358b192 Update dependency vis-network to v9.1.6 (#15944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-26 21:42:10 -04:00
Raman Gupta
a19ff5aef5 Add milliseconds support for duration sensors (#15895) 2023-03-26 23:52:18 +02:00
renovate[bot]
34f8b48fbe Update dependency glob to v9.3.2 (#15938) 2023-03-25 19:18:59 +00:00
renovate[bot]
01f8b4e1c4 Update dependency marked to v4.3.0 (#15935) 2023-03-25 19:02:09 +00:00
renovate[bot]
9e1cdf8215 Update dependency vis-data to v7.1.6 (#15929) 2023-03-25 14:41:15 -04:00
renovate[bot]
551127b844 Update dependency vis-network to v9.1.5 (#15925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-24 14:34:05 -04:00
renovate[bot]
afe42629b2 Update dependency systemjs to v6.14.1 (#15924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-24 14:32:17 -04:00
renovate[bot]
848d12e6fe Update dependency intl-messageformat to v10.3.3 (#15920) 2023-03-24 08:38:44 -04:00
renovate[bot]
65bd373af4 Update dependency glob to v9.3.1 (#15919) 2023-03-24 08:37:01 -04:00
renovate[bot]
91c099632d Update dependency prettier to v2.8.6 (#15921) 2023-03-24 08:35:01 -04:00
Sven Serlier
9053bc7b78 Update URLs (#15915)
* Update URL

* Update URL
2023-03-24 11:27:45 +01:00
renovate[bot]
9c4b0259a8 Update typescript-eslint monorepo to v5.56.0 (#15917) 2023-03-23 19:14:28 -04:00
renovate[bot]
7930f3879d Update dependency eslint-config-prettier to v8.8.0 (#15916) 2023-03-23 19:09:19 -04:00
Paulus Schoutsen
d9dbb69e62 Update voice debug for new API (#15913)
* Update voice debug for new API

* Update imports

* Remove wrong key

* Some HTML formatting
2023-03-23 14:44:23 -04:00
Bram Kragten
74cfccaac7 Add context providers and transform decorator (#15902) 2023-03-23 18:31:01 +01:00
Bram Kragten
4ba7e5cf0f Fix css minifying (#15912) 2023-03-23 18:28:23 +01:00
renovate[bot]
fc76d8f1cf Update dependency @polymer/polymer to v3.5.1 (#15720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 16:18:31 +00:00
renovate[bot]
3eb07e9bc3 Update dependency fs-extra to v11.1.1 (#15911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 16:58:04 +01:00
karwosts
4e6ed61e2b Add default placeholders for various number fields in cards (#15903) 2023-03-23 15:15:38 +01:00
renovate[bot]
ca6d1544d1 Update dependency @mdi/js to v7.2.96 (#15904)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 13:00:01 +00:00
renovate[bot]
81e9bc894b Update CodeMirror (#15908)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 12:55:38 +00:00
renovate[bot]
173d13ae66 Update dependency @mdi/svg to v7.2.96 (#15905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 08:42:32 -04:00
renovate[bot]
886ae791bc Update dependency prettier to v2.8.5 (#15907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 08:38:30 -04:00
renovate[bot]
50b7e72688 Lock file maintenance (#15865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-22 17:24:36 +00:00
karwosts
d07ae1cf48 Fix statistics graph days_to_show can't be erased (#15892) 2023-03-22 17:56:04 +01:00
karwosts
da2de3c7d2 Fix problems in map card when hours_to_show is 0 (#15900) 2023-03-22 17:55:30 +01:00
karwosts
7c62b08fdd Allow map card to render passive zones (#15901) 2023-03-22 17:51:47 +01:00
renovate[bot]
4f5fca7c60 Update dependency intl-messageformat to v10.3.2 (#15899)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-22 10:03:42 -04:00
Paul Bottein
45c153d374 Add fan new more info (#15843)
* Add more info fan

* Change icon

* Use backend translations

* Fix computeAttributeValueDisplay

* Clean code

* Clean code

* Fix some styles

* Improve ha-select rounded style

* Use button instead of select

* Show fan speed percentage
2023-03-22 13:20:14 +01:00
Franck Nijhof
cd2996734c Compute (attribute) states in automation trigger descriptions (#15848) 2023-03-22 11:44:43 +01:00
Steve Repsher
4abc2a65cb Migrate to html-minifier-terser and improve some minification (#15864) 2023-03-22 11:42:16 +01:00
karwosts
89decd2f31 Force app-datepicker calendar to render in ltr (#15894) 2023-03-22 11:24:16 +01:00
renovate[bot]
04a16812d3 Update dependency webpack-dev-server to v4.13.1 (#15896) 2023-03-21 19:16:59 -04:00
renovate[bot]
cadbc501e2 Update dependency webpack-dev-server to v4.13.0 (#15891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-20 22:27:15 +00:00
renovate[bot]
0d95d856c1 Update dependency hls.js to v1.3.5 (#15890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-20 18:11:37 -04:00
Paul Bottein
d272783258 Mock history stream for demo (#15886)
* Mock history stream for demo

* Fix type error
2023-03-20 20:39:01 +01:00
Paul Bottein
65d3af6fd6 Add white mode to more info light (#15774) 2023-03-20 20:38:48 +01:00
Bram Kragten
24c3ddb96b Allow reset of otbr network, thread panel fixes (#15815) 2023-03-20 20:06:40 +01:00
dependabot[bot]
c9d709152a Bump actions/checkout from 3.3.0 to 3.4.0 (#15883)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 09:07:14 +01:00
renovate[bot]
d5bc892bae Update Yarn to v3.5.0 (#15879) 2023-03-19 21:40:00 +00:00
Paulus Schoutsen
a5ea7b33b0 Add duration for stage (#15857)
* Add duration for stage

* formatNumber
2023-03-19 05:16:31 -04:00
renovate[bot]
c29568d164 Update dependency @open-wc/dev-server-hmr to v0.1.4 (#15859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-18 19:53:39 +00:00
renovate[bot]
57e1769c06 Update dependency @web/dev-server-rollup to v0.4.0 (#15852)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-18 19:39:16 +00:00
renovate[bot]
abd2070011 Update dependency eslint-plugin-lit-a11y to v2.4.0 (#15862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-18 19:34:56 +00:00
renovate[bot]
840450d9e5 Update dependency @web/dev-server to v0.1.36 (#15851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-18 15:22:27 -04:00
renovate[bot]
178163cbc7 Update dependency @types/sortablejs to v1.15.1 (#15858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-18 15:19:17 -04:00
renovate[bot]
dcca02477a Update dependency webpack-dev-server to v4.12.0 (#15855) 2023-03-17 19:46:43 -04:00
renovate[bot]
c06990f309 Update dependency @types/leaflet to v1.9.3 (#15854) 2023-03-17 19:42:41 -04:00
Paulus Schoutsen
1c9e3915e8 Improve pipeline debug styling (#15849) 2023-03-17 13:04:14 -04:00
renovate[bot]
30b8dc258a Update dependency glob to v9.3.0 (#15847)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 12:35:09 -04:00
renovate[bot]
f31043cfdc Update dependency @babel/core to v7.21.3 (#15850)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 12:34:21 -04:00
Paul Bottein
c0c83d3721 Add analytics translations (#15821)
* Add analytics translations

* Move translations to panels

* Fix learn more link
2023-03-17 16:26:53 +01:00
Franck Nijhof
dd08909fef Show unknown attribute state as Unknown instead of a dash (#15846) 2023-03-17 16:21:23 +01:00
karwosts
952028a7be Only pick entities with location in map card editor (#15839) 2023-03-17 16:19:43 +01:00
Jesse Moody
b0f3006c4b Update rollup links (#15835) 2023-03-17 16:17:55 +01:00
Paul Bottein
27098c5f3f Create control select component (#15819) 2023-03-17 16:16:51 +01:00
Franck Nijhof
fec061f5d1 Extend attribute to hide from (numeric) state triggers (#15836) 2023-03-17 16:15:34 +01:00
Paulus Schoutsen
db08c5029b Voice assistant (#15841)
* Add basic debug panel for voice assistant pipelines

* Add more info to start event

* Copy on change

* Use latest data model

* Apply suggestions from code review

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

* Fix CSS

* Also use ha-button

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2023-03-17 10:38:08 -04:00
renovate[bot]
c5be2acd46 Update dependency glob to v9 (#15726)
* Update dependency glob to v9

* Adjust to new API

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-03-17 13:28:51 +00:00
Franck Nijhof
0232c11bc2 Translate entity attribute names & attribute states (#15822) 2023-03-17 11:43:59 +01:00
renovate[bot]
dfd7acd713 Update typescript-eslint monorepo to v5.55.0 (#15837) 2023-03-17 00:35:13 -04:00
Jesse Moody
24f1677809 Fix can not typo (#15830) 2023-03-16 16:18:31 +01:00
Bram Kragten
7b2afa3df9 Bumped version to 20230309.1 2023-03-16 14:41:03 +01:00
Bram Kragten
13a3db4141 Bump style-mod (#15805) 2023-03-16 14:39:42 +01:00
Steve Repsher
aeb7f8ff36 Fix webpack source maps (#15663) 2023-03-16 14:38:55 +01:00
Paul Bottein
db62e9f922 Add constant selector (#15783) 2023-03-16 14:22:19 +01:00
renovate[bot]
1861547d9b Update dependency core-js to v3.29.1 (#15833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 13:54:45 +01:00
renovate[bot]
43684795a4 Update dependency @types/leaflet to v1.9.2 (#15831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 13:52:23 +01:00
Franck Nijhof
0158d7e3e5 Adjust backend translations for entity components (#15820)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-16 13:51:38 +01:00
Erik Montnemery
77dcace95e Drop unused Google entity settings from cloud (#15832) 2023-03-16 11:08:57 +01:00
renovate[bot]
60d106d9c3 Update dependency sinon to v15.0.2 (#15829) 2023-03-15 20:24:42 -04:00
karwosts
020aab0584 Align charts when show_names: false (#15782)
* Align charts when show_names: false

* fixes per code review
2023-03-15 12:29:45 +01:00
renovate[bot]
27808c9853 Update dependency eslint to v8.36.0 (#15816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 09:02:43 -04:00
renovate[bot]
1a9b9da0db Update dependency @codemirror/commands to v6.2.2 (#15814)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 21:23:13 +01:00
renovate[bot]
fe19963ea9 Update dependency lint-staged to v13.2.0 (#15810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 20:47:02 +01:00
Paul Bottein
3afe1f83c7 Add back button to history and logbook when coming from more info dialog (#15811) 2023-03-13 20:13:22 +01:00
Paul Bottein
6cb4b5f429 Fix displayed month when opening date range picker (#15808) 2023-03-13 20:12:28 +01:00
Paul Bottein
7b676cbd91 Display cover position in tile card when opening and closing (#15809) 2023-03-13 17:33:14 +01:00
Paul Bottein
bf1cabca6e Fix discover blueprint tips not displayed in automation editor (#15812) 2023-03-13 17:19:21 +01:00
Paul Bottein
effb4b9f7a Force using history for all entity domains on map card (#15804) 2023-03-13 11:52:27 +01:00
Bram Kragten
1bc7bb0169 Fix suffix in zwave config panel, send config on change instead of input (#15779) 2023-03-13 11:47:44 +01:00
karwosts
3abc5c42d0 Fix long entity names overflowing energy panel settings (#15786) 2023-03-13 11:06:30 +01:00
Bram Kragten
cc011a4d47 Bump style-mod (#15805) 2023-03-13 11:05:08 +01:00
renovate[bot]
ca0338436c Update dependency @material/web to v1.0.0-pre.4 (#15796)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 11:03:45 +01:00
renovate[bot]
84d31cb9d5 Update dependency terser-webpack-plugin to v5.3.7 (#15797)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-12 14:33:54 -04:00
renovate[bot]
69264b3448 Update dependency @codemirror/view to v6.9.2 (#15793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-11 15:24:17 -05:00
renovate[bot]
01a098e5aa Update dependency lint-staged to v13.1.4 (#15790)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-10 13:47:32 -05:00
renovate[bot]
11b1e056dc Update dependency rollup-plugin-terser to v7 (#15767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-09 16:17:29 -05:00
renovate[bot]
4e99e32ca2 Update typescript-eslint monorepo to v5.54.1 (#15789)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-09 16:03:43 -05:00
Paul Bottein
a8d7f8a7fe 20230309.0 (#15784) 2023-03-09 16:32:36 +01:00
Paul Bottein
9602c68640 Bumped version to 20230309.0 2023-03-09 16:22:14 +01:00
renovate[bot]
9a0699ba84 Update dependency eslint-config-prettier to v8.7.0 (#15777) 2023-03-09 09:00:40 -05:00
Joakim Sørensen
47cfc3d27c Move deleting backups to WS (#15773) 2023-03-09 11:32:52 +01:00
renovate[bot]
77d395b0c9 Update dependency @rollup/plugin-node-resolve to v15 (#15722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-09 00:32:57 -05:00
renovate[bot]
baee563bdd Update dependency @rollup/plugin-replace to v5 (#15723)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 16:37:10 -05:00
renovate[bot]
bc5345af95 Update dependency @rollup/plugin-commonjs to v24 (#15717)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 16:05:48 -05:00
renovate[bot]
52e2033f52 Update dependency @rollup/plugin-json to v6 (#15721)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 13:34:15 -05:00
renovate[bot]
dfa26ee7a1 Update dependency @rollup/plugin-babel to v6 (#15716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 13:23:18 -05:00
Bram Kragten
0cde0fc9a9 Remove deprecated and removed icons (#15762) 2023-03-08 12:28:34 +01:00
Paul Bottein
4ab1723c99 Don't assume that effect list is not null (#15764)
* Don't assume that effect list is not null

* Don't assume that rgb, rgbw and rgbww are defined
2023-03-08 10:24:28 +01:00
Yosi Levy
4f1c4bdcb9 Fix RTL & missing translation & misalign hostnam (#15758) 2023-03-07 22:10:21 +01:00
karwosts
55edeb474e Preserve custom names in statistics graph when modifying entity list (#15695) 2023-03-06 17:10:08 +01:00
karwosts
4d19e3ad63 Fix overzealous loading of ha-service-control default values (#15741) 2023-03-06 17:06:38 +01:00
Bram Kragten
0b3e954752 20230306.0 (#15749) 2023-03-06 12:06:01 +01:00
karwosts
f193563649 Disable attribute validation on initial load of ha-selector-attribute (#15697)Co-authored-by: Bram Kragten <mail@bramkragten.nl>
* Disable attribute validation on initial load of ha-selector-attribute

* Update src/components/ha-selector/ha-selector-attribute.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-06 11:47:09 +01:00
Bram Kragten
77c3b5b5a5 Bumped version to 20230306.0 2023-03-06 11:46:32 +01:00
Paul Bottein
9bb36e38e6 Fix number format for monetary device class (#15693) 2023-03-06 09:53:53 +01:00
karwosts
1741b051fc Fix statistics-picker filter when no entity selected (#15659)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-06 09:52:16 +01:00
karwosts
98e21370fd Fix yaml editor behavior of statistics graph card (#15742) 2023-03-06 09:49:42 +01:00
Erik Montnemery
40b9e62a87 Pass placeholders to config and option flow title (#15746) 2023-03-06 09:49:01 +01:00
Steve Repsher
8e8fb4ea13 Reconfigure Renovate (#15743) 2023-03-05 21:23:13 +01:00
Franck Nijhof
6dc7508460 Revert "Configure Renovate" (#15729)
Revert "Configure Renovate (#15618)"

This reverts commit be909d0a9c.
2023-03-05 11:11:06 +01:00
renovate[bot]
9055099a18 Update dependency @web/dev-server-rollup to v0.3.21 (#15713)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-05 00:50:22 -05:00
renovate[bot]
6b4e8c1e06 Update dependency rollup-plugin-terser to v5.3.1 (#15718)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-04 23:18:29 -05:00
renovate[bot]
cbeee01d75 Update dependency @rollup/plugin-babel to v5.3.1 (#15709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-04 23:12:12 -05:00
renovate[bot]
76bdf96c6d Update dependency @rollup/plugin-json to v4.1.0 (#15712)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-04 23:07:01 -05:00
renovate[bot]
645eea0bd4 Update vaadinWebComponents monorepo to v23.3.8 (#15719)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-05 04:06:07 +00:00
renovate[bot]
7453ea1e40 Pin dependencies (#15708)
* Pin dependencies

* Only pin polymer

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
2023-03-05 03:48:37 +00:00
renovate[bot]
b64fc8ec3b Pin dependencies (#15705) 2023-03-05 02:58:29 +00:00
renovate[bot]
3c73fcb0bf Update Yarn to v3.4.1 (#15711) 2023-03-04 21:41:02 -05:00
renovate[bot]
c5c668bd7b Pin dependencies (#15707) 2023-03-04 21:35:04 -05:00
renovate[bot]
be909d0a9c Configure Renovate (#15618) 2023-03-04 20:52:55 -05:00
Paul Bottein
19efe9dcdd Only show more info settings button for admin users (#15689)
Only show settings button for admin users
2023-03-03 12:24:01 +01:00
Paul Bottein
a57609380a 20230302.0 (#15678) 2023-03-02 14:45:40 +01:00
Paul Bottein
84affcce33 Bumped version to 20230302.0 2023-03-02 14:41:47 +01:00
Paul Bottein
d113d44d5a Use state color for on and off in more info (#15677) 2023-03-02 14:37:26 +01:00
Paul Bottein
afe1b7ef59 Use display precision for number format none (#15674)
* Use display precision for number format none

* Update src/common/number/format_number.ts

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

* prettier

* Fix 0 value

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-02 10:19:27 +00:00
Paul Bottein
000e2ef7fc Add input boolean more info (#15675)
* Add input boolean more info

* Fix typings
2023-03-02 10:11:43 +00:00
dependabot[bot]
15394516af Bump bl from 1.2.2 to 1.2.3 (#15668)
Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Changelog](https://github.com/rvagg/bl/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 00:01:48 -05:00
Steve Repsher
a0033d9112 Fix minification of SVG template literals (#15670) 2023-03-01 23:57:11 -05:00
dependabot[bot]
895ebcdb2d Bump yargs-parser from 5.0.0 to 5.0.1 (#15660) 2023-03-01 19:56:08 -05:00
dependabot[bot]
e7044ce40c Bump copy-props from 2.0.4 to 2.0.5 (#15656)
Bumps [copy-props](https://github.com/gulpjs/copy-prop) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/gulpjs/copy-prop/releases)
- [Commits](https://github.com/gulpjs/copy-prop/commits)

---
updated-dependencies:
- dependency-name: copy-props
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-01 14:38:33 -05:00
Brandon Rothweiler
a0e71b9478 Change "shutdown" to "shut down" when used as a verb (#15658) 2023-03-01 16:51:09 +01:00
Bram Kragten
db1f81e0ef 20230301.0 (#15657) 2023-03-01 16:36:00 +01:00
Bram Kragten
657a74e8ad Bumped version to 20230301.0 2023-03-01 15:32:57 +01:00
Bram Kragten
f803bbadc9 Set css optimise level to 0 (#15652) 2023-03-01 14:24:00 +00:00
Paul Bottein
2ab8bba4b0 Sort null and undefined at the bottom in data-table (#15651)
Sort null and undefined at the bottom in datatable
2023-03-01 14:22:57 +00:00
Philip Allgaier
1a1c00ba62 Add loading info text to hardware config page (#15616)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-03-01 15:10:14 +01:00
Bram Kragten
7b4850b5d6 Bump core js, replace serve with serve-handler (#15637)
* Bump core js, remove serve from deps

* resplace serve with serve-handler
2023-03-01 09:08:56 -05:00
dependabot[bot]
42688e100c Bump hls.js from 1.3.3 to 1.3.4 (#15644)
Bumps [hls.js](https://github.com/video-dev/hls.js) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/video-dev/hls.js/releases)
- [Changelog](https://github.com/video-dev/hls.js/blob/master/docs/release-process.md)
- [Commits](https://github.com/video-dev/hls.js/compare/v1.3.3...v1.3.4)

---
updated-dependencies:
- dependency-name: hls.js
  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>
2023-03-01 09:04:48 -05:00
Bram Kragten
d32cde3cf8 Fix more info position (#15650) 2023-03-01 13:42:42 +00:00
Paul Bottein
34c15d96c1 Reduce more-info dialog margin (#15649)
Reduce more-info margin
2023-03-01 13:28:35 +00:00
Paul Bottein
0d869d53e3 Adapt more info control height for small screen (#15647)
* Adapt more info control height for small screen

* Fix light picker sliders
2023-03-01 12:15:12 +01:00
Paul Bottein
ccf670465b Fix statistics name sorting in developer tools (#15646) 2023-03-01 10:30:11 +00:00
Erik Montnemery
4a9ec7233d Fetch weather units from core (#15212) 2023-03-01 11:24:48 +01:00
Paul Bottein
c747ab7605 Add on/off icon for some domains (#15640) 2023-03-01 11:24:35 +01:00
Paul Bottein
9c703ab469 Add color temperature value to light more info (#15639) 2023-03-01 11:24:01 +01:00
Paul Bottein
e3b797e85c Fix more info for disabled entity (#15641) 2023-03-01 10:29:19 +01:00
Bram Kragten
a5541996d7 Prevent config menu jump when cloud info loads (#15638)
Prevent config menu jump
2023-02-28 17:21:52 +01:00
Paul Bottein
ea95fb98aa Fix lock more info with attributes (#15622)
* Fix lock more info with attributes

* Update src/dialogs/more-info/controls/more-info-lock.ts

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

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-02-28 10:34:35 +00:00
karwosts
4b428a60cd Fix a hang in history graph card editor (#15623) 2023-02-28 11:06:51 +01:00
Steve Repsher
9ce4563dd4 Prefer nothing over empty templates (#15633) 2023-02-28 11:02:47 +01:00
J. Nick Koston
4031d9cc78 Avoid loading the whole entity registry for more info (#15627) 2023-02-28 10:58:45 +01:00
J. Nick Koston
20f2f5b317 Avoid fetching all stats metadata when there are no entities on the energy panel (#15591)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-02-28 10:57:04 +01:00
Paulus Schoutsen
6af57fa2cd Temp patch to fix Rollup build (#15631) 2023-02-28 10:54:27 +01:00
Steve Repsher
17e6e132d1 Minify HTML and CSS template literals (#15624) 2023-02-28 00:02:04 -05:00
dependabot[bot]
67d064db28 Bump @typescript-eslint/eslint-plugin from 5.53.0 to 5.54.0 (#15629)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.53.0 to 5.54.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.54.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 04:37:18 +00:00
dependabot[bot]
e0df5e4631 Bump @typescript-eslint/parser from 5.53.0 to 5.54.0 (#15628)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.53.0 to 5.54.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.54.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 04:20:49 +00:00
Paul Bottein
a8a85a2af6 20230227.0 (#15625) 2023-02-27 21:10:57 +01:00
Paul Bottein
702c24d908 Bumped version to 20230227.0 2023-02-27 21:02:33 +01:00
Bram Kragten
df8f46388f 20230224.0 (#15588) 2023-02-24 21:06:33 +01:00
Bram Kragten
dd6437376d 20230223.0 (#15575) 2023-02-23 19:01:26 +01:00
Bram Kragten
971d2ff1c2 20230222.0 (#15551)Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steve Repsher <steverep@users.noreply.github.com> Co-authored-by: Bram Kragten <mail@bramkragten.nl> Co-authored-by: Paul Bottein <paul.bottein@gmail.com> Co-authored-by: Flavien Charlon <Flavien@users.noreply.github.com> Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com> Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com> Co-authored-by: Erik Montnemery <erik@montnemery.com> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Yosi Levy <37745463+yosilevy@users.noreply.github.com> Co-authored-by: lunmay <28674102+lunmay@users.noreply.github.com> Co-authored-by: Jc2k <john.carr@unrouted.co.uk> Co-authored-by: chiahsing <chiahsing@gmail.com> Co-authored-by: Paulus Schoutsen <balloob@gmail.com> Fix a coloring issue with climate states (#15325) resolver-webpack from 0.13.1 to 0.13.2 (#15355) resolver-webpack](https://github.com/import-js/eslint-plugin-import) from 0.13.1 to 0.13.2. fix some errors (#15334) Fix stats data being fetched for all entities when there are no energy/water stat ids (#15428) Fix custom card documentation url (#15439) fixes (#15446) fix dedupe precommit (#15399) Fix typo from restart dialog (whitch -> which) (#15458) Fix typo in water consumption description (#15464) Fix initial scroll inside more info dialog (#15473) Fix alert padding inside more info dialog (#15477) Fix area name in target picker (#15511) fix history crash) (#15509) Fix promise constructors with returns (#15486) fixes feb23 (#15487) Fix errors in duration data processing in Automation UI Editor (#15422) Fix map sizing in grids and h-stacks (#15290) Fix a typo: Add OpenTread Border Router (#15528) Fix tile card typings (#15529) fix more info history tooltips (#15533) Fix double defined cloud-account (#15537) Fix more info control assumed state color (#15548) Fix a bug in cast launcher that hassURL and path are incorrectly passed (#15546) 2023-02-22 18:16:25 +01:00
Bram Kragten
e6de8ec94d 20230202.0 (#15323) 2023-02-02 20:45:17 +01:00
Bram Kragten
0e06267055 20230201.0 (#15307) 2023-02-01 17:17:12 +01:00
Bram Kragten
63a35c9d68 20230130.0 (#15278) 2023-01-30 22:03:34 +01:00
923 changed files with 37926 additions and 20734 deletions

33
.browserslistrc Normal file
View File

@@ -0,0 +1,33 @@
[modern]
# Support for dynamic import is the main litmus test for serving modern builds.
# Although officially a ES2020 feature, browsers implemented it early, so this
# enables all of ES2017 and some features in ES2018.
supports es6-module-dynamic-import
# Exclude Safari 11-12 because of a bug in tagged template literals
# https://bugs.webkit.org/show_bug.cgi?id=190756
# Note: Dropping version 11 also enables several more ES2018 features
not Safari < 13
not iOS < 13
# Exclude unsupported browsers
not dead
[legacy]
# Legacy builds are served when modern requirements are not met and support browsers:
# - released in the last 7 years + current alpha/beta versionss
# - with global utilization above 0.05%
# The lattermost query ensures that support for popular old browsers is not dropped too early
# (e.g. IE 11, Android 4.4, or Samsung 4).
#
# In addition, legacy browsers must support some minimum features that cannot be polyfilled:
# - ES5 (strict mode)
# - web sockets to communicate with backend
# - inline SVG used widely in buttons, widgets, etc.
# - custom events used for most user interactions
# - CSS flexbox used in the majority of the layout
# Nearly all of these are redundant with the above rules.
# As of May 2023, only web sockets must be added to the query.
unreleased versions
last 7 years
> 0.05% and supports websockets

View File

@@ -5,9 +5,3 @@ ENV \
DEBIAN_FRONTEND=noninteractive \
DEVCONTAINER=true \
PATH=$PATH:./node_modules/.bin
# Install nvm
COPY .nvmrc /tmp/.nvmrc
RUN \
su vscode -c \
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"

View File

@@ -5,7 +5,7 @@
"context": ".."
},
"appPort": "8124:8123",
"postCreateCommand": "script/bootstrap",
"postStartCommand": "script/bootstrap",
"containerEnv": {
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
},

View File

@@ -20,7 +20,7 @@
"settings": {
"import/resolver": {
"webpack": {
"config": "./webpack.config.js"
"config": "./webpack.config.cjs"
}
}
},
@@ -119,7 +119,6 @@
"lit/no-template-map": "off",
"lit/no-native-attributes": "warn",
"lit/no-this-assign-in-render": "warn",
"lit/prefer-nothing": "warn",
"lit-a11y/click-events-have-key-events": ["off"],
"lit-a11y/no-autofocus": "off",
"lit-a11y/alt-text": "warn",

View File

@@ -6,16 +6,3 @@ updates:
interval: weekly
time: "06:00"
open-pull-requests-limit: 10
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "03:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
ignore:
# Ignore rollup and plugins until everything else is updated
- dependency-name: "*rollup*"
- dependency-name: "@rollup/*"
- dependency-name: "serve"

View File

@@ -9,7 +9,6 @@ on:
- master
env:
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
jobs:
@@ -22,14 +21,14 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
with:
ref: dev
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
@@ -58,14 +57,14 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
with:
ref: master
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies

View File

@@ -11,7 +11,6 @@ on:
- master
env:
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -25,11 +24,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/checkout@v3.5.2
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable
@@ -48,11 +47,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/checkout@v3.5.2
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable
@@ -66,11 +65,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/checkout@v3.5.2
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable
@@ -84,11 +83,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/checkout@v3.5.2
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
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

@@ -10,27 +10,26 @@ on:
- master
env:
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
jobs:
deploy_dev:
runs-on: ubuntu-latest
name: Demo Development
if: github.event_name != 'push' || github.ref != 'master'
if: github.event_name != 'push' || github.ref_name != 'master'
environment:
name: Demo Development
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
with:
ref: dev
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
@@ -53,20 +52,20 @@ jobs:
deploy_master:
runs-on: ubuntu-latest
name: Demo Production
if: github.event_name == 'push' && github.ref == 'master'
if: github.event_name == 'push' && github.ref_name == 'master'
environment:
name: Demo Production
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
with:
ref: master
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies

View File

@@ -6,7 +6,6 @@ on:
- cron: "0 0 * * *"
env:
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
jobs:
@@ -17,12 +16,12 @@ jobs:
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies

View File

@@ -11,7 +11,6 @@ on:
- dev
env:
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
jobs:
@@ -22,12 +21,12 @@ 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@v3.3.0
uses: actions/checkout@v3.5.2
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies

View File

@@ -7,7 +7,6 @@ on:
env:
PYTHON_VERSION: "3.10"
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
permissions:
@@ -21,17 +20,17 @@ jobs:
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
@@ -43,7 +42,7 @@ jobs:
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- name: Bump version
run: script/version_bump.js nightly
run: script/version_bump.cjs nightly
- name: Build nightly Python wheels
run: |

View File

@@ -7,7 +7,6 @@ on:
env:
PYTHON_VERSION: "3.10"
NODE_VERSION: 16
NODE_OPTIONS: --max_old_space_size=6144
# Set default workflow permissions
@@ -24,7 +23,7 @@ jobs:
contents: write # Required to upload release assets
steps:
- name: Checkout the repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
- name: Verify version
uses: home-assistant/actions/helpers/verify-version@master
@@ -34,10 +33,10 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node ${{ env.NODE_VERSION }}
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
@@ -75,7 +74,7 @@ jobs:
echo "home-assistant-frontend==$version" > ./requirements.txt
- name: Build wheels
uses: home-assistant/wheels@2022.10.1
uses: home-assistant/wheels@2023.04.0
with:
abi: cp310
tag: musllinux_1_2

View File

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

View File

@@ -7,19 +7,15 @@ on:
paths:
- src/translations/en.json
env:
NODE_VERSION: 16
jobs:
upload:
name: Upload
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
- name: Upload Translations
run: |
export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}"
./script/translations_upload_base

2
.nvmrc
View File

@@ -1 +1 @@
16
18

View File

@@ -0,0 +1,39 @@
diff --git a/modular/sortable.complete.esm.js b/modular/sortable.complete.esm.js
index 02e9f2d6bebeb430fe6e7c1cc3f9c3c9df051f14..bb8268b0844a1faa4108cc92c0be2a3dbaf23f83 100644
--- a/modular/sortable.complete.esm.js
+++ b/modular/sortable.complete.esm.js
@@ -1657,7 +1657,7 @@ Sortable.prototype =
target = parent; // store last element
}
/* jshint boss:true */
- while (parent = parent.parentNode);
+ while (parent = parent.parentNode || parent.getRootNode().host);
}
_unhideGhostForTarget();
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
index b04c8b4634f7c6b4ef1aadbb48afe6564306dea9..39a107163c8c336ebd669b5ea8a936af87e1c1e7 100644
--- a/modular/sortable.core.esm.js
+++ b/modular/sortable.core.esm.js
@@ -1657,7 +1657,7 @@ Sortable.prototype =
target = parent; // store last element
}
/* jshint boss:true */
- while (parent = parent.parentNode);
+ while (parent = parent.parentNode || parent.getRootNode().host);
}
_unhideGhostForTarget();
diff --git a/modular/sortable.esm.js b/modular/sortable.esm.js
index 6ec7ed1bb557e21c2578200161e989c65d23150b..0a05475a22904472fac6c13f524c674da76584b0 100644
--- a/modular/sortable.esm.js
+++ b/modular/sortable.esm.js
@@ -1657,7 +1657,7 @@ Sortable.prototype =
target = parent; // store last element
}
/* jshint boss:true */
- while (parent = parent.parentNode);
+ while (parent = parent.parentNode || parent.getRootNode().host);
}
_unhideGhostForTarget();

File diff suppressed because one or more lines are too long

873
.yarn/releases/yarn-3.5.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,5 @@
defaultSemverRangePrefix: ""
nodeLinker: node-modules
plugins:
@@ -6,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-3.3.1.cjs
yarnPath: .yarn/releases/yarn-3.5.1.cjs

View File

@@ -1,6 +1,15 @@
const path = require("path");
const env = require("./env.js");
const paths = require("./paths.js");
const env = require("./env.cjs");
const paths = require("./paths.cjs");
// 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 = () => {
const ref = env.version().endsWith("dev")
? process.env.GITHUB_SHA || "dev"
: env.version();
return `https://raw.githubusercontent.com/home-assistant/frontend/${ref}`;
};
// Files from NPM Packages that should not be imported
// eslint-disable-next-line unused-imports/no-unused-vars
@@ -53,60 +62,93 @@ module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
...defineOverlay,
});
module.exports.terserOptions = (latestBuild) => ({
module.exports.htmlMinifierOptions = {
caseSensitive: true,
collapseWhitespace: true,
conservativeCollapse: true,
decodeEntities: true,
removeComments: true,
removeRedundantAttributes: true,
minifyCSS: {
compatibility: "*,-properties.zeroUnits",
},
};
module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
safari10: !latestBuild,
ecma: latestBuild ? undefined : 5,
output: { comments: false },
ecma: latestBuild ? 2015 : 5,
format: { comments: false },
sourceMap: !isTestBuild,
});
module.exports.babelOptions = ({ latestBuild }) => ({
module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
babelrc: false,
compact: false,
assumptions: {
privateFieldsAsProperties: true,
setPublicClassFields: true,
setSpreadProperties: true,
},
browserslistEnv: latestBuild ? "modern" : "legacy",
// Must be unambiguous because some dependencies are CommonJS only
sourceType: "unambiguous",
presets: [
!latestBuild && [
[
"@babel/preset-env",
{
useBuiltIns: "entry",
corejs: { version: "3.28", proposals: true },
useBuiltIns: latestBuild ? false : "entry",
corejs: latestBuild ? false : { version: "3.30", proposals: true },
bugfixes: true,
},
],
"@babel/preset-typescript",
].filter(Boolean),
],
plugins: [
[
path.resolve(
paths.polymer_dir,
"build-scripts/babel-plugins/inline-constants-plugin.js"
"build-scripts/babel-plugins/inline-constants-plugin.cjs"
),
{
modules: ["@mdi/js"],
ignoreModuleNotFound: true,
},
],
// Part of ES2018. Converts {...a, b: 2} to Object.assign({}, a, {b: 2})
!latestBuild && [
"@babel/plugin-proposal-object-rest-spread",
{ loose: true, useBuiltIns: true },
// Minify template literals for production
isProdBuild && [
"template-html-minifier",
{
modules: {
lit: [
"html",
{ name: "svg", encapsulation: "svg" },
{ name: "css", encapsulation: "style" },
],
"@polymer/polymer/lib/utils/html-tag": ["html"],
},
strictCSS: true,
htmlMinifier: module.exports.htmlMinifierOptions,
failOnError: true, // we can turn this off in case of false positives
},
],
// Only support the syntax, Webpack will handle it.
"@babel/plugin-syntax-import-meta",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-top-level-await",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
// Import helpers and regenerator from runtime package
[
"@babel/plugin-transform-runtime",
{ version: require("../package.json").dependencies["@babel/runtime"] },
],
// Support some proposals still in TC39 process
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }],
["@babel/plugin-proposal-private-methods", { loose: true }],
["@babel/plugin-proposal-private-property-in-object", { loose: true }],
["@babel/plugin-proposal-class-properties", { loose: true }],
].filter(Boolean),
exclude: [
// \\ for Windows, / for Mac OS and Linux
/node_modules[\\/]core-js/,
/node_modules[\\/]webpack[\\/]buildin/,
],
sourceMaps: !isTestBuild,
});
const nameSuffix = (latestBuild) => (latestBuild ? "-latest" : "-es5");
const outputPath = (outputRoot, latestBuild) =>
path.resolve(outputRoot, latestBuild ? "frontend_latest" : "frontend_es5");
@@ -114,29 +156,32 @@ const publicPath = (latestBuild, root = "") =>
latestBuild ? `${root}/frontend_latest/` : `${root}/frontend_es5/`;
/*
BundleConfig {
// Object with entrypoints that need to be bundled
entry: { [name: string]: pathToFile },
// Folder where bundled files need to be written
outputPath: string,
// absolute url-path where bundled files can be found
publicPath: string,
// extra definitions that we need to replace in source
defineOverlay: {[name: string]: value },
// if this is a production build
isProdBuild: boolean,
// If we're targeting latest browsers
latestBuild: boolean,
// If we're doing a stats build (create nice chunk names)
isStatsBuild: boolean,
// Names of entrypoints that should not be hashed
dontHash: Set<string>
}
*/
BundleConfig {
// Object with entrypoints that need to be bundled
entry: { [name: string]: pathToFile },
// Folder where bundled files need to be written
outputPath: string,
// absolute url-path where bundled files can be found
publicPath: string,
// extra definitions that we need to replace in source
defineOverlay: {[name: string]: value },
// if this is a production build
isProdBuild: boolean,
// If we're targeting latest browsers
latestBuild: boolean,
// If we're doing a stats build (create nice chunk names)
isStatsBuild: boolean,
// If it's just a test build in CI, skip time on source map generation
isTestBuild: boolean,
// Names of entrypoints that should not be hashed
dontHash: Set<string>
}
*/
module.exports.config = {
app({ isProdBuild, latestBuild, isStatsBuild, isWDS }) {
app({ isProdBuild, latestBuild, isStatsBuild, isTestBuild, isWDS }) {
return {
name: "app" + nameSuffix(latestBuild),
entry: {
service_worker: "./src/entrypoints/service_worker.ts",
app: "./src/entrypoints/app.ts",
@@ -150,12 +195,14 @@ module.exports.config = {
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
isWDS,
};
},
demo({ isProdBuild, latestBuild, isStatsBuild }) {
return {
name: "demo" + nameSuffix(latestBuild),
entry: {
main: path.resolve(paths.demo_dir, "src/entrypoint.ts"),
},
@@ -185,6 +232,7 @@ module.exports.config = {
}
return {
name: "cast" + nameSuffix(latestBuild),
entry,
outputPath: outputPath(paths.cast_output_root, latestBuild),
publicPath: publicPath(latestBuild),
@@ -196,8 +244,9 @@ module.exports.config = {
};
},
hassio({ isProdBuild, latestBuild }) {
hassio({ isProdBuild, latestBuild, isStatsBuild, isTestBuild }) {
return {
name: "supervisor" + nameSuffix(latestBuild),
entry: {
entrypoint: path.resolve(paths.hassio_dir, "src/entrypoint.ts"),
},
@@ -205,15 +254,19 @@ module.exports.config = {
publicPath: publicPath(latestBuild, paths.hassio_publicPath),
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
isHassioBuild: true,
defineOverlay: {
__SUPERVISOR__: true,
__STATIC_PATH__: `"${paths.hassio_publicPath}/static/"`,
},
};
},
gallery({ isProdBuild, latestBuild }) {
return {
name: "gallery" + nameSuffix(latestBuild),
entry: {
entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"),
},

View File

@@ -1,6 +1,6 @@
const fs = require("fs");
const path = require("path");
const paths = require("./paths.js");
const paths = require("./paths.cjs");
module.exports = {
useRollup() {
@@ -17,7 +17,7 @@ module.exports = {
isStatsBuild() {
return process.env.STATS === "1";
},
isTest() {
isTestBuild() {
return process.env.IS_TEST === "true";
},
isNetlify() {

View File

@@ -1,19 +1,16 @@
// Run HA develop mode
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./locale-data.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./compress.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
require("./wds.js");
import gulp from "gulp";
import env from "../env.cjs";
import "./clean.js";
import "./compress.js";
import "./entry-html.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./locale-data.js";
import "./rollup.js";
import "./service-worker.js";
import "./translations.js";
import "./wds.js";
import "./webpack.js";
gulp.task(
"develop-app",
@@ -25,8 +22,7 @@ gulp.task(
gulp.parallel(
"gen-service-worker-app-dev",
"gen-icons-json",
"gen-pages-dev",
"gen-index-app-dev",
"gen-pages-app-dev",
"build-translations",
"build-locale-data"
),
@@ -50,11 +46,7 @@ gulp.task(
"copy-static-app",
env.useRollup() ? "rollup-prod-app" : "webpack-prod-app",
// Don't compress running tests
...(env.isTest() ? [] : ["compress-app"]),
gulp.parallel(
"gen-pages-prod",
"gen-index-app-prod",
"gen-service-worker-app-prod"
)
...(env.isTestBuild() ? [] : ["compress-app"]),
gulp.parallel("gen-pages-app-prod", "gen-service-worker-app-prod")
)
);

View File

@@ -1,14 +1,12 @@
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
import gulp from "gulp";
import env from "../env.cjs";
import "./clean.js";
import "./entry-html.js";
import "./gather-static.js";
import "./rollup.js";
import "./service-worker.js";
import "./translations.js";
import "./webpack.js";
gulp.task(
"develop-cast",
@@ -20,7 +18,7 @@ gulp.task(
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
"copy-static-cast",
"gen-index-cast-dev",
"gen-pages-cast-dev",
env.useRollup() ? "rollup-dev-server-cast" : "webpack-dev-server-cast"
)
);
@@ -36,6 +34,6 @@ gulp.task(
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
"copy-static-cast",
env.useRollup() ? "rollup-prod-cast" : "webpack-prod-cast",
"gen-index-cast-prod"
"gen-pages-cast-prod"
)
);

View File

@@ -1,37 +1,37 @@
const del = import("del");
const gulp = require("gulp");
const paths = require("../paths");
require("./translations");
import { deleteSync } from "del";
import gulp from "gulp";
import paths from "../paths.cjs";
import "./translations.js";
gulp.task(
"clean",
gulp.parallel("clean-translations", async () =>
(await del).deleteSync([paths.app_output_root, paths.build_dir])
deleteSync([paths.app_output_root, paths.build_dir])
)
);
gulp.task(
"clean-demo",
gulp.parallel("clean-translations", async () =>
(await del).deleteSync([paths.demo_output_root, paths.build_dir])
deleteSync([paths.demo_output_root, paths.build_dir])
)
);
gulp.task(
"clean-cast",
gulp.parallel("clean-translations", async () =>
(await del).deleteSync([paths.cast_output_root, paths.build_dir])
deleteSync([paths.cast_output_root, paths.build_dir])
)
);
gulp.task("clean-hassio", async () =>
(await del).deleteSync([paths.hassio_output_root, paths.build_dir])
deleteSync([paths.hassio_output_root, paths.build_dir])
);
gulp.task(
"clean-gallery",
gulp.parallel("clean-translations", async () =>
(await del).deleteSync([
deleteSync([
paths.gallery_output_root,
paths.gallery_build,
paths.build_dir,

View File

@@ -1,10 +1,10 @@
// Tasks to compress
const gulp = require("gulp");
const zopfli = require("gulp-zopfli-green");
const merge = require("merge-stream");
const path = require("path");
const paths = require("../paths");
import gulp from "gulp";
import zopfli from "gulp-zopfli-green";
import merge from "merge-stream";
import path from "path";
import paths from "../paths.cjs";
const zopfliOptions = { threshold: 150 };

View File

@@ -1,16 +1,13 @@
// Run demo develop mode
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
import gulp from "gulp";
import env from "../env.cjs";
import "./clean.js";
import "./entry-html.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./rollup.js";
import "./service-worker.js";
import "./translations.js";
import "./webpack.js";
gulp.task(
"develop-demo",
@@ -22,7 +19,7 @@ gulp.task(
"translations-enable-merge-backend",
gulp.parallel(
"gen-icons-json",
"gen-index-demo-dev",
"gen-pages-demo-dev",
"build-translations",
"build-locale-data"
),
@@ -43,6 +40,6 @@ gulp.task(
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
"copy-static-demo",
env.useRollup() ? "rollup-prod-demo" : "webpack-prod-demo",
"gen-index-demo-prod"
"gen-pages-demo-prod"
)
);

View File

@@ -1,6 +1,6 @@
const gulp = require("gulp");
const fs = require("fs/promises");
const mapStream = require("map-stream");
import fs from "fs/promises";
import gulp from "gulp";
import mapStream from "map-stream";
const inDirFrontend = "translations/frontend";
const inDirBackend = "translations/backend";

View File

@@ -1,344 +1,233 @@
// Tasks to generate entry HTML
const gulp = require("gulp");
const fs = require("fs-extra");
const path = require("path");
const template = require("lodash.template");
const minify = require("html-minifier").minify;
const paths = require("../paths.js");
const env = require("../env.js");
const templatePath = (tpl) =>
path.resolve(paths.polymer_dir, "src/html/", `${tpl}.html.template`);
import fs from "fs-extra";
import gulp from "gulp";
import { minify } from "html-minifier-terser";
import template from "lodash.template";
import path from "path";
import { htmlMinifierOptions, terserOptions } from "../bundle.cjs";
import env from "../env.cjs";
import paths from "../paths.cjs";
const readFile = (pth) => fs.readFileSync(pth).toString();
const renderTemplate = (pth, data = {}, pathFunc = templatePath) => {
const compiled = template(readFile(pathFunc(pth)));
const renderTemplate = (templateFile, data = {}) => {
const compiled = template(
fs.readFileSync(templateFile, { encoding: "utf-8" })
);
return compiled({
...data,
useRollup: env.useRollup(),
useWDS: env.useWDS(),
renderTemplate,
// Resolve any child/nested templates relative to the parent and pass the same data
renderTemplate: (childTemplate) =>
renderTemplate(
path.resolve(path.dirname(templateFile), childTemplate),
data
),
});
};
const renderDemoTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(paths.demo_dir, "src/html/", `${tpl}.html.template`)
const WRAP_TAGS = { ".js": "script", ".css": "style" };
const minifyHtml = (content, ext) => {
const wrapTag = WRAP_TAGS[ext] || "";
const begTag = wrapTag && `<${wrapTag}>`;
const endTag = wrapTag && `</${wrapTag}>`;
return minify(begTag + content + endTag, {
...htmlMinifierOptions,
conservativeCollapse: false,
minifyJS: terserOptions({
latestBuild: false, // Shared scripts should be ES5
isTestBuild: true, // Don't need source maps
}),
}).then((wrapped) =>
wrapTag ? wrapped.slice(begTag.length, -endTag.length) : wrapped
);
};
const renderCastTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(paths.cast_dir, "src/html/", `${tpl}.html.template`)
);
// Function to generate a dev task for each project's configuration
// Note Currently WDS paths are hard-coded to only work for app
const genPagesDevTask =
(
pageEntries,
inputRoot,
outputRoot,
useWDS = false,
inputSub = "src/html",
publicRoot = ""
) =>
async () => {
for (const [page, entries] of Object.entries(pageEntries)) {
const content = renderTemplate(
path.resolve(inputRoot, inputSub, `${page}.template`),
{
latestEntryJS: entries.map((entry) =>
useWDS
? `http://localhost:8000/src/entrypoints/${entry}.ts`
: `${publicRoot}/frontend_latest/${entry}.js`
),
es5EntryJS: entries.map(
(entry) => `${publicRoot}/frontend_es5/${entry}.js`
),
latestCustomPanelJS: useWDS
? "http://localhost:8000/src/entrypoints/custom-panel.ts"
: `${publicRoot}/frontend_latest/custom-panel.js`,
es5CustomPanelJS: `${publicRoot}/frontend_es5/custom-panel.js`,
}
);
fs.outputFileSync(path.resolve(outputRoot, page), content);
}
};
const renderGalleryTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(paths.gallery_dir, "src/html/", `${tpl}.html.template`)
);
const minifyHtml = (content) =>
minify(content, {
collapseWhitespace: true,
minifyJS: true,
minifyCSS: true,
removeComments: true,
});
const PAGES = ["onboarding", "authorize"];
gulp.task("gen-pages-dev", (done) => {
for (const page of PAGES) {
const content = renderTemplate(page, {
latestPageJS: `/frontend_latest/${page}.js`,
es5PageJS: `/frontend_es5/${page}.js`,
});
fs.outputFileSync(
path.resolve(paths.app_output_root, `${page}.html`),
content
// Same as previous but for production builds
// (includes minification and hashed file names from manifest)
const genPagesProdTask =
(
pageEntries,
inputRoot,
outputRoot,
outputLatest,
outputES5,
inputSub = "src/html"
) =>
async () => {
const latestManifest = fs.readJsonSync(
path.resolve(outputLatest, "manifest.json")
);
}
done();
});
const es5Manifest = outputES5
? fs.readJsonSync(path.resolve(outputES5, "manifest.json"))
: {};
const minifiedHTML = [];
for (const [page, entries] of Object.entries(pageEntries)) {
const content = renderTemplate(
path.resolve(inputRoot, inputSub, `${page}.template`),
{
latestEntryJS: entries.map((entry) => latestManifest[`${entry}.js`]),
es5EntryJS: entries.map((entry) => es5Manifest[`${entry}.js`]),
latestCustomPanelJS: latestManifest["custom-panel.js"],
es5CustomPanelJS: es5Manifest["custom-panel.js"],
}
);
minifiedHTML.push(
minifyHtml(content, path.extname(page)).then((minified) =>
fs.outputFileSync(path.resolve(outputRoot, page), minified)
)
);
}
await Promise.all(minifiedHTML);
};
gulp.task("gen-pages-prod", (done) => {
const latestManifest = require(path.resolve(
// Map HTML pages to their required entrypoints
const APP_PAGE_ENTRIES = {
"authorize.html": ["authorize"],
"onboarding.html": ["onboarding"],
"index.html": ["core", "app"],
};
gulp.task(
"gen-pages-app-dev",
genPagesDevTask(
APP_PAGE_ENTRIES,
paths.polymer_dir,
paths.app_output_root,
env.useWDS()
)
);
gulp.task(
"gen-pages-app-prod",
genPagesProdTask(
APP_PAGE_ENTRIES,
paths.polymer_dir,
paths.app_output_root,
paths.app_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
paths.app_output_es5
)
);
for (const page of PAGES) {
const content = renderTemplate(page, {
latestPageJS: latestManifest[`${page}.js`],
const CAST_PAGE_ENTRIES = {
"faq.html": ["launcher"],
"index.html": ["launcher"],
"media.html": ["media"],
"receiver.html": ["receiver"],
};
es5PageJS: es5Manifest[`${page}.js`],
});
gulp.task(
"gen-pages-cast-dev",
genPagesDevTask(CAST_PAGE_ENTRIES, paths.cast_dir, paths.cast_output_root)
);
fs.outputFileSync(
path.resolve(paths.app_output_root, `${page}.html`),
minifyHtml(content)
);
}
done();
});
gulp.task("gen-index-app-dev", (done) => {
let latestAppJS;
let latestCoreJS;
let latestCustomPanelJS;
if (env.useWDS()) {
latestAppJS = "http://localhost:8000/src/entrypoints/app.ts";
latestCoreJS = "http://localhost:8000/src/entrypoints/core.ts";
latestCustomPanelJS =
"http://localhost:8000/src/entrypoints/custom-panel.ts";
} else {
latestAppJS = "/frontend_latest/app.js";
latestCoreJS = "/frontend_latest/core.js";
latestCustomPanelJS = "/frontend_latest/custom-panel.js";
}
const content = renderTemplate("index", {
latestAppJS,
latestCoreJS,
latestCustomPanelJS,
es5AppJS: "/frontend_es5/app.js",
es5CoreJS: "/frontend_es5/core.js",
es5CustomPanelJS: "/frontend_es5/custom-panel.js",
}).replace(/#THEMEC/g, "{{ theme_color }}");
fs.outputFileSync(path.resolve(paths.app_output_root, "index.html"), content);
done();
});
gulp.task("gen-index-app-prod", (done) => {
const latestManifest = require(path.resolve(
paths.app_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
const content = renderTemplate("index", {
latestAppJS: latestManifest["app.js"],
latestCoreJS: latestManifest["core.js"],
latestCustomPanelJS: latestManifest["custom-panel.js"],
es5AppJS: es5Manifest["app.js"],
es5CoreJS: es5Manifest["core.js"],
es5CustomPanelJS: es5Manifest["custom-panel.js"],
});
const minified = minifyHtml(content).replace(/#THEMEC/g, "{{ theme_color }}");
fs.outputFileSync(
path.resolve(paths.app_output_root, "index.html"),
minified
);
done();
});
gulp.task("gen-index-cast-dev", (done) => {
const contentReceiver = renderCastTemplate("receiver", {
latestReceiverJS: "/frontend_latest/receiver.js",
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "receiver.html"),
contentReceiver
);
const contentMedia = renderCastTemplate("media", {
latestMediaJS: "/frontend_latest/media.js",
es5MediaJS: "/frontend_es5/media.js",
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "media.html"),
contentMedia
);
const contentFAQ = renderCastTemplate("launcher-faq", {
latestLauncherJS: "/frontend_latest/launcher.js",
es5LauncherJS: "/frontend_es5/launcher.js",
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "faq.html"),
contentFAQ
);
const contentLauncher = renderCastTemplate("launcher", {
latestLauncherJS: "/frontend_latest/launcher.js",
es5LauncherJS: "/frontend_es5/launcher.js",
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "index.html"),
contentLauncher
);
done();
});
gulp.task("gen-index-cast-prod", (done) => {
const latestManifest = require(path.resolve(
gulp.task(
"gen-pages-cast-prod",
genPagesProdTask(
CAST_PAGE_ENTRIES,
paths.cast_dir,
paths.cast_output_root,
paths.cast_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.cast_output_es5,
"manifest.json"
));
paths.cast_output_es5
)
);
const contentReceiver = renderCastTemplate("receiver", {
latestReceiverJS: latestManifest["receiver.js"],
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "receiver.html"),
contentReceiver
);
const DEMO_PAGE_ENTRIES = { "index.html": ["main"] };
const contentMedia = renderCastTemplate("media", {
latestMediaJS: latestManifest["media.js"],
es5MediaJS: es5Manifest["media.js"],
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "media.html"),
contentMedia
);
gulp.task(
"gen-pages-demo-dev",
genPagesDevTask(DEMO_PAGE_ENTRIES, paths.demo_dir, paths.demo_output_root)
);
const contentFAQ = renderCastTemplate("launcher-faq", {
latestLauncherJS: latestManifest["launcher.js"],
es5LauncherJS: es5Manifest["launcher.js"],
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "faq.html"),
contentFAQ
);
const contentLauncher = renderCastTemplate("launcher", {
latestLauncherJS: latestManifest["launcher.js"],
es5LauncherJS: es5Manifest["launcher.js"],
});
fs.outputFileSync(
path.resolve(paths.cast_output_root, "index.html"),
contentLauncher
);
done();
});
gulp.task("gen-index-demo-dev", (done) => {
const content = renderDemoTemplate("index", {
latestDemoJS: "/frontend_latest/main.js",
es5DemoJS: "/frontend_es5/main.js",
});
fs.outputFileSync(
path.resolve(paths.demo_output_root, "index.html"),
content
);
done();
});
gulp.task("gen-index-demo-prod", (done) => {
const latestManifest = require(path.resolve(
gulp.task(
"gen-pages-demo-prod",
genPagesProdTask(
DEMO_PAGE_ENTRIES,
paths.demo_dir,
paths.demo_output_root,
paths.demo_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.demo_output_es5,
"manifest.json"
));
const content = renderDemoTemplate("index", {
latestDemoJS: latestManifest["main.js"],
paths.demo_output_es5
)
);
es5DemoJS: es5Manifest["main.js"],
});
const minified = minifyHtml(content);
const GALLERY_PAGE_ENTRIES = { "index.html": ["entrypoint"] };
fs.outputFileSync(
path.resolve(paths.demo_output_root, "index.html"),
minified
);
done();
});
gulp.task(
"gen-pages-gallery-dev",
genPagesDevTask(
GALLERY_PAGE_ENTRIES,
paths.gallery_dir,
paths.gallery_output_root
)
);
gulp.task("gen-index-gallery-dev", (done) => {
const content = renderGalleryTemplate("index", {
latestGalleryJS: "./frontend_latest/entrypoint.js",
});
gulp.task(
"gen-pages-gallery-prod",
genPagesProdTask(
GALLERY_PAGE_ENTRIES,
paths.gallery_dir,
paths.gallery_output_root,
paths.gallery_output_latest
)
);
fs.outputFileSync(
path.resolve(paths.gallery_output_root, "index.html"),
content
);
done();
});
const HASSIO_PAGE_ENTRIES = { "entrypoint.js": ["entrypoint"] };
gulp.task("gen-index-gallery-prod", (done) => {
const latestManifest = require(path.resolve(
paths.gallery_output_latest,
"manifest.json"
));
const content = renderGalleryTemplate("index", {
latestGalleryJS: latestManifest["entrypoint.js"],
});
const minified = minifyHtml(content);
gulp.task(
"gen-pages-hassio-dev",
genPagesDevTask(
HASSIO_PAGE_ENTRIES,
paths.hassio_dir,
paths.hassio_output_root,
undefined,
"src",
paths.hassio_publicPath
)
);
fs.outputFileSync(
path.resolve(paths.gallery_output_root, "index.html"),
minified
);
done();
});
gulp.task("gen-index-hassio-dev", async () => {
writeHassioEntrypoint(
`${paths.hassio_publicPath}/frontend_latest/entrypoint.js`,
`${paths.hassio_publicPath}/frontend_es5/entrypoint.js`
);
});
gulp.task("gen-index-hassio-prod", async () => {
const latestManifest = require(path.resolve(
gulp.task(
"gen-pages-hassio-prod",
genPagesProdTask(
HASSIO_PAGE_ENTRIES,
paths.hassio_dir,
paths.hassio_output_root,
paths.hassio_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.hassio_output_es5,
"manifest.json"
));
writeHassioEntrypoint(
latestManifest["entrypoint.js"],
es5Manifest["entrypoint.js"]
);
});
function writeHassioEntrypoint(latestEntrypoint, es5Entrypoint) {
fs.mkdirSync(paths.hassio_output_root, { recursive: true });
// Safari 12 and below does not have a compliant ES2015 implementation of template literals, so we ship ES5
fs.writeFileSync(
path.resolve(paths.hassio_output_root, "entrypoint.js"),
`
function loadES5() {
var el = document.createElement('script');
el.src = '${es5Entrypoint}';
document.body.appendChild(el);
}
if (/.*Version\\/(?:11|12)(?:\\.\\d+)*.*Safari\\//.test(navigator.userAgent)) {
loadES5();
} else {
try {
new Function("import('${latestEntrypoint}')")();
} catch (err) {
loadES5();
}
}
`,
{ encoding: "utf-8" }
);
}
"src"
)
);

View File

@@ -1,14 +1,15 @@
// Task to download the latest Lokalise translations from the nightly workflow artifacts
const del = import("del");
const fs = require("fs/promises");
const path = require("path");
const process = require("process");
const gulp = require("gulp");
const jszip = require("jszip");
const tar = require("tar");
const { Octokit } = require("@octokit/rest");
const { createOAuthDeviceAuth } = require("@octokit/auth-oauth-device");
import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device";
import { retry } from "@octokit/plugin-retry";
import { Octokit } from "@octokit/rest";
import { deleteAsync } from "del";
import { mkdir, readFile, writeFile } from "fs/promises";
import gulp from "gulp";
import jszip from "jszip";
import path from "path";
import process from "process";
import tar from "tar";
const MAX_AGE = 24; // hours
const OWNER = "home-assistant";
@@ -37,7 +38,7 @@ gulp.task("fetch-nightly-translations", async function () {
// and stop if they are not old enough
let currentArtifact;
try {
currentArtifact = JSON.parse(await fs.readFile(ARTIFACT_FILE, "utf-8"));
currentArtifact = JSON.parse(await readFile(ARTIFACT_FILE, "utf-8"));
const currentAge =
(Date.now() - Date.parse(currentArtifact.created_at)) / 3600000;
if (currentAge < MAX_AGE) {
@@ -52,7 +53,7 @@ gulp.task("fetch-nightly-translations", async function () {
}
// To store file writing promises
const createExtractDir = fs.mkdir(EXTRACT_DIR, { recursive: true });
const createExtractDir = mkdir(EXTRACT_DIR, { recursive: true });
const writings = [];
// Authenticate to GitHub using GitHub action token if it exists,
@@ -62,7 +63,7 @@ gulp.task("fetch-nightly-translations", async function () {
tokenAuth = { token: process.env.GITHUB_TOKEN };
} else {
try {
tokenAuth = JSON.parse(await fs.readFile(TOKEN_FILE, "utf-8"));
tokenAuth = JSON.parse(await readFile(TOKEN_FILE, "utf-8"));
} catch {
if (!allowTokenSetup) {
console.log("No token found so build wil continue with English only");
@@ -87,7 +88,7 @@ gulp.task("fetch-nightly-translations", async function () {
tokenAuth = await auth({ type: "oauth" });
writings.push(
createExtractDir.then(
fs.writeFile(TOKEN_FILE, JSON.stringify(tokenAuth, null, 2))
writeFile(TOKEN_FILE, JSON.stringify(tokenAuth, null, 2))
)
);
}
@@ -95,7 +96,7 @@ gulp.task("fetch-nightly-translations", async function () {
// Authenticate with token and request workflow runs from GitHub
console.log("Fetching new translations...");
const octokit = new Octokit({
const octokit = new (Octokit.plugin(retry))({
userAgent: "Fetch Nightly Translations",
auth: tokenAuth.token,
});
@@ -131,17 +132,13 @@ gulp.task("fetch-nightly-translations", async function () {
}
writings.push(
createExtractDir.then(
fs.writeFile(ARTIFACT_FILE, JSON.stringify(latestArtifact, null, 2))
writeFile(ARTIFACT_FILE, JSON.stringify(latestArtifact, null, 2))
)
);
// Remove the current translations
const deleteCurrent = Promise.all(writings).then(
(await del).deleteAsync([
`${EXTRACT_DIR}/*`,
`!${ARTIFACT_FILE}`,
`!${TOKEN_FILE}`,
])
deleteAsync([`${EXTRACT_DIR}/*`, `!${ARTIFACT_FILE}`, `!${TOKEN_FILE}`])
);
// Get the download URL and follow the redirect to download (stored as ArrayBuffer)

View File

@@ -1,26 +1,23 @@
// Run demo develop mode
const gulp = require("gulp");
const fs = require("fs");
const path = require("path");
const { marked } = require("marked");
const glob = require("glob");
const yaml = require("js-yaml");
const env = require("../env");
const paths = require("../paths");
require("./clean.js");
require("./translations.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
import fs from "fs";
import { glob } from "glob";
import gulp from "gulp";
import yaml from "js-yaml";
import { marked } from "marked";
import path from "path";
import env from "../env.cjs";
import paths from "../paths.cjs";
import "./clean.js";
import "./entry-html.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./rollup.js";
import "./service-worker.js";
import "./translations.js";
import "./webpack.js";
gulp.task("gather-gallery-pages", async function gatherPages() {
const pageDir = path.resolve(paths.gallery_dir, "src/pages");
const files = glob.sync(path.resolve(pageDir, "**/*"));
const files = await glob(path.resolve(pageDir, "**/*"));
const galleryBuild = path.resolve(paths.gallery_dir, "build");
fs.mkdirSync(galleryBuild, { recursive: true });
@@ -89,9 +86,7 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
// Generate sidebar
const sidebarPath = path.resolve(paths.gallery_dir, "sidebar.js");
// To make watch work during development
delete require.cache[sidebarPath];
const sidebar = require(sidebarPath);
const sidebar = (await import(sidebarPath)).default;
const pagesToProcess = {};
for (const key of processed) {
@@ -161,7 +156,7 @@ gulp.task(
"gather-gallery-pages"
),
"copy-static-gallery",
"gen-index-gallery-dev",
"gen-pages-gallery-dev",
gulp.parallel(
env.useRollup()
? "rollup-dev-server-gallery"
@@ -195,6 +190,6 @@ gulp.task(
),
"copy-static-gallery",
env.useRollup() ? "rollup-prod-gallery" : "webpack-prod-gallery",
"gen-index-gallery-prod"
"gen-pages-gallery-prod"
)
);

View File

@@ -1,9 +1,9 @@
// Gulp task to gather all static files.
const gulp = require("gulp");
const path = require("path");
const fs = require("fs-extra");
const paths = require("../paths");
import fs from "fs-extra";
import gulp from "gulp";
import path from "path";
import paths from "../paths.cjs";
const npmPath = (...parts) =>
path.resolve(paths.polymer_dir, "node_modules", ...parts);
@@ -111,9 +111,10 @@ gulp.task("copy-translations-supervisor", async () => {
copyTranslations(staticDir);
});
gulp.task("copy-locale-data-supervisor", async () => {
gulp.task("copy-static-supervisor", async () => {
const staticDir = paths.hassio_output_static;
copyLocaleData(staticDir);
copyFonts(staticDir);
});
gulp.task("copy-static-app", async () => {

View File

@@ -1,17 +1,15 @@
const gulp = require("gulp");
const path = require("path");
const fs = require("fs");
const hash = require("object-hash");
import fs from "fs";
import gulp from "gulp";
import hash from "object-hash";
import path from "path";
import paths from "../paths.cjs";
const ICON_PACKAGE_PATH = path.resolve(
__dirname,
"../../node_modules/@mdi/svg/"
);
const ICON_PACKAGE_PATH = path.resolve("node_modules/@mdi/svg/");
const META_PATH = path.resolve(ICON_PACKAGE_PATH, "meta.json");
const PACKAGE_PATH = path.resolve(ICON_PACKAGE_PATH, "package.json");
const ICON_PATH = path.resolve(ICON_PACKAGE_PATH, "svg");
const OUTPUT_DIR = path.resolve(__dirname, "../../build/mdi");
const REMOVED_ICONS_PATH = path.resolve(__dirname, "../removedIcons.json");
const OUTPUT_DIR = path.resolve(paths.build_dir, "mdi");
const REMOVED_ICONS_PATH = new URL("../removedIcons.json", import.meta.url);
const encoding = "utf8";
@@ -134,11 +132,11 @@ gulp.task("gen-icons-json", (done) => {
});
const file = fs.readFileSync(PACKAGE_PATH, { encoding });
const package = JSON.parse(file);
const packageMeta = JSON.parse(file);
fs.writeFileSync(
path.resolve(OUTPUT_DIR, "iconMetadata.json"),
JSON.stringify({ version: package.version, parts })
JSON.stringify({ version: packageMeta.version, parts })
);
fs.writeFileSync(

View File

@@ -1,15 +1,13 @@
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./gen-icons-json.js");
require("./webpack.js");
require("./compress.js");
require("./rollup.js");
require("./gather-static.js");
require("./translations.js");
require("./gen-icons-json.js");
import gulp from "gulp";
import env from "../env.cjs";
import "./clean.js";
import "./compress.js";
import "./entry-html.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./rollup.js";
import "./translations.js";
import "./webpack.js";
gulp.task(
"develop-hassio",
@@ -19,11 +17,11 @@ gulp.task(
},
"clean-hassio",
"gen-dummy-icons-json",
"gen-index-hassio-dev",
"gen-pages-hassio-dev",
"build-supervisor-translations",
"copy-translations-supervisor",
"build-locale-data",
"copy-locale-data-supervisor",
"copy-static-supervisor",
env.useRollup() ? "rollup-watch-hassio" : "webpack-watch-hassio"
)
);
@@ -39,10 +37,10 @@ gulp.task(
"build-supervisor-translations",
"copy-translations-supervisor",
"build-locale-data",
"copy-locale-data-supervisor",
"copy-static-supervisor",
env.useRollup() ? "rollup-prod-hassio" : "webpack-prod-hassio",
"gen-index-hassio-prod",
"gen-pages-hassio-prod",
...// Don't compress running tests
(env.isTest() ? [] : ["compress-hassio"])
(env.isTestBuild() ? [] : ["compress-hassio"])
)
);

View File

@@ -1,24 +1,22 @@
const del = import("del");
const path = require("path");
const gulp = require("gulp");
const fs = require("fs");
const paths = require("../paths");
import { deleteSync } from "del";
import fs from "fs";
import gulp from "gulp";
import path from "path";
import paths from "../paths.cjs";
const outDir = "build/locale-data";
gulp.task("clean-locale-data", async () => (await del).deleteSync([outDir]));
gulp.task("clean-locale-data", async () => deleteSync([outDir]));
gulp.task("ensure-locale-data-build-dir", (done) => {
if (!fs.existsSync(outDir)) {
fs.mkdirSync(outDir, { recursive: true });
}
done();
gulp.task("ensure-locale-data-build-dir", async () => {
fs.mkdirSync(outDir, { recursive: true });
});
const modules = {
"intl-relativetimeformat": "RelativeTimeFormat",
"intl-datetimeformat": "DateTimeFormat",
"intl-numberformat": "NumberFormat",
"intl-displaynames": "DisplayNames",
};
gulp.task("create-locale-data", (done) => {
@@ -30,11 +28,14 @@ gulp.task("create-locale-data", (done) => {
Object.entries(modules).forEach(([module, className]) => {
Object.keys(translationMeta).forEach((lang) => {
try {
const localeData = String(
fs.readFileSync(
require.resolve(`@formatjs/${module}/locale-data/${lang}.js`)
const localeData = fs
.readFileSync(
path.resolve(
paths.polymer_dir,
`node_modules/@formatjs/${module}/locale-data/${lang}.js`
),
"utf-8"
)
)
.replace(
new RegExp(
`\\/\\*\\s*@generated\\s*\\*\\/\\s*\\/\\/\\s*prettier-ignore\\s*if\\s*\\(Intl\\.${className}\\s*&&\\s*typeof\\s*Intl\\.${className}\\.__addLocaleData\\s*===\\s*'function'\\)\\s*{\\s*Intl\\.${className}\\.__addLocaleData\\(`,
@@ -45,15 +46,13 @@ gulp.task("create-locale-data", (done) => {
.replace(/\)\s*}/im, "");
// make sure we have valid JSON
JSON.parse(localeData);
if (!fs.existsSync(path.join(outDir, module))) {
fs.mkdirSync(path.join(outDir, module), { recursive: true });
}
fs.mkdirSync(path.join(outDir, module), { recursive: true });
fs.writeFileSync(
path.join(outDir, `${module}/${lang}.json`),
localeData
);
} catch (e) {
if (e.code !== "MODULE_NOT_FOUND") {
if (e.code !== "ENOENT") {
throw e;
}
}

View File

@@ -1,13 +1,14 @@
// Tasks to run Rollup
const path = require("path");
const gulp = require("gulp");
const rollup = require("rollup");
const handler = require("serve-handler");
const http = require("http");
const log = require("fancy-log");
const open = require("open");
const rollupConfig = require("../rollup");
const paths = require("../paths");
import log from "fancy-log";
import gulp from "gulp";
import http from "http";
import open from "open";
import path from "path";
import { rollup } from "rollup";
import handler from "serve-handler";
import paths from "../paths.cjs";
import rollupConfig from "../rollup.cjs";
const bothBuilds = (createConfigFunc, params) =>
gulp.series(
@@ -46,7 +47,7 @@ function createServer(serveOptions) {
);
}
function watchRollup(createConfig, extraWatchSrc = [], serveOptions) {
function watchRollup(createConfig, extraWatchSrc = [], serveOptions = null) {
const { inputOptions, outputOptions } = createConfig({
isProdBuild: false,
latestBuild: true,

View File

@@ -1,11 +1,12 @@
// Generate service worker.
// Based on manifest, create a file with the content as service_worker.js
const gulp = require("gulp");
const path = require("path");
const fs = require("fs-extra");
const workboxBuild = require("workbox-build");
const sourceMapUrl = require("source-map-url");
const paths = require("../paths.js");
import fs from "fs-extra";
import gulp from "gulp";
import path from "path";
import sourceMapUrl from "source-map-url";
import workboxBuild from "workbox-build";
import paths from "../paths.cjs";
const swDest = path.resolve(paths.app_output_root, "service_worker.js");
@@ -28,10 +29,9 @@ self.addEventListener('install', (event) => {
gulp.task("gen-service-worker-app-prod", async () => {
// Read bundled source file
const bundleManifestLatest = require(path.resolve(
paths.app_output_latest,
"manifest.json"
));
const bundleManifestLatest = fs.readJsonSync(
path.resolve(paths.app_output_latest, "manifest.json")
);
let serviceWorkerContent = fs.readFileSync(
paths.app_output_root + bundleManifestLatest["service_worker.js"],
"utf-8"
@@ -46,10 +46,9 @@ gulp.task("gen-service-worker-app-prod", async () => {
);
// Remove ES5
const bundleManifestES5 = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
const bundleManifestES5 = fs.readJsonSync(
path.resolve(paths.app_output_es5, "manifest.json")
);
fs.removeSync(paths.app_output_root + bundleManifestES5["service_worker.js"]);
fs.removeSync(
paths.app_output_root + bundleManifestES5["service_worker.js.map"]

View File

@@ -1,19 +1,24 @@
const del = import("del");
const crypto = require("crypto");
const path = require("path");
const source = require("vinyl-source-stream");
const vinylBuffer = require("vinyl-buffer");
const gulp = require("gulp");
const fs = require("fs");
const flatmap = require("gulp-flatmap");
const merge = require("gulp-merge-json");
const rename = require("gulp-rename");
const transform = require("gulp-json-transform");
const { mapFiles } = require("../util");
const env = require("../env");
const paths = require("../paths");
require("./fetch-nightly-translations");
import { createHash } from "crypto";
import { deleteSync } from "del";
import {
mkdirSync,
readdirSync,
readFileSync,
renameSync,
writeFile,
} from "fs";
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 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";
@@ -33,7 +38,12 @@ gulp.task(
// Panel translations which should be split from the core translations.
const TRANSLATION_FRAGMENTS = Object.keys(
require("../../src/translations/en.json").ui.panel
JSON.parse(
readFileSync(
path.resolve(paths.polymer_dir, "src/translations/en.json"),
"utf-8"
)
).ui.panel
);
function recursiveFlatten(prefix, data) {
@@ -120,17 +130,14 @@ function lokaliseTransform(data, original, file) {
return output;
}
gulp.task("clean-translations", async () => (await del).deleteSync([workDir]));
gulp.task("clean-translations", async () => deleteSync([workDir]));
gulp.task("ensure-translations-build-dir", (done) => {
if (!fs.existsSync(workDir)) {
fs.mkdirSync(workDir, { recursive: true });
}
done();
gulp.task("ensure-translations-build-dir", async () => {
mkdirSync(workDir, { recursive: true });
});
gulp.task("create-test-metadata", (cb) => {
fs.writeFile(
writeFile(
workDir + "/testMetadata.json",
JSON.stringify({
test: {
@@ -303,15 +310,14 @@ const fingerprints = {};
gulp.task("build-translation-fingerprints", () => {
// Fingerprint full file of each language
const files = fs.readdirSync(fullDir);
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()
? crypto
.createHash("md5")
.update(fs.readFileSync(path.join(fullDir, files[i]), "utf-8"))
? createHash("md5")
.update(readFileSync(path.join(fullDir, files[i]), "utf-8"))
.digest("hex")
: "dev",
};
@@ -327,7 +333,7 @@ gulp.task("build-translation-fingerprints", () => {
throw new Error(`Unable to find hash for ${filename}`);
}
fs.renameSync(
renameSync(
filename,
`${parsed.dir}/${parsed.name}-${fingerprints[parsed.name].hash}${
parsed.ext

View File

@@ -1,8 +1,7 @@
// Tasks to run Rollup
const gulp = require("gulp");
const { startDevServer } = require("@web/dev-server");
import gulp from "gulp";
import { startDevServer } from "@web/dev-server";
gulp.task("wds-watch-app", () => {
gulp.task("wds-watch-app", async () => {
startDevServer({
config: {
watch: true,

View File

@@ -1,18 +1,20 @@
// Tasks to run webpack.
const fs = require("fs");
const gulp = require("gulp");
const webpack = require("webpack");
const WebpackDevServer = require("webpack-dev-server");
const log = require("fancy-log");
const path = require("path");
const paths = require("../paths");
const {
import log from "fancy-log";
import fs from "fs";
import gulp from "gulp";
import path from "path";
import webpack from "webpack";
import WebpackDevServer from "webpack-dev-server";
import env from "../env.cjs";
import paths from "../paths.cjs";
import {
createAppConfig,
createDemoConfig,
createCastConfig,
createHassioConfig,
createDemoConfig,
createGalleryConfig,
} = require("../webpack");
createHassioConfig,
} from "../webpack.cjs";
const bothBuilds = (createConfigFunc, params) => [
createConfigFunc({ ...params, latestBuild: true }),
@@ -104,6 +106,8 @@ gulp.task("webpack-prod-app", () =>
prodBuild(
bothBuilds(createAppConfig, {
isProdBuild: true,
isStatsBuild: env.isStatsBuild(),
isTestBuild: env.isTestBuild(),
})
)
);
@@ -161,6 +165,8 @@ gulp.task("webpack-prod-hassio", () =>
prodBuild(
bothBuilds(createHassioConfig, {
isProdBuild: true,
isStatsBuild: env.isStatsBuild(),
isTestBuild: env.isTestBuild(),
})
)
);

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env node
// Script to print Babel plugins and Core JS polyfills that will be used by browserslist environments
import { version as babelVersion } from "@babel/core";
import presetEnv from "@babel/preset-env";
import compilationTargets from "@babel/helper-compilation-targets";
import coreJSCompat from "core-js-compat";
import { logPlugin } from "@babel/preset-env/lib/debug.js";
import { babelOptions } from "./bundle.cjs";
const detailsOpen = (heading) =>
`<details>\n<summary><h4>${heading}</h4></summary>\n`;
const detailsClose = "</details>\n";
const dummyAPI = {
version: babelVersion,
assertVersion: () => {},
caller: (callback) =>
callback({
name: "Dummy Bundler",
supportsStaticESM: true,
supportsDynamicImport: true,
supportsTopLevelAwait: true,
supportsExportNamespaceFrom: true,
}),
targets: () => ({}),
};
for (const buildType of ["Modern", "Legacy"]) {
const browserslistEnv = buildType.toLowerCase();
const babelOpts = babelOptions({ latestBuild: browserslistEnv === "modern" });
const presetEnvOpts = babelOpts.presets[0][1];
// Invoking preset-env in debug mode will log the included plugins
console.log(detailsOpen(`${buildType} Build Babel Plugins`));
presetEnv.default(dummyAPI, {
...presetEnvOpts,
browserslistEnv,
debug: true,
});
console.log(detailsClose);
// Manually log the Core-JS polyfills using the same technique
if (presetEnvOpts.useBuiltIns) {
console.log(detailsOpen(`${buildType} Build Core-JS Polyfills`));
const targets = compilationTargets.default(babelOpts?.targets, {
browserslistEnv,
});
const polyfillList = coreJSCompat({ targets }).list;
console.log(
"The following %i polyfills may be injected by Babel:\n",
polyfillList.length
);
for (const polyfill of polyfillList) {
logPlugin(polyfill, targets, coreJSCompat.data);
}
console.log(detailsClose);
}
}

View File

@@ -1,30 +1 @@
[
{
"path": "M20,20H7A2,2 0 0,1 5,18V8.94L2.23,5.64C2.09,5.47 2,5.24 2,5A1,1 0 0,1 3,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20M8.5,7A0.5,0.5 0 0,0 8,7.5V8.5A0.5,0.5 0 0,0 8.5,9H18.5A0.5,0.5 0 0,0 19,8.5V7.5A0.5,0.5 0 0,0 18.5,7H8.5M8.5,11A0.5,0.5 0 0,0 8,11.5V12.5A0.5,0.5 0 0,0 8.5,13H18.5A0.5,0.5 0 0,0 19,12.5V11.5A0.5,0.5 0 0,0 18.5,11H8.5M8.5,15A0.5,0.5 0 0,0 8,15.5V16.5A0.5,0.5 0 0,0 8.5,17H13.5A0.5,0.5 0 0,0 14,16.5V15.5A0.5,0.5 0 0,0 13.5,15H8.5Z",
"name": "android-messages"
},
{
"path": "M4,6H2V20A2,2 0 0,0 4,22H18V20H4V6M20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M20,12L17.5,10.5L15,12V4H20V12Z",
"name": "book-variant-multiple"
},
{
"path": "M21,14H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10L8,21V22H16V21L14,18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z",
"name": "desktop-mac"
},
{
"path": "M21,14V4H3V14H21M21,2A2,2 0 0,1 23,4V16A2,2 0 0,1 21,18H14L16,21V22H8V21L10,18H3C1.89,18 1,17.1 1,16V4C1,2.89 1.89,2 3,2H21M4,5H15V10H4V5M16,5H20V7H16V5M20,8V13H16V8H20M4,11H9V13H4V11M10,11H15V13H10V11Z",
"name": "desktop-mac-dashboard"
},
{
"path": "M22,24L16.75,19L17.38,21H4.5A2.5,2.5 0 0,1 2,18.5V3.5A2.5,2.5 0 0,1 4.5,1H19.5A2.5,2.5 0 0,1 22,3.5V24M12,6.8C9.32,6.8 7.44,7.95 7.44,7.95C8.47,7.03 10.27,6.5 10.27,6.5L10.1,6.33C8.41,6.36 6.88,7.53 6.88,7.53C5.16,11.12 5.27,14.22 5.27,14.22C6.67,16.03 8.75,15.9 8.75,15.9L9.46,15C8.21,14.73 7.42,13.62 7.42,13.62C7.42,13.62 9.3,14.9 12,14.9C14.7,14.9 16.58,13.62 16.58,13.62C16.58,13.62 15.79,14.73 14.54,15L15.25,15.9C15.25,15.9 17.33,16.03 18.73,14.22C18.73,14.22 18.84,11.12 17.12,7.53C17.12,7.53 15.59,6.36 13.9,6.33L13.73,6.5C13.73,6.5 15.53,7.03 16.56,7.95C16.56,7.95 14.68,6.8 12,6.8M9.93,10.59C10.58,10.59 11.11,11.16 11.1,11.86C11.1,12.55 10.58,13.13 9.93,13.13C9.29,13.13 8.77,12.55 8.77,11.86C8.77,11.16 9.28,10.59 9.93,10.59M14.1,10.59C14.75,10.59 15.27,11.16 15.27,11.86C15.27,12.55 14.75,13.13 14.1,13.13C13.46,13.13 12.94,12.55 12.94,11.86C12.94,11.16 13.45,10.59 14.1,10.59Z",
"name": "discord"
},
{
"path": "M8.06,7.78C7.5,7.78 7.17,7.73 7.08,7.64L6.66,13.73C7.19,14.05 7.88,14.3 8.72,14.5C9.56,14.71 10.78,14.77 12.38,14.67C13.97,14.58 15.63,14.23 17.34,13.64L16.55,4.22C15.67,5.09 14.38,5.91 12.66,6.66C11.13,7.31 9.81,7.69 8.72,7.78H8.06M7.97,5.34C7.28,5.94 7,6.34 7.13,6.56C7.22,6.78 7.7,6.84 8.58,6.75C9.67,6.66 10.91,6.31 12.28,5.72C13.22,5.31 14.03,4.88 14.72,4.41C15.41,3.94 15.88,3.55 16.13,3.23C16.38,2.92 16.47,2.7 16.41,2.58C16.34,2.42 16.03,2.34 15.47,2.34C14.34,2.34 12.94,2.7 11.25,3.42C9.81,4.05 8.72,4.69 7.97,5.34M17.34,2.2C17.41,2.33 17.44,2.47 17.44,2.63L18.61,17C18.61,18.73 18,20.09 16.83,21.07C15.64,22.05 14.03,22.55 12,22.55C10,22.55 8.4,22.04 7.2,21C6,20 5.39,18.64 5.39,16.92L6.09,6.47C6.09,6.22 6.2,5.94 6.42,5.63C6.64,5.31 6.84,5.06 7.03,4.88L7.36,4.59C8.33,3.78 9.5,3.08 10.88,2.5C11.81,2.08 12.73,1.77 13.62,1.57C14.5,1.37 15.3,1.3 16,1.38C16.71,1.46 17.16,1.73 17.34,2.2Z",
"name": "google-home"
},
{
"path": "M19.25,19H4.75V3H19.25M14,22H10V21H14M18,0H6A3,3 0 0,0 3,3V21A3,3 0 0,0 6,24H18A3,3 0 0,0 21,21V3A3,3 0 0,0 18,0Z",
"name": "tablet-android"
}
]
[]

View File

@@ -103,7 +103,7 @@ module.exports = function (opts = {}) {
}
delete optionsObject.type;
if (!new RegExp("^.*/").test(workerFile)) {
if (!/^.*\//.test(workerFile)) {
this.warn(
`Paths passed to the Worker constructor must be relative or absolute, i.e. start with /, ./ or ../ (just like dynamic import!). Ignoring "${workerFile}".`
);

View File

@@ -3,18 +3,18 @@ const path = require("path");
const commonjs = require("@rollup/plugin-commonjs");
const resolve = require("@rollup/plugin-node-resolve");
const json = require("@rollup/plugin-json");
const babel = require("@rollup/plugin-babel").babel;
const { babel } = require("@rollup/plugin-babel");
const replace = require("@rollup/plugin-replace");
const visualizer = require("rollup-plugin-visualizer");
const { string } = require("rollup-plugin-string");
const { terser } = require("rollup-plugin-terser");
const manifest = require("./rollup-plugins/manifest-plugin");
const worker = require("./rollup-plugins/worker-plugin");
const dontHashPlugin = require("./rollup-plugins/dont-hash-plugin");
const ignore = require("./rollup-plugins/ignore-plugin");
const manifest = require("./rollup-plugins/manifest-plugin.cjs");
const worker = require("./rollup-plugins/worker-plugin.cjs");
const dontHashPlugin = require("./rollup-plugins/dont-hash-plugin.cjs");
const ignore = require("./rollup-plugins/ignore-plugin.cjs");
const bundle = require("./bundle");
const paths = require("./paths");
const bundle = require("./bundle.cjs");
const paths = require("./paths.cjs");
const extensions = [".js", ".ts"];
@@ -39,11 +39,18 @@ const createRollupConfig = ({
inputOptions: {
input: entry,
// Some entry points contain no JavaScript. This setting silences a warning about that.
// https://rollupjs.org/guide/en/#preserveentrysignatures
// https://rollupjs.org/configuration-options/#preserveentrysignatures
preserveEntrySignatures: false,
plugins: [
ignore({
files: bundle.emptyPackages({ latestBuild }),
files: bundle
.emptyPackages({ latestBuild })
// TEMP HACK: Makes Rollup build work again
.concat(
require.resolve(
"@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min"
)
),
}),
resolve({
extensions,
@@ -54,7 +61,7 @@ const createRollupConfig = ({
commonjs(),
json(),
babel({
...bundle.babelOptions({ latestBuild }),
...bundle.babelOptions({ latestBuild, isProdBuild }),
extensions,
babelHelpers: isWDS ? "inline" : "bundled",
}),
@@ -69,7 +76,7 @@ const createRollupConfig = ({
}),
!isWDS && worker(),
!isWDS && dontHashPlugin({ dontHash }),
!isWDS && isProdBuild && terser(bundle.terserOptions(latestBuild)),
!isWDS && isProdBuild && terser(bundle.terserOptions({ latestBuild })),
!isWDS &&
isStatsBuild &&
visualizer({
@@ -83,20 +90,20 @@ const createRollupConfig = ({
* @type { import("rollup").OutputOptions }
*/
outputOptions: {
// https://rollupjs.org/guide/en/#outputdir
// https://rollupjs.org/configuration-options/#output-dir
dir: outputPath,
// https://rollupjs.org/guide/en/#outputformat
// https://rollupjs.org/configuration-options/#output-format
format: latestBuild ? "es" : "systemjs",
// https://rollupjs.org/guide/en/#outputexternallivebindings
// https://rollupjs.org/configuration-options/#output-externallivebindings
externalLiveBindings: false,
// https://rollupjs.org/guide/en/#outputentryfilenames
// https://rollupjs.org/guide/en/#outputchunkfilenames
// https://rollupjs.org/guide/en/#outputassetfilenames
// https://rollupjs.org/configuration-options/#output-entryfilenames
// https://rollupjs.org/configuration-options/#output-chunkfilenames
// https://rollupjs.org/configuration-options/#output-assetfilenames
entryFileNames:
isProdBuild && !isStatsBuild ? "[name]-[hash].js" : "[name].js",
chunkFileNames: isProdBuild && !isStatsBuild ? "c.[hash].js" : "[name].js",
assetFileNames: isProdBuild && !isStatsBuild ? "a.[hash].js" : "[name].js",
// https://rollupjs.org/guide/en/#outputsourcemap
// https://rollupjs.org/configuration-options/#output-sourcemap
sourcemap: isProdBuild ? true : "inline",
},
});

View File

@@ -2,11 +2,10 @@ const webpack = require("webpack");
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
const CompressionWebpackPlugin = require("compression-webpack-plugin");
const log = require("fancy-log");
const WebpackBar = require("webpackbar");
const paths = require("./paths.js");
const bundle = require("./bundle.js");
const paths = require("./paths.cjs");
const bundle = require("./bundle.cjs");
class LogStartCompilePlugin {
ignoredFirst = false;
@@ -23,6 +22,7 @@ class LogStartCompilePlugin {
}
const createWebpackConfig = ({
name,
entry,
outputPath,
publicPath,
@@ -30,6 +30,7 @@ const createWebpackConfig = ({
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
isHassioBuild,
dontHash,
}) => {
@@ -38,10 +39,16 @@ const createWebpackConfig = ({
}
const ignorePackages = bundle.ignorePackages({ latestBuild });
return {
name,
mode: isProdBuild ? "production" : "development",
target: ["web", latestBuild ? "es2017" : "es5"],
devtool: isProdBuild
? "cheap-module-source-map"
// For tests/CI, source maps are skipped to gain build speed
// For production, generate source maps for accurate stack traces without source code
// For development, generate "cheap" versions that can map to original line numbers
devtool: isTestBuild
? false
: isProdBuild
? "nosources-source-map"
: "eval-cheap-module-source-map",
entry,
node: false,
@@ -52,11 +59,14 @@ const createWebpackConfig = ({
use: {
loader: "babel-loader",
options: {
...bundle.babelOptions({ latestBuild }),
...bundle.babelOptions({ latestBuild, isProdBuild, isTestBuild }),
cacheDirectory: !isProdBuild,
cacheCompression: false,
},
},
resolve: {
fullySpecified: false,
},
},
{
test: /\.css$/,
@@ -69,14 +79,13 @@ const createWebpackConfig = ({
new TerserPlugin({
parallel: true,
extractComments: true,
terserOptions: bundle.terserOptions(latestBuild),
terserOptions: bundle.terserOptions({ latestBuild, isTestBuild }),
}),
],
moduleIds: isProdBuild && !isStatsBuild ? "deterministic" : "named",
chunkIds: isProdBuild && !isStatsBuild ? "deterministic" : "named",
},
plugins: [
new CompressionWebpackPlugin(),
!isStatsBuild && new WebpackBar({ fancy: !isProdBuild }),
new WebpackManifestPlugin({
// Only include the JS of entrypoints
@@ -123,6 +132,17 @@ const createWebpackConfig = ({
),
path.resolve(paths.polymer_dir, "src/util/empty.js")
),
// See `src/resources/intl-polyfill-legacy.ts` for explanation
!latestBuild &&
new webpack.NormalModuleReplacementPlugin(
new RegExp(
path.resolve(paths.polymer_dir, "src/resources/intl-polyfill.ts")
),
path.resolve(
paths.polymer_dir,
"src/resources/intl-polyfill-legacy.ts"
)
),
!isProdBuild && new LogStartCompilePlugin(),
].filter(Boolean),
resolve: {
@@ -143,18 +163,37 @@ const createWebpackConfig = ({
},
},
output: {
filename: ({ chunk }) => {
if (!isProdBuild || isStatsBuild || dontHash.has(chunk.name)) {
return `${chunk.name}.js`;
}
return `${chunk.name}.${chunk.hash.substr(0, 8)}.js`;
},
filename: ({ chunk }) =>
!isProdBuild || isStatsBuild || dontHash.has(chunk.name)
? "[name].js"
: "[name]-[contenthash].js",
chunkFilename:
isProdBuild && !isStatsBuild ? "[chunkhash:8].js" : "[id].chunk.js",
isProdBuild && !isStatsBuild ? "[id]-[contenthash].js" : "[name].js",
assetModuleFilename:
isProdBuild && !isStatsBuild ? "[id]-[contenthash][ext]" : "[id][ext]",
hashFunction: "xxhash64",
hashDigest: "base64url",
hashDigestLength: 11, // full length of 64 bit base64url
path: outputPath,
publicPath,
// To silence warning in worker plugin
globalObject: "self",
// Since production source maps don't include sources, we need to point to them elsewhere
// For dependencies, just provide the path (no source in browser)
// Otherwise, point to the raw code on GitHub for browser to load
devtoolModuleFilenameTemplate:
!isTestBuild && isProdBuild
? (info) => {
const sourcePath = info.resourcePath.replace(/^\.\//, "");
if (
sourcePath.startsWith("node_modules") ||
sourcePath.startsWith("webpack")
) {
return `no-source/${sourcePath}`;
}
return `${bundle.sourceMapURL()}/${sourcePath}`;
}
: undefined,
},
experiments: {
topLevelAwait: true,
@@ -162,9 +201,14 @@ const createWebpackConfig = ({
};
};
const createAppConfig = ({ isProdBuild, latestBuild, isStatsBuild }) =>
const createAppConfig = ({
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
}) =>
createWebpackConfig(
bundle.config.app({ isProdBuild, latestBuild, isStatsBuild })
bundle.config.app({ isProdBuild, latestBuild, isStatsBuild, isTestBuild })
);
const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) =>
@@ -175,8 +219,20 @@ const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) =>
const createCastConfig = ({ isProdBuild, latestBuild }) =>
createWebpackConfig(bundle.config.cast({ isProdBuild, latestBuild }));
const createHassioConfig = ({ isProdBuild, latestBuild }) =>
createWebpackConfig(bundle.config.hassio({ isProdBuild, latestBuild }));
const createHassioConfig = ({
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
}) =>
createWebpackConfig(
bundle.config.hassio({
isProdBuild,
latestBuild,
isStatsBuild,
isTestBuild,
})
);
const createGalleryConfig = ({ isProdBuild, latestBuild }) =>
createWebpackConfig(bundle.config.gallery({ isProdBuild, latestBuild }));

View File

@@ -1,5 +1,5 @@
const rollup = require("../build-scripts/rollup.js");
const env = require("../build-scripts/env.js");
import rollup from "../build-scripts/rollup.cjs";
import env from "../build-scripts/env.cjs";
const config = rollup.createCastConfig({
isProdBuild: env.isProdBuild(),
@@ -7,4 +7,4 @@ const config = rollup.createCastConfig({
isStatsBuild: env.isStatsBuild(),
});
module.exports = { ...config.inputOptions, output: config.outputOptions };
export default { ...config.inputOptions, output: config.outputOptions };

View File

@@ -0,0 +1,24 @@
<meta property="fb:app_id" content="338291289691179" />
<meta property="og:title" content="Home Assistant Cast" />
<meta property="og:site_name" content="Home Assistant Cast" />
<meta property="og:url" content="https://cast.home-assistant.io/" />
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Show Home Assistant on your Chromecast or Google Assistant devices with a screen."
/>
<meta
property="og:image"
content="https://cast.home-assistant.io/images/google-nest-hub.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@home_assistant" />
<meta name="twitter:title" content="Home Assistant Cast" />
<meta
name="twitter:description"
content="Show Home Assistant on your Chromecast or Google Assistant devices with a screen."
/>
<meta
name="twitter:image"
content="https://cast.home-assistant.io/images/google-nest-hub.png"
/>

View File

@@ -3,7 +3,7 @@
<head>
<title>Home Assistant Cast - FAQ</title>
<link rel="icon" href="/images/ha-cast-icon.png" type="image/png" />
<%= renderTemplate('_style_base') %>
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
<style>
body {
background-color: #e5e5e5;
@@ -35,25 +35,14 @@
/>
</head>
<body>
<%= renderTemplate('_js_base') %>
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
<script>
import("<%= latestLauncherJS %>");
<% for (const entry of latestEntryJS) { %>
import("<%= entry %>");
<% } %>
window.latestJS = true;
</script>
<script>
if (!window.latestJS) {
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5LauncherJS %>");
};
<% } else { %>
_ls("<%= es5LauncherJS %>");
<% } %>
}
</script>
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
<hc-layout subtitle="FAQ">
<style>
a {

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>Home Assistant Cast</title>
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="/images/ha-cast-icon.png" type="image/png" />
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
<style>
body {
background-color: #e5e5e5;
}
</style>
<%= renderTemplate("_social_meta.html.template") %>
</head>
<body>
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
<hc-connect></hc-connect>
<script>
<% for (const entry of latestEntryJS) { %>
import("<%= entry %>");
<% } %>
window.latestJS = true;
</script>
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-57927901-9', 'auto');
ga('send', 'pageview', location.pathname.includes("auth_callback") === -1 ? location.pathname : "/");
</script>
</body>
</html>

View File

@@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Home Assistant Cast</title>
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="/images/ha-cast-icon.png" type="image/png" />
<%= renderTemplate('_style_base') %>
<style>
body {
background-color: #e5e5e5;
}
</style>
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Home Assistant Cast">
<meta property="og:site_name" content="Home Assistant Cast">
<meta property="og:url" content="https://cast.home-assistant.io/">
<meta property="og:type" content="website">
<meta property="og:description" content="Show Home Assistant on your Chromecast or Google Assistant devices with a screen.">
<meta property="og:image" content="https://cast.home-assistant.io/images/google-nest-hub.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Home Assistant Cast">
<meta name="twitter:description" content="Show Home Assistant on your Chromecast or Google Assistant devices with a screen.">
<meta name="twitter:image" content="https://cast.home-assistant.io/images/google-nest-hub.png">
</head>
<body>
<%= renderTemplate('_js_base') %>
<hc-connect></hc-connect>
<script>
import("<%= latestLauncherJS %>");
window.latestJS = true;
</script>
<script>
if (!window.latestJS) {
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5LauncherJS %>");
};
<% } else { %>
_ls("<%= es5LauncherJS %>");
<% } %>
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-57927901-9', 'auto');
ga('send', 'pageview', location.pathname.includes("auth_callback") === -1 ? location.pathname : "/");
</script>
</body>
</html>

View File

@@ -22,25 +22,14 @@
</script>
</head>
<body>
<%= renderTemplate('_js_base') %>
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
<cast-media-player></cast-media-player>
<script>
import("<%= latestMediaJS %>");
<% for (const entry of latestEntryJS) { %>
import("<%= entry %>");
<% } %>
window.latestJS = true;
</script>
<script>
if (!window.latestJS) {
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5MediaJS %>");
};
<% } else { %>
_ls("<%= es5MediaJS %>");
<% } %>
}
</script>
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
</body>
</html>

View File

@@ -1,8 +1,10 @@
<!DOCTYPE html>
<html>
<script src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js"></script>
<script type="module" src="<%= latestReceiverJS %>"></script>
<%= renderTemplate('_style_base') %>
<% for (const entry of latestEntryJS) { %>
<script type="module" src="<%= entry %>"></script>
<% } %>
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
<style>
body {
background-color: white;

View File

@@ -190,7 +190,7 @@ export class HcConnect extends LitElement {
private _handleInputKeyDown(ev: KeyboardEvent) {
// Handle pressing enter.
if (ev.keyCode === 13) {
if (ev.key === "Enter") {
this._handleConnect();
}
}

View File

@@ -1,3 +1,5 @@
import { cast } from "chromecast-caf-receiver";
const castContext = cast.framework.CastReceiverContext.getInstance();
const playerManager = castContext.getPlayerManager();

View File

@@ -1,2 +1,3 @@
/* eslint-disable no-undef */
import { cast } from "chromecast-caf-receiver";
export const castContext = cast.framework.CastReceiverContext.getInstance();

View File

@@ -1,4 +1,4 @@
/* eslint-disable no-undef */
import { cast } from "chromecast-caf-receiver";
import { CAST_NS } from "../../../src/cast/const";
import { HassMessage } from "../../../src/cast/receiver_messages";
import "../../../src/resources/custom-card-support";

View File

@@ -1,4 +1,4 @@
import { html, TemplateResult } from "lit";
import { html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { mockHistory } from "../../../../demo/src/stubs/history";
import { LovelaceConfig } from "../../../../src/data/lovelace";
@@ -18,9 +18,9 @@ class HcDemo extends HassElement {
@state() private _lovelaceConfig?: LovelaceConfig;
protected render(): TemplateResult {
protected render() {
if (!this._lovelaceConfig) {
return html``;
return nothing;
}
return html`
<hc-lovelace

View File

@@ -1,8 +1,8 @@
const { createCastConfig } = require("../build-scripts/webpack.js");
const { isProdBuild, isStatsBuild } = require("../build-scripts/env.js");
import webpack from "../build-scripts/webpack.cjs";
import env from "../build-scripts/env.cjs";
module.exports = createCastConfig({
isProdBuild: isProdBuild(),
isStatsBuild: isStatsBuild(),
export default webpack.createCastConfig({
isProdBuild: env.isProdBuild(),
isStatsBuild: env.isStatsBuild(),
latestBuild: true,
});

View File

@@ -1,5 +1,5 @@
const rollup = require("../build-scripts/rollup.js");
const env = require("../build-scripts/env.js");
import rollup from "../build-scripts/rollup.cjs";
import env from "../build-scripts/env.cjs";
const config = rollup.createDemoConfig({
isProdBuild: env.isProdBuild(),
@@ -7,4 +7,4 @@ const config = rollup.createDemoConfig({
isStatsBuild: env.isStatsBuild(),
});
module.exports = { ...config.inputOptions, output: config.outputOptions };
export default { ...config.inputOptions, output: config.outputOptions };

View File

@@ -1,5 +1,5 @@
import { mdiTelevision } from "@mdi/js";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, state } from "lit/decorators";
import { CastManager } from "../../../src/cast/cast_manager";
import { castSendShowDemo } from "../../../src/cast/receiver_messages";
@@ -20,12 +20,12 @@ class CastDemoRow extends LitElement implements LovelaceRow {
// No config possible.
}
protected render(): TemplateResult {
protected render() {
if (
!this._castManager ||
this._castManager.castState === "NO_DEVICES_AVAILABLE"
) {
return html``;
return nothing;
}
return html`
<ha-svg-icon .path=${mdiTelevision}></ha-svg-icon>

View File

@@ -1,5 +1,5 @@
import "@material/mwc-button";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { until } from "lit/directives/until";
import "../../../src/components/ha-card";
@@ -30,9 +30,9 @@ export class HADemoCard extends LitElement implements LovelaceCard {
public setConfig(_config: LovelaceCardConfig) {}
protected render(): TemplateResult {
protected render() {
if (this._hidden) {
return html``;
return nothing;
}
return html`
<ha-card>

View File

@@ -0,0 +1,26 @@
<meta property="fb:app_id" content="338291289691179" />
<meta property="og:title" content="Home Assistant Demo" />
<meta property="og:site_name" content="Home Assistant" />
<meta property="og:url" content="https://demo.home-assistant.io/" />
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Open source home automation that puts local control and privacy first."
/>
<meta
property="og:image"
content="https://www.home-assistant.io/images/default-social.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@home_assistant" />
<meta name="twitter:title" content="Home Assistant" />
<meta
name="twitter:description"
content="Open source home automation that puts local control and privacy first."
/>
<meta
name="twitter:image"
content="https://www.home-assistant.io/images/default-social.png"
/>

View File

@@ -1,9 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
<link rel="icon" href="/static/icons/favicon.ico" />
<title>Home Assistant Demo</title>
<%= renderTemplate("../../../src/html/_header.html.template") %>
<link rel="mask-icon" href="/static/icons/mask-icon.svg" color="#03a9f4" />
<link
rel="apple-touch-icon"
@@ -35,33 +34,7 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#03a9f4" />
<meta property="fb:app_id" content="338291289691179" />
<meta property="og:title" content="Home Assistant Demo" />
<meta property="og:site_name" content="Home Assistant" />
<meta property="og:url" content="https://demo.home-assistant.io/" />
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Open source home automation that puts local control and privacy first."
/>
<meta
property="og:image"
content="https://www.home-assistant.io/images/default-social.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@home_assistant" />
<meta name="twitter:title" content="Home Assistant" />
<meta
name="twitter:description"
content="Open source home automation that puts local control and privacy first."
/>
<meta
name="twitter:image"
content="https://www.home-assistant.io/images/default-social.png"
/>
<title>Home Assistant Demo</title>
<%= renderTemplate("_social_meta.html.template") %>
<style>
html {
background-color: var(--primary-background-color, #fafafa);
@@ -107,29 +80,19 @@
</svg>
<div id="ha-launch-screen-info-box" class="ha-launch-screen-spacer"></div>
</div>
<ha-demo></ha-demo>
<%= renderTemplate('_js_base') %>
<%= renderTemplate('_preload_roboto') %>
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
<%= renderTemplate("../../../src/html/_preload_roboto.html.template") %>
<script>
import("<%= latestDemoJS %>");
window.latestJS = true;
</script>
<script>
if (!window.latestJS) {
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5DemoJS %>");
};
<% } else { %>
_ls("<%= es5DemoJS %>");
// Safari 12 and below does not have a compliant ES2015 implementation of template literals, so we ship ES5
if (!isS11_12) {
<% for (const entry of latestEntryJS) { %>
import("<%= entry %>");
<% } %>
window.latestJS = true;
}
</script>
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
<script>
var _gaq = [["_setAccount", "UA-57927901-5"], ["_trackPageview"]];
(function (d, t) {

View File

@@ -1,7 +1,7 @@
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockConfigEntries = (hass: MockHomeAssistant) => {
hass.mockWS("config_entries/get", () => [
hass.mockWS("config_entries/get_matching", () => [
{
entry_id: "co2signal",
domain: "co2signal",

View File

@@ -1,39 +1,19 @@
import { HassEntity } from "home-assistant-js-websocket";
import { HistoryStates } from "../../../src/data/history";
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
interface HistoryQueryParams {
filter_entity_id: string;
end_time: string;
}
const parseQuery = <T>(queryString: string) => {
const query: any = {};
const items = queryString.split("&");
for (const item of items) {
const parts = item.split("=");
const key = decodeURIComponent(parts[0]);
const value = parts.length > 1 ? decodeURIComponent(parts[1]) : undefined;
query[key] = value;
}
return query as T;
};
const getTime = (minutesAgo) => {
const ts = new Date(Date.now() - minutesAgo * 60 * 1000);
return ts.toISOString();
};
const randomTimeAdjustment = (diff) => Math.random() * diff - diff / 2;
const maxTime = 1440;
const generateHistory = (state, deltas) => {
const generateStateHistory = (
state: HassEntity,
deltas,
start_date: Date,
end_date: Date
) => {
const changes =
typeof deltas[0] === "object"
? deltas
: deltas.map((st) => ({ state: st }));
const timeDiff = 900 / changes.length;
const timeDiff = (end_date.getTime() - start_date.getTime()) / changes.length;
return changes.map((change, index) => {
let attributes;
@@ -47,17 +27,13 @@ const generateHistory = (state, deltas) => {
attributes = { ...state.attributes, ...change.attributes };
}
const time =
index === 0
? getTime(maxTime)
: getTime(maxTime - index * timeDiff + randomTimeAdjustment(timeDiff));
const time = start_date.getTime() + timeDiff * index;
return {
attributes,
entity_id: state.entity_id,
state: change.state || state.state,
last_changed: time,
last_updated: time,
a: attributes,
s: change.state || state.state,
lc: time / 1000,
lu: time / 1000,
};
});
};
@@ -65,15 +41,29 @@ const generateHistory = (state, deltas) => {
const incrementalUnits = ["clients", "queries", "ads"];
export const mockHistory = (mockHass: MockHomeAssistant) => {
mockHass.mockAPI(
/history\/period\/.+/,
(hass, _method, path, _parameters) => {
const params = parseQuery<HistoryQueryParams>(path.split("?")[1]);
const entities = params.filter_entity_id.split(",");
mockHass.mockWS(
"history/stream",
(
{
entity_ids,
start_time,
end_time,
}: {
entity_ids: string[];
start_time: string;
end_time?: string;
},
hass,
onChange
) => {
const states: HistoryStates = {};
const results: HassEntity[][] = [];
const start = new Date(start_time);
const end = end_time ? new Date(end_time) : new Date();
for (const entityId of entity_ids) {
states[entityId] = [];
for (const entityId of entities) {
const state = hass.states[entityId];
if (!state) {
@@ -81,7 +71,12 @@ export const mockHistory = (mockHass: MockHomeAssistant) => {
}
if (!state.attributes.unit_of_measurement) {
results.push(generateHistory(state, [state.state]));
states[entityId] = generateStateHistory(
state,
[state.state],
start,
end
);
continue;
}
@@ -120,17 +115,23 @@ export const mockHistory = (mockHass: MockHomeAssistant) => {
numberState - diff + Math.floor(Math.random() * 2 * diff);
}
results.push(
generateHistory(
{
entity_id: state.entity_id,
attributes: state.attributes,
},
Array.from({ length: statesToGenerate }, genFunc)
)
states[entityId] = generateStateHistory(
state,
Array.from({ length: statesToGenerate }, genFunc),
start,
end
);
}
return results;
setTimeout(() => {
onChange?.({
states,
start_time: start,
end_time: end,
});
}, 1);
return () => {};
}
);
};

View File

@@ -1,12 +1,11 @@
const { createDemoConfig } = require("../build-scripts/webpack.js");
const { isProdBuild, isStatsBuild } = require("../build-scripts/env.js");
import webpack from "../build-scripts/webpack.cjs";
import env from "../build-scripts/env.cjs";
// File just used for stats builds
const latestBuild = true;
module.exports = createDemoConfig({
isProdBuild: isProdBuild(),
isStatsBuild: isStatsBuild(),
export default webpack.createDemoConfig({
isProdBuild: env.isProdBuild(),
isStatsBuild: env.isStatsBuild(),
latestBuild,
});

View File

@@ -1,5 +1,5 @@
const rollup = require("../build-scripts/rollup.js");
const env = require("../build-scripts/env.js");
import rollup from "../build-scripts/rollup.cjs";
import env from "../build-scripts/env.cjs";
const config = rollup.createGalleryConfig({
isProdBuild: env.isProdBuild(),
@@ -7,4 +7,4 @@ const config = rollup.createGalleryConfig({
isStatsBuild: env.isStatsBuild(),
});
module.exports = { ...config.inputOptions, output: config.outputOptions };
export default { ...config.inputOptions, output: config.outputOptions };

View File

@@ -1,4 +1,4 @@
module.exports = [
export default [
{
// This section has no header and so all page links are shown directly in the sidebar
category: "concepts",
@@ -45,6 +45,10 @@ module.exports = [
header: "Users",
pages: ["user-types", "configuration-menu"],
},
{
category: "date-time",
header: "Date and Time",
},
{
category: "design.home-assistant.io",
header: "About",

View File

@@ -1,4 +1,4 @@
import { html, css } from "lit";
import { css, html, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { until } from "lit/directives/until";
import { HaMarkdown } from "../../../src/components/ha-markdown";
@@ -10,7 +10,7 @@ class PageDescription extends HaMarkdown {
render() {
if (!PAGES[this.page].description) {
return html``;
return nothing;
}
return html`

View File

@@ -1,5 +1,3 @@
import "@polymer/polymer/lib/elements/dom-if";
import "@polymer/polymer/lib/elements/dom-repeat";
import "../../src/resources/ha-style";
import "../../src/resources/roboto";
import "./ha-gallery";

View File

@@ -8,8 +8,9 @@
/>
<meta name="theme-color" content="#2157BC" />
<title>Home Assistant Design</title>
<script type="module" src="<%= latestGalleryJS %>"></script>
<% for (const entry of latestEntryJS) { %>
<script type="module" src="<%= entry %>"></script>
<% } %>
<style>
body {
font-family: Roboto, Noto, sans-serif;

View File

@@ -1,5 +1,5 @@
import { dump } from "js-yaml";
import { html, css, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-yaml-editor";
@@ -127,9 +127,9 @@ export class DemoAutomationDescribeAction extends LitElement {
@state() _action = initialAction;
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
<ha-card header="Actions">

View File

@@ -1,5 +1,5 @@
import { dump } from "js-yaml";
import { css, html, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-yaml-editor";
@@ -53,9 +53,9 @@ export class DemoAutomationDescribeCondition extends LitElement {
@state() _condition = initialCondition;
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
@@ -63,7 +63,7 @@ export class DemoAutomationDescribeCondition extends LitElement {
<div class="condition">
<span>
${this._condition
? describeCondition(this._condition, this.hass)
? describeCondition(this._condition, this.hass, [])
: "<invalid YAML>"}
</span>
<ha-yaml-editor
@@ -76,7 +76,7 @@ export class DemoAutomationDescribeCondition extends LitElement {
${conditions.map(
(conf) => html`
<div class="condition">
<span>${describeCondition(conf as any, this.hass)}</span>
<span>${describeCondition(conf as any, this.hass, [])}</span>
<pre>${dump(conf)}</pre>
</div>
`

View File

@@ -1,5 +1,5 @@
import { dump } from "js-yaml";
import { css, html, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-yaml-editor";
@@ -64,9 +64,9 @@ export class DemoAutomationDescribeTrigger extends LitElement {
@state() _trigger = initialTrigger;
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
@@ -74,7 +74,7 @@ export class DemoAutomationDescribeTrigger extends LitElement {
<div class="trigger">
<span>
${this._trigger
? describeTrigger(this._trigger, this.hass)
? describeTrigger(this._trigger, this.hass, [])
: "<invalid YAML>"}
</span>
<ha-yaml-editor
@@ -86,7 +86,7 @@ export class DemoAutomationDescribeTrigger extends LitElement {
${triggers.map(
(conf) => html`
<div class="trigger">
<span>${describeTrigger(conf as any, this.hass)}</span>
<span>${describeTrigger(conf as any, this.hass, [])}</span>
<pre>${dump(conf)}</pre>
</div>
`

View File

@@ -1,5 +1,6 @@
/* eslint-disable lit/no-template-arrow */
import { html, css, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/trace/hat-script-graph";
@@ -29,9 +30,9 @@ const traces: DemoTrace[] = [
export class DemoAutomationTraceTimeline extends LitElement {
@property({ attribute: false }) hass?: HomeAssistant;
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
${traces.map(

View File

@@ -1,14 +1,15 @@
/* eslint-disable lit/no-template-arrow */
import { html, css, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/trace/hat-script-graph";
import "../../../../src/components/trace/hat-trace-timeline";
import { customElement, property, state } from "lit/decorators";
import { provideHass } from "../../../../src/fake_data/provide_hass";
import { HomeAssistant } from "../../../../src/types";
import { DemoTrace } from "../../data/traces/types";
import { basicTrace } from "../../data/traces/basic_trace";
import { motionLightTrace } from "../../data/traces/motion-light-trace";
import { DemoTrace } from "../../data/traces/types";
const traces: DemoTrace[] = [basicTrace, motionLightTrace];
@@ -18,9 +19,9 @@ export class DemoAutomationTrace extends LitElement {
@state() private _selected = {};
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
${traces.map(

View File

@@ -0,0 +1,3 @@
---
title: Control Select
---

View File

@@ -0,0 +1,212 @@
import { mdiFanOff, mdiFanSpeed1, mdiFanSpeed2, mdiFanSpeed3 } from "@mdi/js";
import { css, html, LitElement, TemplateResult } from "lit";
import { customElement, state } from "lit/decorators";
import { ifDefined } from "lit/directives/if-defined";
import { repeat } from "lit/directives/repeat";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-control-select";
import type { ControlSelectOption } from "../../../../src/components/ha-control-select";
const fullOptions: ControlSelectOption[] = [
{
value: "off",
label: "Off",
path: mdiFanOff,
},
{
value: "low",
label: "Low",
path: mdiFanSpeed1,
},
{
value: "medium",
label: "Medium",
path: mdiFanSpeed2,
},
{
value: "high",
label: "High",
path: mdiFanSpeed3,
},
];
const iconOptions: ControlSelectOption[] = [
{
value: "off",
path: mdiFanOff,
},
{
value: "low",
path: mdiFanSpeed1,
},
{
value: "medium",
path: mdiFanSpeed2,
},
{
value: "high",
path: mdiFanSpeed3,
},
];
const labelOptions: ControlSelectOption[] = [
{
value: "off",
label: "Off",
},
{
value: "low",
label: "Low",
},
{
value: "medium",
label: "Medium",
},
{
value: "high",
label: "High",
},
];
const selects: {
id: string;
label: string;
class?: string;
options: ControlSelectOption[];
disabled?: boolean;
}[] = [
{
id: "label",
label: "Select with labels",
options: labelOptions,
},
{
id: "icon",
label: "Select with icons",
options: iconOptions,
},
{
id: "icon",
label: "Disabled select",
options: iconOptions,
disabled: true,
},
{
id: "custom",
label: "Select and custom style",
class: "custom",
options: fullOptions,
},
];
@customElement("demo-components-ha-control-select")
export class DemoHaControlSelect extends LitElement {
@state() private value?: string = "off";
handleValueChanged(e: CustomEvent) {
this.value = e.detail.value as string;
}
protected render(): TemplateResult {
return html`
<ha-card>
<div class="card-content">
<p><b>Slider values</b></p>
<table>
<tbody>
<tr>
<td>value</td>
<td>${this.value ?? "-"}</td>
</tr>
</tbody>
</table>
</div>
</ha-card>
${repeat(selects, (select) => {
const { id, label, options, ...config } = select;
return html`
<ha-card>
<div class="card-content">
<label id=${id}>${label}</label>
<pre>Config: ${JSON.stringify(config)}</pre>
<ha-control-select
.value=${this.value}
.options=${options}
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
aria-labelledby=${id}
disabled=${ifDefined(config.disabled)}
>
</ha-control-select>
</div>
</ha-card>
`;
})}
<ha-card>
<div class="card-content">
<p class="title"><b>Vertical</b></p>
<div class="vertical-selects">
${repeat(selects, (select) => {
const { id, label, options, ...config } = select;
return html`
<ha-control-select
.value=${this.value}
.options=${options}
vertical
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
aria-labelledby=${id}
disabled=${ifDefined(config.disabled)}
>
</ha-control-select>
`;
})}
</div>
</div>
</ha-card>
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
pre {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin: 0;
}
label {
font-weight: 600;
}
.custom {
--mdc-icon-size: 24px;
--control-select-color: var(--state-fan-active-color);
--control-select-thickness: 100px;
--control-select-border-radius: 24px;
}
.vertical-selects {
height: 300px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
p.title {
margin-bottom: 12px;
}
.vertical-selects > *:not(:last-child) {
margin-right: 4px;
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
"demo-components-ha-control-select": DemoHaControlSelect;
}
}

View File

@@ -336,7 +336,7 @@ const SCHEMAS: {
["and", "another_one"],
["option", "1000"],
],
name: "select many otions",
name: "select many options",
default: "default",
},
],
@@ -364,7 +364,7 @@ const SCHEMAS: {
and: "another_one",
option: "1000",
},
name: "multi many otions",
name: "multi many options",
default: ["default"],
},
],

View File

@@ -0,0 +1,3 @@
---
title: HS Color Picker
---

View File

@@ -0,0 +1,120 @@
import "../../../../src/components/ha-hs-color-picker";
import { css, html, LitElement, TemplateResult } from "lit";
import { customElement, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-slider";
import { hsv2rgb } from "../../../../src/common/color/convert-color";
@customElement("demo-components-ha-hs-color-picker")
export class DemoHaHsColorPicker extends LitElement {
@state()
brightness = 255;
@state()
value: [number, number] = [0, 0];
@state()
liveValue?: [number, number];
private _brightnessChanged(ev) {
this.brightness = Number(ev.target.value);
}
private _hsColorCursor(ev) {
this.liveValue = ev.detail.value;
}
private _hsColorChanged(ev) {
this.value = ev.detail.value;
}
private _hueChanged(ev) {
this.value = [ev.target.value, this.value[1]];
}
private _saturationChanged(ev) {
this.value = [this.value[0], ev.target.value];
}
protected render(): TemplateResult {
const h = (this.liveValue ?? this.value)[0];
const s = (this.liveValue ?? this.value)[1];
const rgb = hsv2rgb([h, s, this.brightness]);
return html`
<ha-card>
<div class="card-content">
<p class="value">${h}° - ${Math.round(s * 100)}%</p>
<p class="value">${rgb.map((v) => Math.round(v)).join(", ")}</p>
<ha-hs-color-picker
colorBrightness=${this.brightness}
.value=${this.value}
@value-changed=${this._hsColorChanged}
@cursor-moved=${this._hsColorCursor}
></ha-hs-color-picker>
<p>Hue : ${this.value[0]}</p>
<ha-slider
step="1"
pin
min="0"
max="360"
.value=${this.value[0]}
@change=${this._hueChanged}
>
</ha-slider>
<p>Saturation : ${this.value[1]}</p>
<ha-slider
step="0.01"
pin
min="0"
max="1"
.value=${this.value[1]}
@change=${this._saturationChanged}
>
</ha-slider>
<p>Color Brighness : ${this.brightness}</p>
<ha-slider
step="1"
pin
min="0"
max="255"
.value=${this.brightness}
@change=${this._brightnessChanged}
>
</ha-slider>
</div>
</ha-card>
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
align-items: center;
flex-direction: column;
}
ha-hs-color-picker {
width: 400px;
}
.value {
font-size: 22px;
font-weight: bold;
margin: 0 0 12px 0;
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
"demo-components-ha-hs-color-picker": DemoHaHsColorPicker;
}
}

View File

@@ -0,0 +1,3 @@
---
title: Temp Color Picker
---

View File

@@ -0,0 +1,117 @@
import "../../../../src/components/ha-temp-color-picker";
import { css, html, LitElement, TemplateResult } from "lit";
import { customElement, state } from "lit/decorators";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-slider";
@customElement("demo-components-ha-temp-color-picker")
export class DemoHaTempColorPicker extends LitElement {
@state()
min = 3000;
@state()
max = 7000;
@state()
value = 4000;
@state()
liveValue?: number;
private _minChanged(ev) {
this.min = Number(ev.target.value);
}
private _maxChanged(ev) {
this.max = Number(ev.target.value);
}
private _valueChanged(ev) {
this.value = Number(ev.target.value);
}
private _tempColorCursor(ev) {
this.liveValue = ev.detail.value;
}
private _tempColorChanged(ev) {
this.value = ev.detail.value;
}
protected render(): TemplateResult {
return html`
<ha-card>
<div class="card-content">
<p class="value">${this.liveValue ?? this.value} K</p>
<ha-temp-color-picker
.min=${this.min}
.max=${this.max}
.value=${this.value}
@value-changed=${this._tempColorChanged}
@cursor-moved=${this._tempColorCursor}
></ha-temp-color-picker>
<p>Min temp : ${this.min} K</p>
<ha-slider
step="1"
pin
min="2000"
max="10000"
.value=${this.min}
@change=${this._minChanged}
>
</ha-slider>
<p>Max temp : ${this.max} K</p>
<ha-slider
step="1"
pin
min="2000"
max="10000"
.value=${this.max}
@change=${this._maxChanged}
>
</ha-slider>
<p>Value : ${this.value} K</p>
<ha-slider
step="1"
pin
min=${this.min}
max=${this.max}
.value=${this.value}
@change=${this._valueChanged}
>
</ha-slider>
</div>
</ha-card>
`;
}
static get styles() {
return css`
ha-card {
max-width: 600px;
margin: 24px auto;
}
.card-content {
display: flex;
align-items: center;
flex-direction: column;
}
ha-temp-color-picker {
width: 400px;
}
.value {
font-size: 22px;
font-weight: bold;
margin: 0 0 12px 0;
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
"demo-components-ha-temp-color-picker": DemoHaTempColorPicker;
}
}

View File

@@ -0,0 +1,7 @@
---
title: (Numeric) Date Formatting
---
This pages lists all supported languages with their available (numeric) date formats.
Formatting function: `const formatDateNumeric: (dateObj: Date, locale: FrontendLocaleData) => string`

View File

@@ -0,0 +1,106 @@
import { html, css, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../../src/components/ha-card";
import { HomeAssistant } from "../../../../src/types";
import { translationMetadata } from "../../../../src/resources/translations-metadata";
import { formatDateNumeric } from "../../../../src/common/datetime/format_date";
import {
FrontendLocaleData,
NumberFormat,
TimeFormat,
DateFormat,
FirstWeekday,
} from "../../../../src/data/translation";
@customElement("demo-date-time-date")
export class DemoDateTimeDate extends LitElement {
@property({ attribute: false }) hass!: HomeAssistant;
protected render() {
const defaultLocale: FrontendLocaleData = {
language: "en",
number_format: NumberFormat.language,
time_format: TimeFormat.language,
date_format: DateFormat.language,
first_weekday: FirstWeekday.language,
};
const date = new Date();
return html`
<mwc-list>
<div class="container header">
<div>Language</div>
<div class="center">Default (lang)</div>
<div class="center">Day-Month-Year</div>
<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,
})}
</div>
<div class="center">
${formatDateNumeric(date, {
...defaultLocale,
language: key,
date_format: DateFormat.DMY,
})}
</div>
<div class="center">
${formatDateNumeric(date, {
...defaultLocale,
language: key,
date_format: DateFormat.MDY,
})}
</div>
<div class="center">
${formatDateNumeric(date, {
...defaultLocale,
language: key,
date_format: DateFormat.YMD,
})}
</div>
</div>
`
)}
</mwc-list>
`;
}
static get styles() {
return css`
.header {
font-weight: bold;
}
.center {
text-align: center;
}
.container {
max-width: 600px;
margin: 12px auto;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.container > div {
flex-grow: 1;
width: 20%;
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
"demo-date-time-date": DemoDateTimeDate;
}
}

View File

@@ -2,7 +2,7 @@ import {
HassEntity,
HassEntityAttributeBase,
} from "home-assistant-js-websocket";
import { css, html, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import { computeDomain } from "../../../../src/common/entity/compute_domain";
@@ -50,6 +50,7 @@ const SENSOR_DEVICE_CLASSES = [
"temperature",
"timestamp",
"volatile_organic_compounds",
"volatile_organic_compounds_parts",
"voltage",
"volume",
"water",
@@ -387,9 +388,9 @@ export class DemoEntityState extends LitElement {
hass.updateTranslations("config", "en");
}
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`

View File

@@ -1,22 +1,22 @@
import { html, css, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import "../../../../src/components/ha-formfield";
import "../../../../src/components/ha-switch";
import { classMap } from "lit/directives/class-map";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { IntegrationManifest } from "../../../../src/data/integration";
import { DeviceRegistryEntry } from "../../../../src/data/device_registry";
import { EntityRegistryEntry } from "../../../../src/data/entity_registry";
import { provideHass } from "../../../../src/fake_data/provide_hass";
import { HomeAssistant } from "../../../../src/types";
import "../../../../src/panels/config/integrations/ha-integration-card";
import "../../../../src/panels/config/integrations/ha-ignored-config-entry-card";
import "../../../../src/panels/config/integrations/ha-config-flow-card";
import type {
ConfigEntryExtended,
DataEntryFlowProgressExtended,
} from "../../../../src/panels/config/integrations/ha-config-integrations";
import { DeviceRegistryEntry } from "../../../../src/data/device_registry";
import { EntityRegistryEntry } from "../../../../src/data/entity_registry";
import "../../../../src/panels/config/integrations/ha-ignored-config-entry-card";
import "../../../../src/panels/config/integrations/ha-integration-card";
import { HomeAssistant } from "../../../../src/types";
const createConfigEntry = (
title: string,
@@ -231,9 +231,9 @@ export class DemoIntegrationCard extends LitElement {
@state() isCloud = false;
protected render(): TemplateResult {
protected render() {
if (!this.hass) {
return html``;
return nothing;
}
return html`
<div class="container">

View File

@@ -1,8 +1,8 @@
const { createGalleryConfig } = require("../build-scripts/webpack.js");
const { isProdBuild, isStatsBuild } = require("../build-scripts/env.js");
import webpack from "../build-scripts/webpack.cjs";
import env from "../build-scripts/env.cjs";
module.exports = createGalleryConfig({
isProdBuild: isProdBuild(),
isStatsBuild: isStatsBuild(),
export default webpack.createGalleryConfig({
isProdBuild: env.isProdBuild(),
isStatsBuild: env.isStatsBuild(),
latestBuild: true,
});

View File

@@ -1,3 +1,13 @@
var requireDir = require("require-dir");
import { globIterate } from "glob";
requireDir("./build-scripts/gulp/");
const gulpImports = [];
for await (const gulpModule of globIterate("build-scripts/gulp/*.?(c|m)js", {
dotRelative: true,
})) {
gulpImports.push(import(gulpModule));
}
// Since all tasks are currently registered with gulp.task(), this is enough
// If any are converted to named exports, need to loop and aggregate exports here
await Promise.all(gulpImports);

View File

@@ -1,5 +1,5 @@
const rollup = require("../build-scripts/rollup.js");
const env = require("../build-scripts/env.js");
import rollup from "../build-scripts/rollup.cjs";
import env from "../build-scripts/env.cjs";
const config = rollup.createHassioConfig({
isProdBuild: env.isProdBuild(),
@@ -7,4 +7,4 @@ const config = rollup.createHassioConfig({
isStatsBuild: env.isStatsBuild(),
});
module.exports = { ...config.inputOptions, output: config.outputOptions };
export default { ...config.inputOptions, output: config.outputOptions };

View File

@@ -130,6 +130,7 @@ export class HassioAddonRepositoryEl extends LitElement {
css`
ha-card {
cursor: pointer;
overflow: hidden;
}
.not_available {
opacity: 0.6;

View File

@@ -6,6 +6,7 @@ import {
CSSResultGroup,
html,
LitElement,
nothing,
PropertyValues,
TemplateResult,
} from "lit";
@@ -69,12 +70,12 @@ export class HassioAddonStore extends LitElement {
text: extractApiErrorMessage(err),
});
} finally {
await this._loadData();
this._loadData();
}
}
protected render(): TemplateResult {
let repos: TemplateResult[] = [];
protected render() {
let repos: (TemplateResult | typeof nothing)[] = [];
if (this.supervisor.store.repositories) {
repos = this.addonRepositories(
@@ -91,21 +92,17 @@ export class HassioAddonStore extends LitElement {
.route=${this.route}
.header=${this.supervisor.localize("panel.store")}
>
<ha-button-menu
corner="BOTTOM_START"
slot="toolbar-icon"
@action=${this._handleAction}
>
<ha-button-menu slot="toolbar-icon" @action=${this._handleAction}>
<ha-icon-button
.label=${this.supervisor.localize("common.menu")}
.path=${mdiDotsVertical}
slot="trigger"
></ha-icon-button>
<mwc-list-item>
${this.supervisor.localize("store.repositories")}
${this.supervisor.localize("store.check_updates")}
</mwc-list-item>
<mwc-list-item>
${this.supervisor.localize("store.check_updates")}
${this.supervisor.localize("store.repositories")}
</mwc-list-item>
${this.hass.userData?.showAdvanced &&
atLeastVersion(this.hass.config.version, 0, 117)
@@ -173,17 +170,17 @@ export class HassioAddonStore extends LitElement {
.supervisor=${this.supervisor}
></hassio-addon-repository>
`
: html``;
: nothing;
})
);
private _handleAction(ev: CustomEvent<ActionDetail>) {
switch (ev.detail.index) {
case 0:
this._manageRepositoriesClicked();
this.refreshData();
break;
case 1:
this.refreshData();
this._manageRepositoriesClicked();
break;
case 2:
this._manageRegistries();
@@ -201,25 +198,25 @@ export class HassioAddonStore extends LitElement {
this._manageRepositories();
}
private async _manageRepositories(url?: string) {
private _manageRepositories(url?: string) {
showRepositoriesDialog(this, {
supervisor: this.supervisor,
url,
});
}
private async _manageRegistries() {
private _manageRegistries() {
showRegistriesDialog(this, { supervisor: this.supervisor });
}
private async _loadData() {
private _loadData() {
fireEvent(this, "supervisor-collection-refresh", { collection: "addon" });
fireEvent(this, "supervisor-collection-refresh", {
collection: "supervisor",
});
}
private async _filterChanged(e) {
private _filterChanged(e) {
this._filter = e.detail.value;
}

View File

@@ -114,9 +114,6 @@ class HassioAddonAudio extends LitElement {
ha-card {
display: block;
}
paper-item {
width: 450px;
}
.card-actions {
text-align: right;
}

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