Compare commits

...

464 Commits

Author SHA1 Message Date
Joost Lekkerkerker
4666197f28
Use underscores in AI task name (#26327) 2025-07-30 21:52:09 +02:00
Franck Nijhof
a5ca36c93f
Add weekdays to time trigger (#25908)
* Add weekdays to time trigger

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* Localization changes

---------

Co-authored-by: Norbert Rittel <norbert@rittel.de>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2025-07-30 19:45:10 +02:00
Norbert Rittel
a88950e16c
Correct the setup steps for Matter sharing in Google Home app (#26322)
Correct the setup steps in the Google Home app
2025-07-30 19:40:41 +02:00
Bram Kragten
c013c5ec64 Merge branch 'rc' into dev 2025-07-30 16:18:36 +02:00
Bram Kragten
53d5d0efbd Merge branch 'master' into rc 2025-07-30 16:18:22 +02:00
Bram Kragten
3577991553 Bumped version to 20250730.0 2025-07-30 16:16:28 +02:00
Wendelin
fa758f2bee
Redesign ha-button (#25564)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-07-30 16:15:18 +02:00
Douwe
6dbfc2f4ed
Add new card feature: button (#26165)
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2025-07-30 16:13:05 +02:00
Petar Petrov
b355556c07
Improve network graph layout (#26268) 2025-07-30 15:55:06 +02:00
renovate[bot]
fec336260e
Pin dependency @types/culori to 4.0.0 (#26318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 14:07:48 +02:00
Wendelin
3e67d91d1a
Add color palettes (#26271) 2025-07-30 13:51:14 +02:00
karwosts
641e406502
Don't allow view URL to be a number (#26313) 2025-07-29 21:33:58 +02:00
renovate[bot]
073ba22233
Update dependency @bundle-stats/plugin-webpack-filter to v4.21.1 (#26316)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 21:29:30 +02:00
Norbert Rittel
6b4a4e6024
Fix doubled plural in "add-on(s) repositories / capabilities" (#26310)
The string "Manage add-on repositories" has it correct, so this makes the fixed ones more consistent, too.
2025-07-29 10:05:13 +02:00
karwosts
7d8b418a81
Fix some instability in ha-selector-object (#26301)
Fix some instability in ha-object-selector
2025-07-29 09:50:58 +03:00
karwosts
c14425b2d1
Allow picture card to serve media images (#26291)
* Allow picture card to serve media images

* small adjustments
2025-07-29 09:49:08 +03:00
renovate[bot]
4740a71bdd
Update dependency eslint to v9.32.0 (#26309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 22:12:27 +02:00
dependabot[bot]
6d0e0158ea
Bump relative-ci/agent-action from 3.0.0 to 3.0.1 (#26307)
Bumps [relative-ci/agent-action](https://github.com/relative-ci/agent-action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/relative-ci/agent-action/releases)
- [Commits](https://github.com/relative-ci/agent-action/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: relative-ci/agent-action
  dependency-version: 3.0.1
  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>
2025-07-28 17:03:04 +03:00
renovate[bot]
e966d6f4f4
Update rspack monorepo to v1.4.10 (#26300)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-27 22:11:12 +02:00
karwosts
b99bb60cd0
Cleanup some selectors firing double value-changed events (#26302) 2025-07-27 22:10:30 +02:00
karwosts
080c79234c
Fix typo in attribute (#26303)
Update hui-action-editor.ts
2025-07-27 22:09:16 +02:00
karwosts
9ad887942e
Add raindrops to lightning-rainy state SVG (#26298) 2025-07-27 07:54:25 +02:00
renovate[bot]
27dfa514e7
Update dependency @lokalise/node-api to v15 (#26297)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-27 07:50:01 +02:00
renovate[bot]
ab5c5389e8
Update dependency @rsdoctor/rspack-plugin to v1.1.10 (#26295)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-27 07:49:07 +02:00
renovate[bot]
219679bce9
Update rspack monorepo to v1.4.9 (#26289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 14:43:41 +02:00
Chai
aca4a1f86d
Fix for integration 'Add entry' unnecessary dialogs (#26285) 2025-07-25 11:42:34 +00:00
Paulus Schoutsen
f428d6b3f2
Add download device info button (#26278)
* Add download device info button

* Update src/panels/config/core/ha-config-section-analytics.ts

* Guard download support

* Update src/translations/en.json
2025-07-24 19:53:04 +00:00
renovate[bot]
109c3e86d9
Lock file maintenance (#26230)
* Lock file maintenance

* Remove duplicated packages

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2025-07-24 19:02:51 +00:00
karwosts
e4b6c3fd4d
Disallow special characters in view URL (#26280)
* Disallow special characters in view URL
2025-07-24 18:58:26 +00:00
renovate[bot]
43f1d9be44
Update dependency typescript-eslint to v8.38.0 (#26283)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-24 20:05:15 +02:00
renovate[bot]
5c405201b2
Update dependency eslint-plugin-lit-a11y to v5.1.1 (#26279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-24 19:25:39 +03:00
karwosts
9fc91fbbcc
Fix spelling, remove errant apostrophe (#26277)
Update en.json
2025-07-24 17:06:57 +03:00
Norbert Rittel
d9e3f2c15f
Three smaller fixes in user-facing strings (#26276)
- change "eg." to "e.g." (four other occurrences are correct)
- add a comma after "Enter your email address, …" as the noun in the second part of the sentence changes to "we"
- sentence-case "Newest version"
2025-07-24 15:10:35 +03:00
Abílio Costa
3e2f5b0dd3
Handle visibility changes in camera players (#26235)
* Handle visibility changes in webrtc player

* Implement visibility handling for hls

* Remove console logs
2025-07-23 19:31:39 +02:00
dependabot[bot]
aae1a3604c
Bump axios from 1.10.0 to 1.11.0 (#26273)
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.11.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 17:03:08 +00:00
Bram Kragten
e31b9c4264
Update translations action with dispatch 2025-07-23 14:54:35 +02:00
Marcin
90a9dbafbf
Fixed icon (#26249) 2025-07-23 14:52:07 +02:00
Marcin
7041557ee2
Changed area dashboard preview icon (#26269) 2025-07-23 14:50:51 +02:00
Joost Lekkerkerker
3d6e5ef1f0
Render AI task entities with formatted time (#26265) 2025-07-23 14:49:51 +02:00
Petar Petrov
d9bf605c3f
Improve ZHA routes vizualization (#26270) 2025-07-23 14:48:47 +02:00
Copilot
20dab92ad8
Sort devices and services alphabetically in integration pages (#26231)
Co-authored-by: balloob <1444314+balloob@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-07-23 14:41:34 +02:00
Petar Petrov
98ed3bdd4d
Add handle to axis pointer in charts on mobile (#26088)
* Add handle to axis pointer in charts on mobile

* Ignore hidden xAxis

* simplify
2025-07-23 13:13:43 +02:00
Petar Petrov
f5bc6309ae
Add features to light & cover groups more-info (#26187)
* Add features to light & cover groups more-info

* 12 column tiles
2025-07-23 13:13:09 +02:00
Simon Lamon
620ebd8a61
Correct lokalise docker image (#26267)
Mistyped docker iamge
2025-07-23 13:11:57 +02:00
Norbert Rittel
ca30af5c8a
Various spelling fixes in user-facing strings (#26261)
* Various spelling fixes in user-facing strings

* Fix triple apostrophes
2025-07-23 13:23:17 +03:00
Simon Lamon
9d30ce348f
Bump Lokalise docker image to latest v3.1.4 (#26226)
Bump lokalise to latest version v3.1.4
2025-07-23 11:44:36 +02:00
karwosts
07c7b07362
Stabilize step flow errors (#26258) 2025-07-23 08:33:48 +03:00
karwosts
c13a80ce5e
Hide hardware integrations in brand sub-menu (#26252)
* Hide hardware integrations in brand sub-menu

* Filter before sort
2025-07-22 16:16:03 +02:00
Wendelin
13868478f7
Download core logs via supervisor (#26251)
Use supervisor download dialog for core downloads
2025-07-22 14:55:11 +03:00
dependabot[bot]
77aca59dda
Bump form-data from 4.0.3 to 4.0.4 (#26248)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 09:04:27 +02:00
renovate[bot]
b86605949b
Update dependency marked to v16.1.1 (#26247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 09:08:42 +03:00
renovate[bot]
cd19022e2e
Update dependency eslint-config-prettier to v10.1.8 (#26246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 09:08:17 +03:00
Petar Petrov
03368c1859
Improve Z-Wave firmware update dialog on device page (#26158)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-07-21 13:55:31 +00:00
Petar Petrov
8e0ed288e1
Tweak the color of sum/change lines in statistics chart (#26242) 2025-07-21 10:57:18 +02:00
Petar Petrov
879e0ed3d5
Show more details in statistics legend when only 1 entity (#26241) 2025-07-21 10:57:13 +02:00
renovate[bot]
657275fd17
Update dependency marked to v16.1.0 (#26238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 08:48:59 +03:00
Paul Bottein
3d1c908a01
Add support for multiple entities and hide_states option in state and attribute selectors (#26207)
* Add support for multiple entities and target for state selector

* Add support for multiple entities for attribute selector

* Improve context support

* Add combine mode and fix hidden and entity category for service control

* Don't use combine mode

* Refactor options
2025-07-21 08:48:25 +03:00
Norbert Rittel
713e8e7b71
Fix missing sentence-casing in Quickbar navigation items (#26224)
Fix missing sentence-casing in Quickbar navigation

Also replace one occurrence of "configuration" with "settings" as this is now it's menu title.
2025-07-20 10:17:48 +02:00
Petar Petrov
9e597d22a5
Handle predefined options in Z-Wave config panel (#26097)
* Handle predefined options in Z-Wave config panel

* use ha-combo-box

* lint

* display invalid status on the input

* show number and label

* compute items outside of render
2025-07-19 09:18:27 +03:00
Petar Petrov
259e8a14da
Fix history for energy_storage device class (#26223) 2025-07-18 20:34:05 +02:00
renovate[bot]
4de4243b55
Update rspack monorepo to v1.4.8 (#26222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 18:35:35 +02:00
Paul Bottein
a667cb627b
Add reorder option to entity selector (#26217) 2025-07-18 18:08:54 +02:00
Paul Bottein
9461634670
Fix interactions translation in area card editor (#26218) 2025-07-18 16:00:02 +02:00
Petar Petrov
51b79b33fb
Disable network graph emphasis on mobile (#26106) 2025-07-18 14:04:22 +02:00
renovate[bot]
539884295b
Update rspack monorepo to v1.4.7 (#26216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 12:40:48 +02:00
Bram Kragten
a885c7e358 Merge branch 'rc' 2025-07-18 10:32:20 +02:00
Bram Kragten
fa968f49c1 Bumped version to 20250702.3 2025-07-18 10:32:06 +02:00
Petar Petrov
cf3c40f5f7 Fix "Cancel exclusion" button for Z-Wave (#26188) 2025-07-18 10:31:56 +02:00
Petar Petrov
361474885f Fix entity renaming when adding a new device (#26177) 2025-07-18 10:31:55 +02:00
Petar Petrov
1e06046bd6 Fix number format in statistics charts (#26176)
fix number format in statistics charts
2025-07-18 10:31:54 +02:00
Petar Petrov
4c940e62f3 Fix entities link on integration page (#26167) 2025-07-18 10:31:53 +02:00
dcapslock
7631c409e1 Improve performance of Helpers config page (#26153) 2025-07-18 10:31:52 +02:00
Paul Bottein
e1192403d9
Update card size icon for area strategy (#26213) 2025-07-18 10:22:37 +02:00
renovate[bot]
f5c49c83a0
Update dependency @codemirror/view to v6.38.1 (#26214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 10:22:16 +02:00
Petar Petrov
faae7a2322
ZWaveJS network graph (#26112)
* ZwaveJS network visualization

* more progress

* working version

* lint

* remove unused code

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* remove "live" toggle and use deepEqual

* styling tweak

---------

Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-07-18 10:12:28 +02:00
Petar Petrov
f6aa55ef74
Fix entities link on integration page (#26167) 2025-07-18 10:01:33 +02:00
Petar Petrov
1a0afc5079
Show more details on storage page (#26202) 2025-07-18 08:31:31 +02:00
Christoph
4a50ca4ea5
do not set "___ADD_NEW___" value in ha-area-picker (#26210) 2025-07-18 08:37:04 +03:00
Logan Rosen
6cb27ede09
Refresh store collection when adding or removing repository (#26174)
* Refresh store collection when adding new repository

* Remove store refresh from `hassio-addon-store`

* Only refresh store when adding/removing repositories
2025-07-18 08:35:41 +03:00
Petar Petrov
1b68c51a05
Add Sankey chart to the energy dashboard (#26192)
* Add Sankey chart to the energy dashboard

* hide floors & areas if there is an explicit hierarchy
2025-07-18 06:30:21 +02:00
renovate[bot]
5f2b11ca9f
Update dependency typescript-eslint to v8.37.0 (#26211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 06:08:59 +02:00
Tommy Goode
ec6666a4ea
Add 'state' option for secondary entity info on Entities card (#26201)
* add 'state' option for secondary entity info on Entities card

* Use formatEntityState instead of computeStateDisplay
2025-07-17 14:02:09 +00:00
Paul Bottein
a10dbb64f0
Small improvements for area strategy editor (#26206) 2025-07-17 16:39:38 +03:00
Stefan Agner
aa17be0e33
Add Supervisor unhealthy reason translations (#26190)
* Add Supervisor unhealthy reason translations

This adds translations for new Supervisor unhealthy reasons, including:
- `oserror_bad_message` (https://github.com/home-assistant/supervisor/pull/4750)
- `duplicate_os_installation` (https://github.com/home-assistant/supervisor/pull/6024)

While at it, sort the keys alphabetically for consistency.
2025-07-17 10:27:36 +02:00
Norbert Rittel
a8919703ee
Fix description of Picture elements card (#26203)
- change explanation from plural to singular to match first sentence
- remove the exclamation mark from the middle of the sentence and fix wrong capitalization
2025-07-17 11:01:36 +03:00
Norbert Rittel
1c66a5e437
Sentence-case "Enable state reporting" for Alexa (#26204)
Makes it consistent with identical `enable_state_reporting` string for `google`.
2025-07-17 11:00:33 +03:00
Paul Bottein
767d785d04
Increase area card default height when using camera and features (#26205) 2025-07-17 10:59:29 +03:00
Paul Bottein
0839528e22
Add option to change the area card size for area dashboard (#26199) 2025-07-17 09:07:24 +03:00
Norbert Rittel
1012245ef7
Different sentence-casing fixes in user-facing strings (#26200)
* Several casing fixes in en.json

* Include "Security Devices PIN"

* Include "Browser Media Player"
2025-07-17 09:03:00 +03:00
karwosts
0d6db8b834
Show picture-elements error messages for elements (#26196) 2025-07-17 09:01:42 +03:00
Petar Petrov
adea2efb01
Fix "Cancel exclusion" button for Z-Wave (#26188) 2025-07-16 17:29:28 +02:00
dcapslock
818914b837
Include card error message in card error (#26184)
Pass card error message to createErrorCardElement
2025-07-16 17:28:42 +02:00
Paul Bottein
b207528ecf
Remove specific icons for area controls card features (#26195) 2025-07-16 17:27:05 +02:00
Norbert Rittel
039ef18d8c
Fix spelling of "to log in to" (verb) and "login" (noun) (#26189)
Fix spelling of "to log in to" and "login"
2025-07-16 12:22:52 +03:00
Petar Petrov
db387834f2
Fix entity renaming when adding a new device (#26177) 2025-07-16 11:00:49 +03:00
Petar Petrov
1b7d9f9e3b
Remove vis-data dependency (#26186) 2025-07-16 08:42:37 +02:00
Paulus Schoutsen
ed8c9f5ce5
AI Task automation save improvements (#26140)
* also assign category

* Extract Suggest AI button

* Add sick animation

* Show AI Task pref but disabled if not done loading

* Lint

* Update progress wording

* Define better interface

* Add My panel

* Adjust instructions to params.domain

* Mention sentence capitalization

* Update label when failure

* Keep width during suggestion
2025-07-16 08:20:37 +03:00
Norbert Rittel
c3bf1d8770
Consistently capitalize "Companion" for the mobile apps (#26180) 2025-07-15 19:27:04 +02:00
Paul Bottein
7db4693082
Don't show members for legacy groups (#26179) 2025-07-15 17:05:38 +00:00
Petar Petrov
72a12a4ba4
Fix for charts with identically named entities (#26166)
* Fix for charts with identically named entities

* lint

* type fix
2025-07-15 19:01:58 +02:00
Paul Bottein
aee9e4b0a5
Show group members in more info (#26178)
* Should group members in more info

* Fix flickering
2025-07-15 19:51:46 +03:00
Petar Petrov
55f6affc9e
Fix number format in statistics charts (#26176)
fix number format in statistics charts
2025-07-15 18:40:23 +02:00
renovate[bot]
1e5f2f7215
Update dependency eslint to v9.31.0 (#26171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 08:14:15 +03:00
renovate[bot]
da864d5bb7
Update dependency lit-html to v3.3.1 (#26162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 12:23:55 +02:00
Paul Bottein
8d60f39cf4
Improve aria support in control elements (#26107)
* Improve aria support in control elements

* Use radiogroup for control select

* Fix switch
2025-07-14 12:56:31 +03:00
renovate[bot]
2045519814
Update dependency @lit/reactive-element to v2.1.1 (#26159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 08:35:27 +00:00
renovate[bot]
3f70e88a4f
Update dependency lit to v3.3.1 (#26160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 11:27:40 +03:00
renovate[bot]
6ed5fbe102
Update dependency @lit-labs/observers to v2.0.6 (#26155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 11:26:43 +03:00
renovate[bot]
4e72d5083d
Update dependency @lit/context to v1.1.6 (#26157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 11:25:55 +03:00
renovate[bot]
f9e102e537
Update dependency @lit-labs/virtualizer to v2.1.1 (#26156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 11:05:03 +03:00
renovate[bot]
e54363875b
Update dependency @lit-labs/motion to v1.0.9 (#26154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 09:10:11 +03:00
dcapslock
1ce4e2a799
Improve performance of Helpers config page (#26153) 2025-07-14 08:42:37 +03:00
karwosts
80b86a89f0
Render energy-gas in the display unit of the sources (#26143) 2025-07-14 08:34:53 +03:00
renovate[bot]
1a316d251e
Update rspack monorepo to v1.4.6 (#26148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-13 09:00:49 +00:00
renovate[bot]
a74f90b768
Update dependency luxon to v3.7.1 (#26147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-13 10:51:09 +02:00
renovate[bot]
fc6e457581
Update dependency @types/leaflet to v1.9.20 (#26142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 23:25:08 +02:00
karwosts
ad7b8b66f2
Render energy-water in the display unit of the sources (#26141)
Render energy-water in the display unit of the source
2025-07-11 19:31:27 +03:00
renovate[bot]
0714677a8a
Update dependency hls.js to v1.6.7 (#26137)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 12:37:28 +02:00
renovate[bot]
0a946a5c43
Update rspack monorepo to v1.4.5 (#26138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 12:37:04 +02:00
renovate[bot]
4930a8d88e
Update dependency typescript-eslint to v8.36.0 (#26136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 12:36:55 +02:00
Petar Petrov
8b781cec8e
Handle disabled ZWave provisionning entries (#26132)
* Handle disabled ZWave provisionning entries

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

---------

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-07-11 12:36:19 +02:00
Petar Petrov
065c98c5d7
"Add device" primary button on protocol integration pages (#26130) 2025-07-11 10:37:25 +03:00
Bram Kragten
6a3c58d20f Merge branch 'rc' 2025-07-10 21:35:08 +02:00
Bram Kragten
a87afe9fb3 Bumped version to 20250702.2 2025-07-10 21:34:53 +02:00
Christoph
61fe8983f3 do not set "___ADD_NEW___" value in ha-floor-picker (#26102) 2025-07-10 21:34:33 +02:00
Ezra Freedman
c10410ade3 Weather card smallest width is not set correctly (#26082)
set result.width, not result.height
2025-07-10 21:34:32 +02:00
Yosi Levy
761fded9e3 RTL fixes for 7-25 (#26074) 2025-07-10 21:34:32 +02:00
karwosts
b87fbe7a1e Fix default range icon (#26069) 2025-07-10 21:34:31 +02:00
karwosts
7fdf824e97 Revert changes to persistent notification in sidebar (#25984) 2025-07-10 21:34:30 +02:00
karwosts
69d8eeb7db
Revert changes to persistent notification in sidebar (#25984) 2025-07-10 21:33:33 +02:00
Norbert Rittel
3b7d2869e5
Fix sentence-casing of two "More Info" button labels (#26135)
Fix sentence-casing of two "More Info" buttons

- the one in the Dev tools opens the "More info" dialog for the entity, so it's changed to that dialog's name
- the one for Thread configuration opens href=${documentationUrl(this.hass, `/integrations/thread`)}
therefore it's changed to "More information"
2025-07-10 16:07:11 +00:00
renovate[bot]
bcda5cd0cf
Update dependency core-js to v3.44.0 (#26134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 16:02:35 +00:00
renovate[bot]
eeb64a25ff
Update dependency @rsdoctor/rspack-plugin to v1.1.8 (#26133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 16:01:56 +00:00
Petar Petrov
9134132ba9
Only show loading for slow flow steps to avoid flickering (#26131) 2025-07-10 17:59:07 +02:00
karwosts
1ded254e5a
Fix some weather-forecast card editor issues (#26125) 2025-07-10 11:27:37 +03:00
Christoph
fc104a7992
add floor column to datatable in config devices page (#26103)
* add floor column to datatable in config devices page

* refactor conditions related to floor column in config devices page
2025-07-10 11:25:56 +03:00
karwosts
e7e062a222
Pause map autofit when user initiates pan/zoom (#26114)
* Pause map autofit when user initiates pan/zoom

* not a state

* a different approach
2025-07-09 17:32:20 +03:00
Franck Nijhof
5233086efb
Add Task issue form (#26121) 2025-07-09 14:14:37 +02:00
Christoph
8d95f0d95d
add unit tests for common/url/search-params.ts (#26115) 2025-07-09 14:11:28 +03:00
karwosts
5cf8b39703
Coerce all energy distribution values to the same unit (#26117) 2025-07-09 14:06:47 +03:00
Franck Nijhof
15dabe372c
Adjust feature request links in issue reporting (#26123) 2025-07-09 12:40:37 +02:00
renovate[bot]
aab52a8bb2
Update dependency vis-data to v7.1.10 (#26122)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 10:27:49 +00:00
Norbert Rittel
aa52825b40
Capitalize "REST", remove excessive commas (#26109) 2025-07-08 12:57:30 +02:00
Christoph
2809a306e6
do not set "___ADD_NEW___" value in ha-floor-picker (#26102) 2025-07-08 12:40:24 +02:00
renovate[bot]
a6304d6284
Update rspack monorepo to v1.4.4 (#26105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 08:50:51 +03:00
Paul Bottein
8e866e86d6
Use query params instead of path for media browser navigate ids (#26099) 2025-07-08 08:50:28 +03:00
Kevin Lakotko
2e8203f666
Sort groups if same as sort column (#26010)
* fix(grouping): if sorted by column sort group

* chore: use props to group for memoization
2025-07-07 19:23:27 +03:00
Paulus Schoutsen
b60f2e3201
Add extra margin AI Task pref (#26096)
Add extra margin AI Task
2025-07-07 12:11:35 +03:00
renovate[bot]
c5f57f436c
Update rspack monorepo to v1.4.3 (#26093)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 10:17:53 +03:00
steinmn
3bb930b906
Fix flickering Edit sidebar dialog by locking content padding (#26084)
Fix flickering Edit sidebar dialog
2025-07-07 05:29:25 +00:00
Ezra Freedman
e75331e159
Weather card smallest width is not set correctly (#26082)
set result.width, not result.height
2025-07-06 10:12:59 +02:00
renovate[bot]
d6b66a7145
Update dependency @rsdoctor/rspack-plugin to v1.1.7 (#26087)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 08:07:11 +00:00
Yosi Levy
5c346798c8
RTL fixes for 7-25 (#26074) 2025-07-06 10:04:09 +02:00
renovate[bot]
5ffe37407a
Update dependency hls.js to v1.6.6 (#26085)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 09:58:49 +02:00
renovate[bot]
2b056c0434
Update dependency @lokalise/node-api to v14.9.1 (#26081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 09:58:06 +02:00
Paulus Schoutsen
27b36707e5
Automation save dialog to suggest name, description and labels (#26071)
* AI Task structure

* Suggest description and labels too
2025-07-06 09:57:16 +02:00
renovate[bot]
5760614b65
Update babel monorepo to v7.28.0 (#26079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-05 12:17:24 +02:00
renovate[bot]
3835912b01
Update dependency @rsdoctor/rspack-plugin to v1.1.6 (#26078)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-05 12:14:01 +02:00
Petar Petrov
a385655c85
Remove deprecated dependency @types/glob (#26075) 2025-07-05 08:27:41 +02:00
karwosts
e177012108
Fix default range icon (#26069) 2025-07-04 23:34:38 +02:00
renovate[bot]
cc3234ad8f
Update dependency eslint to v9.30.1 (#26072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 22:47:44 +02:00
karwosts
4d932f0b4a
Support translating number selector UoM (#26070) 2025-07-04 21:06:49 +03:00
renovate[bot]
257769cdc7
Update dependency globals to v16.3.0 (#26068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 18:42:09 +02:00
renovate[bot]
6619f064eb
Update dependency @lokalise/node-api to v14.9.0 (#26067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 15:12:03 +02:00
renovate[bot]
382a47a082
Update rspack monorepo to v1.4.2 (#26066)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 15:11:40 +02:00
Bram Kragten
fe946eb75b Merge branch 'rc' 2025-07-04 13:53:23 +02:00
Bram Kragten
3bfbe4bde6 Bumped version to 20250702.1 2025-07-04 13:53:08 +02:00
c0ffeeca7
7963a97358 Terminology: change controller to adapter (#26051)
* Terminology: change controller to adapter

* Update src/translations/en.json

Co-authored-by: AlCalzone <d.griesel@gmx.net>

* Apply suggestions from code review

---------

Co-authored-by: AlCalzone <d.griesel@gmx.net>
2025-07-04 13:52:37 +02:00
Ezra Freedman
0ed2b5966e Prevent uncaught TypeError on HuiWeatherForecastCard render (#26038) 2025-07-04 13:52:37 +02:00
Paul Bottein
70c5f77aa7 Fix play media action (#26035) 2025-07-04 13:52:36 +02:00
Paul Bottein
1013647249 Fix zoom in statistic chart (#26034) 2025-07-04 13:52:35 +02:00
Paul Bottein
45e9c51525 Reduce media selector size (#26033) 2025-07-04 13:52:34 +02:00
renovate[bot]
ad4be75fe1
Update dependency typescript-eslint to v8.35.1 (#26058)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 10:16:33 +03:00
Ezra Freedman
d605b67b41
Prevent uncaught TypeError on HuiWeatherForecastCard render (#26038) 2025-07-03 21:19:48 +02:00
renovate[bot]
dba6a3c756
Update fullcalendar monorepo to v6.1.18 (#26047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-03 17:14:49 +03:00
c0ffeeca7
002e9ad071
Terminology: change controller to adapter (#26051)
* Terminology: change controller to adapter

* Update src/translations/en.json

Co-authored-by: AlCalzone <d.griesel@gmx.net>

* Apply suggestions from code review

---------

Co-authored-by: AlCalzone <d.griesel@gmx.net>
2025-07-03 15:51:35 +02:00
Paul Bottein
6e7874c2c9
Fix play media action (#26035) 2025-07-02 19:30:06 +02:00
Paul Bottein
978f9b0f83
Reduce media selector size (#26033) 2025-07-02 18:08:31 +02:00
renovate[bot]
2b88669a72
Update dependency eslint-plugin-lit-a11y to v5.1.0 (#26020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 17:20:13 +02:00
renovate[bot]
252fd2bb6c
Update dependency @bundle-stats/plugin-webpack-filter to v4.21.0 (#26032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 17:19:41 +02:00
Paul Bottein
cc68a087a2
Fix zoom in statistic chart (#26034) 2025-07-02 17:18:39 +02:00
Bram Kragten
bbe3a9e0c2 Merge branch 'rc' 2025-07-02 13:45:20 +02:00
Bram Kragten
33ea02208a Bumped version to 20250702.0 2025-07-02 13:44:53 +02:00
Bram Kragten
cf531cd935 Disable fullscreen in trigger detail dialog (#26030) 2025-07-02 13:44:27 +02:00
Paul Bottein
232649c0cd Improve styling of the code editor in fullscreen mode (#26029) 2025-07-02 13:44:26 +02:00
Bram Kragten
1db8ef37a2 Dont fetch device actions on first updated (#26028) 2025-07-02 13:44:25 +02:00
Paul Bottein
eecd765d09 Fix UI jump when using drag and drop in areas strategy editor (#26026) 2025-07-02 13:44:25 +02:00
Paul Bottein
3d75831623 Add missing domain icon import in area controls (#26023) 2025-07-02 13:44:24 +02:00
Paul Bottein
c1934e0b9a Add missing area helper (#26022) 2025-07-02 13:44:23 +02:00
karwosts
c0e9c3b9dc Fix glitchy 'show' checkboxes on integration page (#26021) 2025-07-02 13:44:22 +02:00
karwosts
3e1341a731
Fix glitchy 'show' checkboxes on integration page (#26021) 2025-07-02 13:43:06 +02:00
Bram Kragten
6be25270fd
Dont fetch device actions on first updated (#26028) 2025-07-02 13:42:21 +02:00
Bram Kragten
ce929aea46
Disable fullscreen in trigger detail dialog (#26030) 2025-07-02 13:41:52 +02:00
Paul Bottein
8853bf6ea2
Improve styling of the code editor in fullscreen mode (#26029) 2025-07-02 13:41:26 +02:00
Paul Bottein
2241807745
Fix UI jump when using drag and drop in areas strategy editor (#26026) 2025-07-02 09:03:21 +00:00
Paul Bottein
50d705c943
Add missing domain icon import in area controls (#26023) 2025-07-01 21:47:20 +02:00
Paul Bottein
eb111d3c32
Add missing area helper (#26022) 2025-07-01 21:46:58 +02:00
Paul Bottein
c3f0bba4a3
20250701.0 (#26019) 2025-07-01 15:04:35 +02:00
Paul Bottein
0026ee7563
Bumped version to 20250701.0 2025-07-01 15:02:51 +02:00
Paul Bottein
61f1c8cbd4
Force narrow style for action, condition and trigger in blueprint (#26018) 2025-07-01 15:02:17 +02:00
Paul Bottein
e0b32ea789
Increase target area in tile card and area card (#26017) 2025-07-01 15:02:17 +02:00
Paul Bottein
96bbfe8a93
Add dashboard title to strategy editor (#26015) 2025-07-01 15:02:16 +02:00
Paul Bottein
93837f01f7
Avoid selector to take to much space in action calls (#26014) 2025-07-01 15:02:15 +02:00
Ezra Freedman
d0737082a5
Fix translation in the integration page for entities (#26009)
add call to localize
2025-07-01 15:02:14 +02:00
Paul Bottein
57da4d3499
Fix object selector not displayed (#26007) 2025-07-01 15:02:13 +02:00
Paul Bottein
6e84fee791
Do not display quality scale for custom integrations (#26006) 2025-07-01 15:02:12 +02:00
Paul Bottein
2e223e637b
Improve device row in integration page (#26005)
Improve device row in config entry page
2025-07-01 15:02:11 +02:00
Paul Bottein
3e45821fd0
Allow to re-order floors in areas dashboard (#26002)
* Allow to re-order floors in areas dashboard

* Move drag handle to right

* Improve typings

* Only show drag handle if there is at least 2 floors
2025-07-01 15:02:10 +02:00
Simon Lamon
b16087d5b5
Fix fullscreen yaml editor (transparency background) (#25989)
Fix fullscreen editor (transparency background)
2025-07-01 15:02:10 +02:00
Norbert Rittel
6300bfb200
Fix grammar of Light, Sensor and Tile card descriptions (#25988)
* Fix grammar of Light, Sensor and Entity card descriptions

* Capitalize "Tile card" as a name

* Apply same change to Entity badge description
2025-07-01 15:02:09 +02:00
Simon Lamon
05a9f69c9e
Pass area control service calls through hass (#25986)
Connection logging
2025-07-01 15:02:08 +02:00
Norbert Rittel
e306e29d95
Fix sentence-casing, spelling and grammar issues (#25981)
* Fix sentence-casing, spelling and grammar issues

* Add "IP information" to the list

* More sentence-casing issues
2025-07-01 15:02:07 +02:00
Norbert Rittel
619974ffdb
Dev Tools: Remove excessive space from "Input date times" (#25973)
Remove excessive space from "input date times"
2025-07-01 15:02:06 +02:00
Paul Bottein
6f753c4909
Use entity format state if only one entity for that domain in the area card (#25964)
Use entity format state if only one entity is area card
2025-07-01 15:02:05 +02:00
Paul Bottein
1e59f9f4be
Increase target area in tile card and area card (#26017) 2025-07-01 14:34:19 +02:00
Paul Bottein
523eb9522f
Add dashboard title to strategy editor (#26015) 2025-07-01 14:33:36 +02:00
Paul Bottein
f6cb322819
Avoid selector to take to much space in action calls (#26014) 2025-07-01 14:32:54 +02:00
Paul Bottein
4f97756f4e
Force narrow style for action, condition and trigger in blueprint (#26018) 2025-07-01 15:22:55 +03:00
Ezra Freedman
8644dd5271
Fix translation in the integration page for entities (#26009)
add call to localize
2025-07-01 06:48:13 +00:00
renovate[bot]
26d842f432
Update dependency @babel/helper-define-polyfill-provider to v0.6.5 (#26008)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 08:34:48 +02:00
renovate[bot]
ad4f14ffaf
Update dependency eslint to v9.30.0 (#26012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 08:31:30 +02:00
Paul Bottein
948c858e78
Fix object selector not displayed (#26007) 2025-06-30 16:15:37 +00:00
Paul Bottein
49099223d3
Do not display quality scale for custom integrations (#26006) 2025-06-30 16:10:08 +00:00
Paul Bottein
0fbd430594
Allow to re-order floors in areas dashboard (#26002)
* Allow to re-order floors in areas dashboard

* Move drag handle to right

* Improve typings

* Only show drag handle if there is at least 2 floors
2025-06-30 16:09:42 +00:00
Kevin Lakotko
8cc762d839
Fix use of numeric option for collator (#25917)
* fix(string): use numeric option for collator

* test: add natural sort comparison tests
2025-06-30 18:00:45 +02:00
Paul Bottein
89d9dd2893
Improve device row in integration page (#26005)
Improve device row in config entry page
2025-06-30 17:44:50 +02:00
renovate[bot]
b7d1ce1c37
Update rspack monorepo to v1.4.1 (#26001)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 17:22:39 +02:00
renovate[bot]
869d10ca3f
Update CodeMirror (#26003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 17:22:09 +02:00
Simon Lamon
f338089148
Pass area control service calls through hass (#25986)
Connection logging
2025-06-30 14:59:15 +02:00
renovate[bot]
06b0f9fcaf
Update dependency @rsdoctor/rspack-plugin to v1.1.5 (#26000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 13:49:05 +02:00
Simon Lamon
7ad07e4c55
Fix fullscreen yaml editor (transparency background) (#25989)
Fix fullscreen editor (transparency background)
2025-06-30 14:16:59 +03:00
renovate[bot]
ad65600d11
Update dependency marked to v16 (#25997)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 14:15:16 +03:00
renovate[bot]
e91d907e56
Update dependency prettier to v3.6.2 (#25996) 2025-06-30 08:26:28 +02:00
renovate[bot]
b35a1fc9e0
Update dependency @babel/core to v7.27.7 (#25992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-29 20:54:40 +03:00
renovate[bot]
dd18ad96f3
Update dependency gulp-rename to v2.1.0 (#25985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-29 17:16:40 +02:00
Norbert Rittel
62eec56e5f
Fix grammar of Light, Sensor and Tile card descriptions (#25988)
* Fix grammar of Light, Sensor and Entity card descriptions

* Capitalize "Tile card" as a name

* Apply same change to Entity badge description
2025-06-29 17:16:09 +02:00
renovate[bot]
7187e25cad
Update rspack monorepo to v1.4.0 (#25987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-29 11:06:34 +02:00
Norbert Rittel
6d9e6a616d
Fix sentence-casing, spelling and grammar issues (#25981)
* Fix sentence-casing, spelling and grammar issues

* Add "IP information" to the list

* More sentence-casing issues
2025-06-29 09:25:29 +02:00
renovate[bot]
44d87e3c66
Update dependency barcode-detector to v3.0.5 (#25980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:41:15 +02:00
renovate[bot]
085e2460bc
Update dependency prettier to v3.6.1 (#25978)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:40:47 +02:00
karwosts
1f8a9e4caf
Improve settings page accessibility (No. 2) (#25965) 2025-06-27 19:38:11 +02:00
Franck Nijhof
f08877437e
Add initial instructions file for GitHub Copilot and Claude Code (#25967) 2025-06-27 18:06:23 +02:00
renovate[bot]
6690d1ef22
Update dependency @types/leaflet to v1.9.19 (#25974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 17:54:52 +02:00
Paul Bottein
9d8a5b366e
Use entity format state if only one entity for that domain in the area card (#25964)
Use entity format state if only one entity is area card
2025-06-27 17:41:58 +02:00
Franck Nijhof
22c798c9d6
Add Claude to gitignore (#25966) 2025-06-27 15:59:14 +02:00
Norbert Rittel
8aabb1f32f
Dev Tools: Remove excessive space from "Input date times" (#25973)
Remove excessive space from "input date times"
2025-06-27 15:57:52 +02:00
renovate[bot]
33d5cecc85
Update dependency ua-parser-js to v2.0.4 (#25968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 15:12:14 +03:00
Paul Bottein
a0a2b5f065
20250627.0 (#25971) 2025-06-27 13:51:57 +02:00
Paul Bottein
5430325127
Bumped version to 20250627.0 2025-06-27 13:50:14 +02:00
Paul Bottein
56d3cf7f1e
Use areas dashboard name in the top bar (#25969) 2025-06-27 13:49:10 +02:00
Paul Bottein
b39e9c38b9
Bump vaadin to 24.7.9 (#25963) 2025-06-27 13:49:09 +02:00
Bram Kragten
c065efc52f
Disable fullscreen editor for editors that are already fullscreen (#25959)
* Disabled fullscreen editor for editors that are already fullscreen

* Update ha-code-editor.ts
2025-06-27 13:49:08 +02:00
Paul Bottein
caaec7d34d
Fix expand icon for entries and sub entries (#25955) 2025-06-27 13:49:07 +02:00
Paul Bottein
7693a4dc24
Use areas dashboard name in the top bar (#25969) 2025-06-27 10:40:15 +02:00
Paul Bottein
9ec38c7dd9
Bump vaadin to 24.7.9 (#25963) 2025-06-26 21:22:06 +00:00
Bram Kragten
e8cb85f7ff
Disable fullscreen editor for editors that are already fullscreen (#25959)
* Disabled fullscreen editor for editors that are already fullscreen

* Update ha-code-editor.ts
2025-06-26 23:17:30 +02:00
renovate[bot]
ef964a2717
Update dependency typescript-eslint to v8.35.0 (#25956) 2025-06-26 19:32:39 +02:00
Paul Bottein
369881f8a6
Fix expand icon for entries and sub entries (#25955) 2025-06-26 19:21:15 +02:00
Bram Kragten
76509d8bd4 Bumped version to 20250626.0 2025-06-26 16:44:40 +02:00
Paul Bottein
11fcab87d4 Revert vaadin to 24.7.7 (#25953) 2025-06-26 16:44:05 +02:00
Paul Bottein
bfa0b8c0fc Don't limit combo-box dropdown size (#25952) 2025-06-26 16:44:04 +02:00
Bram Kragten
f54312a7bc Load title when fetching flow (#25951) 2025-06-26 16:44:03 +02:00
Bram Kragten
8ff3f7733f Fix filtering on device in entities config panel (#25948)
* Fix filtering on device in entities config panel

* fix

* set filters from url twice to catch race...
2025-06-26 16:44:02 +02:00
Paul Bottein
def8e8a713 Disable escape key to close edit card dialog (#25947) 2025-06-26 16:44:01 +02:00
Bram Kragten
e675283fcc Add label to version number (#25942)
Add label
2025-06-26 16:44:00 +02:00
Bram Kragten
1900cce7f9 make sure header is always shown in data entry flow (#25941) 2025-06-26 16:44:00 +02:00
Bram Kragten
8e2c943dff add version number to integration page (#25940)
* add version number to integration page

* Update ha-config-integration-page.ts
2025-06-26 16:43:59 +02:00
Bram Kragten
8c5beb724f Use different icon for services (#25939) 2025-06-26 16:43:58 +02:00
Paul Bottein
b9fb981fb2 Remove alert classes and only use slot sensors for areas dashboard (#25937)
* Remove alert classes and only used slot sensors for areas dashboard

* Rename group to sensors

* Rename group to sensors
2025-06-26 16:43:57 +02:00
Paul Bottein
3456aa96e8 Better handle case when no floors in areas dashboard (#25933) 2025-06-26 16:43:56 +02:00
Eric Stern
e88d9a1ffb Fix logbook stream subscription (#25927) 2025-06-26 16:43:56 +02:00
Paulus Schoutsen
0b488e1ffd Fix wrapping of add subentry buttons (#25925) 2025-06-26 16:43:55 +02:00
Paulus Schoutsen
47aea824aa Make the config entry row section wider on mobile (#25924) 2025-06-26 16:43:54 +02:00
Bram Kragten
570c63c50a Prevent overflow of ripple on device row on integration page (#25922) 2025-06-26 16:43:53 +02:00
Bram Kragten
d9a3a27245 Dont show internal quality scale (#25921)
dont show internal quality scale
2025-06-26 16:43:52 +02:00
Bram Kragten
3d1a3e2335 Only show own devices when there are devices... (#25920)
only show own devices when there are devices...
2025-06-26 16:43:51 +02:00
Bram Kragten
42815c4d5e Update confirm disable messages (#25919) 2025-06-26 16:43:50 +02:00
Bram Kragten
68e22d23f1
Fix filtering on device in entities config panel (#25948)
* Fix filtering on device in entities config panel

* fix

* set filters from url twice to catch race...
2025-06-26 16:42:11 +02:00
Paul Bottein
696ba69a9e
Revert vaadin to 24.7.7 (#25953) 2025-06-26 14:41:58 +00:00
Paul Bottein
e2ab52e10e
Don't limit combo-box dropdown size (#25952) 2025-06-26 14:12:07 +00:00
Bram Kragten
b154bc1502
Load title when fetching flow (#25951) 2025-06-26 14:07:46 +00:00
Paul Bottein
a952b880d8
Disable escape key to close edit card dialog (#25947) 2025-06-26 15:25:26 +02:00
Bram Kragten
018aceb542
Add label to version number (#25942)
Add label
2025-06-26 15:38:33 +03:00
Bram Kragten
2fb86f118e
make sure header is always shown in data entry flow (#25941) 2025-06-26 11:07:08 +00:00
Bram Kragten
6c8caccfec
Use different icon for services (#25939) 2025-06-26 13:05:28 +02:00
Paul Bottein
3dd3a80054
Remove alert classes and only use slot sensors for areas dashboard (#25937)
* Remove alert classes and only used slot sensors for areas dashboard

* Rename group to sensors

* Rename group to sensors
2025-06-26 13:05:05 +02:00
Bram Kragten
675310afdf
add version number to integration page (#25940)
* add version number to integration page

* Update ha-config-integration-page.ts
2025-06-26 11:04:13 +00:00
Paul Bottein
f5df91d4c7
Better handle case when no floors in areas dashboard (#25933) 2025-06-26 12:18:34 +02:00
Bram Kragten
d8ab9b73ba
Prevent overflow of ripple on device row on integration page (#25922) 2025-06-26 12:17:00 +02:00
renovate[bot]
89ab0b4a3d
Update dependency prettier to v3.6.0 (#25930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-26 10:18:03 +02:00
Eric Stern
dd4cb1df72
Fix logbook stream subscription (#25927) 2025-06-26 09:42:43 +02:00
Paulus Schoutsen
b81cd37776
Make the config entry row section wider on mobile (#25924) 2025-06-26 09:41:39 +02:00
Paulus Schoutsen
34112e7446
Fix wrapping of add subentry buttons (#25925) 2025-06-26 09:41:10 +02:00
Bram Kragten
2dee45b465
Update confirm disable messages (#25919) 2025-06-26 08:57:16 +03:00
Norbert Rittel
10eb0a8b87
Deduplicate weekdays in time conditions (#25915)
Replace weekdays conditions with references to common ui strings
2025-06-26 08:55:46 +03:00
Bram Kragten
551035238f
Dont show internal quality scale (#25921)
dont show internal quality scale
2025-06-25 17:34:12 -04:00
Bram Kragten
eb9359e9e1
Only show own devices when there are devices... (#25920)
only show own devices when there are devices...
2025-06-25 17:31:43 -04:00
Bram Kragten
df2523a6a2 Merge branch 'rc' into dev 2025-06-25 17:25:23 +02:00
Bram Kragten
edb1e1bba7 Bumped version to 20250625.0 2025-06-25 17:24:02 +02:00
Bram Kragten
e5bc234ab3
make debug mode better visible, improve disabling device (#25910) 2025-06-25 17:23:22 +02:00
ildar170975
6006e926a7
fix hui-panel-view for a "warning_multiple_cards" (#25899) 2025-06-25 17:20:14 +02:00
Petar Petrov
93df473ad2
Translate select options in config flows (#25911) 2025-06-25 17:18:29 +02:00
Paul Bottein
af149dcfab
Move exclude entities config to area card (#25909) 2025-06-25 16:18:47 +02:00
karwosts
3ab6a02994
Improve settings page accessibility (#25885) 2025-06-25 13:35:14 +00:00
Leon
e7a04eb3d2
Short-format negative and small numbers in energy-distribution-card (#25862) 2025-06-25 13:22:21 +00:00
karwosts
2dfe5f50a6
Support templates in action target (#25656) 2025-06-25 15:20:53 +02:00
Paul Bottein
174d54396f
Add cover controls to area card and improve areas dashboard (#25892) 2025-06-25 13:14:41 +00:00
karwosts
5c1a8029bf
Fix entity selector slicing value on load (#25854) 2025-06-25 15:11:23 +02:00
Franck Nijhof
884341656f
Add full-screen button to code editors (#25903) 2025-06-25 13:07:31 +00:00
Bram Kragten
fcbc8de95a
Update device row in integration page (#25907)
* Update ha-config-entry-device-row.ts

* Update src/panels/config/integrations/ha-config-entry-device-row.ts

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2025-06-25 12:16:11 +00:00
Paul Bottein
f90eb4fee0
Exclude entities in controls for areas dashboard (#25906) 2025-06-25 13:50:21 +03:00
Paulus Schoutsen
9afc4260c9
Move AI task prefs to system -> general (#25904)
Move AI task prefs
2025-06-25 08:27:09 +03:00
Franck Nijhof
3aafa47f6d
Improve Entity ID auto-complete in YAML mode (#25901) 2025-06-24 16:22:31 -04:00
Paulus Schoutsen
35ba2fffda
Also show sub entry services when sub entry expanded (#25900) 2025-06-24 19:46:47 +02:00
Paul Bottein
31bc708725
Improve alerts padding in area card (#25897) 2025-06-24 16:09:56 +00:00
Franck Nijhof
caa60e4e8c
Fix warnings raised when migrating incomplete automation configuration (#25898) 2025-06-24 18:02:45 +02:00
Paul Bottein
edcca81acc
Group area per floor in the areas strategy editor (#25895) 2025-06-24 15:28:46 +02:00
Stefan Agner
508e451f94
Add container arch to system health data (#25896) 2025-06-24 15:27:52 +02:00
Bram Kragten
bfcc36bb40
Update integration page layout (#25880) 2025-06-24 15:27:07 +02:00
Petar Petrov
976bf7c512
Update buttons in Z-Wave firmware update dialog (#25894)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-06-24 15:20:30 +02:00
Petar Petrov
fb28c8971b
Update Z-Wave text (#25893) 2025-06-24 14:31:26 +02:00
Paul Bottein
641a2eb77c
Use area card in area strategy (#25879)
* Bring area card to area strategy

* Add device classes

* Use subview
2025-06-24 14:46:12 +03:00
Bram Kragten
47b90feffa Bumped version to 20250531.4 2025-06-24 09:58:11 +02:00
Paul Bottein
45e66d8b6e Don't send double card updated event when rendering the card (#25883) 2025-06-24 09:56:53 +02:00
Petar Petrov
73cd1e8e9d Fix duplicated requests in statistics-graph (#25878) 2025-06-24 09:56:52 +02:00
Petar Petrov
1a8ff83e2d Another fix for history chart axis rounding (#25852) 2025-06-24 09:56:51 +02:00
Petar Petrov
e6fbe0d538 Round chart limits with fit_y_data (#25851) 2025-06-24 09:56:51 +02:00
Paul Bottein
5ac6781f7d Remove debug type in secondary line in statistic picker (#25835) 2025-06-24 09:56:50 +02:00
Petar Petrov
7f7e693547 Fix bar chart data order when using the legend (#25832)
* Fix bar chart data order when using the legend

* type fix
2025-06-24 09:56:49 +02:00
Paul Bottein
51246f119c Fix disabled color in dark mode in production (#25818) 2025-06-24 09:56:48 +02:00
Anthony Relle
d764187e8c Update ElectricityMaps URL in Energy Dashboard (#25816)
fix: update electricitymap domain
2025-06-24 09:56:47 +02:00
Petar Petrov
6738b7d708 Fix sankey total calculation to account for included_in_stat (#25805) 2025-06-24 09:56:47 +02:00
Petar Petrov
77c458a0e5 Reduce reset-zoom button size on timeline charts (#25796) 2025-06-24 09:56:46 +02:00
ildar170975
876e36b4e0
hui-graph-footer-editor: add margin to ha-switch to prevent a scrollbar (#25645)
* add padding-bottom to card-config to prevent a scrollbar

* revert padding for card-config

* add margin to ha-switch

* revert margin for ha-switch

* set margin for ha-switch
2025-06-24 08:27:16 +03:00
Paul Bottein
dd64fa228c
Add color options to area card (#25881)
* Add color options to area card

* Color all controls with the same color

* Clean area card
2025-06-24 08:23:58 +03:00
renovate[bot]
b3f5eb256f
Update dependency eslint-plugin-import to v2.32.0 (#25890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 06:25:30 +02:00
ildar170975
a5005c0840
Device page: sort related automations, scenes, scripts (#24742)
* sort related items

* use memoize for sorted _related

* fix for "_entities" & "_getEntitiesSorted"
2025-06-24 06:25:09 +02:00
Paul Bottein
c73122d7ee
Don't send double card updated event when rendering the card (#25883) 2025-06-23 14:10:27 +02:00
Petar Petrov
82da36825e
Fix duplicated requests in statistics-graph (#25878) 2025-06-23 11:25:46 +02:00
Petar Petrov
3e2a5bff4d
Zwave delete device button on device page (#25766)
* Handle ZWaveJS device delete in frontend according to status

* finishing touches

* Fix custom value selected when clicking item in combo box (#25734)

* Assist Chat: handle intent progress delta not always being there (#25730)

handle intent progress data type change

* More support for no-grid energy dashboard (#25644)

* More support for no-grid energy dashboard

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

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

* lint

---------

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

* Z-Wave: apply sentence-style capitalization (#25739)

* Display full error for card preview mode (#25747)

* Fix edit card not working in chrome after editing (#25751)

* Change backup type order (#25759)

* Fix alerts refresh on device page (#25748)

* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change

* Ensure grid options always return an object (#25760)

Assist Chat: handle intent progress delta not always being there (#25730)

handle intent progress data type change

More support for no-grid energy dashboard (#25644)

* More support for no-grid energy dashboard

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

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

* lint

---------

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

Z-Wave: apply sentence-style capitalization (#25739)

Display full error for card preview mode (#25747)

Fix edit card not working in chrome after editing (#25751)

Change backup type order (#25759)

Fix alerts refresh on device page (#25748)

* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change

Ensure grid options always return an object (#25760)

* fix merge issue

* lint

* Update text and buttons

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* update text

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-06-23 11:07:19 +03:00
Paulus Schoutsen
1349d9d8e3
Hide AI Task from default dashboard (#25877) 2025-06-23 09:40:16 +02:00
Petar Petrov
f6f2cb0fce
Round chart limits with fit_y_data (#25851) 2025-06-23 08:42:54 +03:00
Paulus Schoutsen
589fa75b17
Add support for accept keyword in media selector (#25808) 2025-06-22 14:02:39 -04:00
renovate[bot]
fdd6ccf379
Update dependency @rsdoctor/rspack-plugin to v1.1.4 (#25868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-22 18:48:32 +03:00
Petar Petrov
f50d5d79a4
Another fix for history chart axis rounding (#25852) 2025-06-22 12:11:29 +02:00
iluvdata
ad589b32c9
allow previews in config_subentries_flow (#25859) 2025-06-21 08:09:13 +00:00
renovate[bot]
1990472970
Lock file maintenance (#25838)
* Lock file maintenance
2025-06-20 20:43:30 +00:00
Norbert Rittel
299713fd5e
Fix inconsistently spelled occurrences of "add-on" (#25858)
* Fix inconsistently spelled occurrences of "add-on"

- add the missing hyphen on three occurrences of "addon"
- change one occurrence of "Add-on" to lowercase

* Also capitalize one inconsistent occurrence of "Ingress"
2025-06-20 22:09:09 +02:00
renovate[bot]
a13dae4745
Update vitest monorepo to v3.2.4 (#25857)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 18:30:39 +00:00
Paulus Schoutsen
8324c23618
Update people dashboard intro (#25856) 2025-06-20 20:30:25 +02:00
Norbert Rittel
9c8d6a939b
Fix spelling of "to log in", "to set up" and more (#25855)
- add missing space to "log in" where it's the verb
- add missing space to "set up" where it's the verb
- fix sentence-casing of "Create area"
- fix spelling of "ID" as abbreviation
2025-06-20 20:20:00 +02:00
Paulus Schoutsen
1059b519af
Add LLM Task to suggest automation name (#25778)
* Add AI Task to suggest automation name

* Use state and update styling
2025-06-20 12:07:47 -04:00
Paulus Schoutsen
52a02093e3
Allow changing LLM Task preferences (#25779)
* Allow changing LLM Task preferences

* value-changed
2025-06-20 12:07:29 -04:00
Paul Bottein
b608bd949b
Add fields and multiple support to object selector (#25843)
* Add schema and multiple for object selector

* Add selector to gallery

* Fix description

* Improve formatting

* Add ellipsis

* Update fields instead of schema

* Update gallery

* Update format

* Fix format value

* Fix dialog size
2025-06-20 15:48:59 +02:00
Paul Bottein
f87e20cae9
Redesign area card (#25802)
* Use entity filter to get device classes in editor

* Add name and sensor states to area card

* Fix area type

* Add basic controls

* Fix editor

* Add image

* Add image type

* Add translation key for area controls

* Improve editor

* Fix unknown entity id in area

* Fix default feature position

* Add alert badge

* Add helper

* Display all alerts when using big card

* Disable covers and re-enable switches

* Filter compatible controls

* Use state icon for alerts

* Rename to display type

* Delete deprecated show camera

* Fix aspect ratio

* Improve helper

* Undo domain icon changes

* Undo domain icon changes

* Update types

* Fix translation cases

* Fix card size

* Feedback

* Don't fallback to compact

* Use plural form

* Refactor active color
2025-06-20 15:33:26 +02:00
renovate[bot]
d58186fec9
Update dependency typescript-eslint to v8.34.1 (#25848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 15:01:44 +03:00
Bastian
f47336392c
Fix/dhcp config network sort (#25799)
* Add ip sort method to compare helper

* Add ip sort functionality to dhcp config panel datatable

* Add type ip to DataTableColumnData

* Change ip sorting to padStart method for better readablity

* Rename ip compare method to clarify ipv4

* Enhance IP compare method to include ipv6

* Add compare IP test
2025-06-20 15:01:02 +03:00
karwosts
e9272b9a27
Remove gray colors from chart color set (#25844) 2025-06-20 13:50:12 +02:00
Norbert Rittel
b20d489bdd
Fix sentence-casing of Z-Wave strings (#25846)
* Fix sentence-casing of Z-Wave strings

* Also fix casing of "Z-Wave JS Device Database"
2025-06-19 21:29:07 +02:00
Petar Petrov
f7634c45c2
Fix bar chart data order when using the legend (#25832)
* Fix bar chart data order when using the legend

* type fix
2025-06-19 17:49:58 +02:00
renovate[bot]
8ee80586a8
Update vaadinWebComponents monorepo to v24.8.0 (#25842)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 16:12:02 +02:00
Bram Kragten
6aa8a24aad
Fix for my links ending with a slash (#25841) 2025-06-19 15:51:11 +03:00
Norbert Rittel
65e78de41c
Improve explanation of 'Ping a Matter device' dialog (#25839)
* Fix explanation of 'Ping a Matter device' dialog

- change to more descriptive wording using third-person singular
- replace first "on" with "of" to clarify (currently "on" contradicts "server-side")
- remove the wrong hyphen in "IP-addresses"
2025-06-19 11:00:22 +00:00
Norbert Rittel
573c1db081
Add hyphen to all compounds with "-powered" (#25840) 2025-06-19 12:49:07 +02:00
Paul Bottein
cf03e041a8
Fix combobox helper (#25834)
* Fix combobox helper

* Pass disabled to all helpers
2025-06-18 17:57:11 +02:00
Paul Bottein
b4dbfa6f70
Remove debug type in secondary line in statistic picker (#25835) 2025-06-18 15:44:27 +00:00
Bastian
723bb4dfeb
Change duration input to ha-time-input component (#25800)
* Change duration input to ha-time-input component

* Change ha-time-input to duration-input component

* Add DurationDict to ForDict cast
2025-06-18 15:31:15 +00:00
renovate[bot]
98dcce6af1
Update dependency lint-staged to v16.1.2 (#25833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 17:24:40 +02:00
karwosts
e3cdd69835
Display yaml errors in all ha-yaml-editor (#25819) 2025-06-18 09:32:06 +03:00
karwosts
0ddf3aa675
Uncap width of ha-statistics-picker (#25822) 2025-06-17 21:12:50 +02:00
renovate[bot]
9c9ce78ff9
Update dependency lint-staged to v16.1.1 (#25817)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 20:05:09 +02:00
Paulus Schoutsen
4f8c50aaa9
Show voice ID in Cloud Pref (#25809)
* Show voice ID in Cloud Pref

* Address style comments

* Update src/panels/config/cloud/account/cloud-tts-pref.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-06-17 13:32:27 +00:00
Petar Petrov
3cfc6297b5
Fix sankey total calculation to account for included_in_stat (#25805) 2025-06-17 15:14:33 +02:00
Paul Bottein
cc0586bf36
Fix disabled color in dark mode in production (#25818) 2025-06-17 15:14:07 +02:00
Petar Petrov
bdf48140e4
Reduce reset-zoom button size on timeline charts (#25796) 2025-06-17 15:07:57 +02:00
Anthony Relle
d7f4a7acb0
Update ElectricityMaps URL in Energy Dashboard (#25816)
fix: update electricitymap domain
2025-06-17 09:54:34 +00:00
renovate[bot]
154e85eb45
Update dependency eslint-plugin-lit-a11y to v5.0.1 (#25812)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 10:16:13 +03:00
renovate[bot]
ea15e5a44e
Update dependency eslint-plugin-lit-a11y to v5 (#25718)
* Update dependency eslint-plugin-lit-a11y to v5

* Update import

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2025-06-17 09:06:44 +03:00
renovate[bot]
d581c4b0aa
Update dependency eslint to v9.29.0 (#25810)
* Update dependency eslint to v9.29.0

* fix warning

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2025-06-17 05:55:13 +00:00
karwosts
5b7655cf72
Fix automation drag&drop loses item (#25811) 2025-06-17 08:42:20 +03:00
dependabot[bot]
634e1dbde8
Bump softprops/action-gh-release from 2.2.2 to 2.3.2 (#25795)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.2.2 to 2.3.2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.2.2...v2.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 11:03:16 +03:00
renovate[bot]
a255463a76
Update dependency sinon to v21 (#25794)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 08:53:23 +03:00
renovate[bot]
3c40b3112e
Update dependency @codemirror/view to v6.37.2 (#25791)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 08:24:44 +03:00
renovate[bot]
9f33ec55f5
Update dependency glob to v11.0.3 (#25792)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 08:24:01 +03:00
Simon Lamon
c35c4d16f0
Remove Google Assistant link (#25780) 2025-06-15 17:17:38 +03:00
Simon Lamon
159c4d100a
Add perform action with to translations (#25781) 2025-06-15 17:15:08 +03:00
quinnter
05035a281b
Improved new dashboard dialog (#25676)
* tidied cards and more translations

* fix container heading padding

* updated filter to use fusejs, changes to how list is localized
2025-06-14 10:55:14 +02:00
renovate[bot]
67c7a3931f
Update dependency typescript-eslint to v8.34.0 (#25770)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-13 10:18:48 +03:00
Paulus Schoutsen
cf41a43070
Hide backup during onboarding (#25768) 2025-06-12 13:48:59 -04:00
renovate[bot]
5c385d5368
Update vitest monorepo to v3.2.3 (#25765)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-12 16:25:22 +03:00
renovate[bot]
0ae78300c9
Update dependency core-js to v3.43.0 (#25761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-12 16:24:57 +03:00
Paul Bottein
01d2ef13c6
Ensure grid options always return an object (#25760) 2025-06-12 10:44:20 +03:00
Petar Petrov
af6911e848
Fix alerts refresh on device page (#25748)
* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change
2025-06-12 09:40:36 +02:00
Paul Bottein
21af10fd28
Change backup type order (#25759) 2025-06-12 07:29:58 +00:00
Paul Bottein
6d30d15638
Fix edit card not working in chrome after editing (#25751) 2025-06-11 14:15:50 +00:00
Paul Bottein
d542b52ebd
Display full error for card preview mode (#25747) 2025-06-11 13:04:54 +03:00
c0ffeeca7
43cc49bb32
Z-Wave: apply sentence-style capitalization (#25739) 2025-06-11 09:13:32 +03:00
karwosts
b3f0a6328e
More support for no-grid energy dashboard (#25644)
* More support for no-grid energy dashboard

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

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

* lint

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2025-06-11 09:11:46 +03:00
Paulus Schoutsen
9d6a7e7e6f
Assist Chat: handle intent progress delta not always being there (#25730)
handle intent progress data type change
2025-06-10 10:59:10 -04:00
Paul Bottein
78d7da21aa
Fix custom value selected when clicking item in combo box (#25734) 2025-06-10 16:46:09 +02:00
Paul Bottein
0474a24df6
Allow to open more info using query params (#25733) 2025-06-10 13:20:10 +03:00
Paul Bottein
6e7ac6fdf7
Reduce keypad gap and margin in alarm panel card (#25735) 2025-06-10 13:16:06 +03:00
Petar Petrov
7b9683df89
Fix period boundaries in Energy dashboard (#25728) 2025-06-10 10:28:51 +02:00
renovate[bot]
8523ddfd29
Update vaadinWebComponents monorepo to v24.7.8 (#25729)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 15:50:36 +03:00
Petar Petrov
2589e1a49f
Handle tiny values in a log chart (#25727) 2025-06-09 14:45:23 +03:00
Paul Schreiber
5ce5f9a189
fix spelling of JavaScript in bug report template (#25726)
Correctly capitalize JavaScript in the bug report template.
2025-06-09 06:08:58 +00:00
renovate[bot]
6dd7217a20
Update dependency @babel/runtime to v7.27.6 (#25722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 09:01:08 +03:00
renovate[bot]
0d02d0d334
Update vitest monorepo to v3.2.2 (#25723)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 09:00:45 +03:00
renovate[bot]
fed0dfa091
Update vitest monorepo to v3.2.1 (#25715)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-07 09:09:17 +02:00
renovate[bot]
39de40dec9
Update Yarn to v4.9.2 (#25714)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-07 09:09:11 +02:00
renovate[bot]
e1c42d9985
Update dependency typescript-eslint to v8.33.1 (#25712)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 20:33:20 +02:00
renovate[bot]
ad375c9b01
Update dependency hls.js to v1.6.5 (#25711)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 20:33:01 +02:00
renovate[bot]
07230e5ef5
Update dependency @codemirror/language to v6.11.1 (#25708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 19:59:35 +02:00
renovate[bot]
52f5af6090
Update dependency @rsdoctor/rspack-plugin to v1.1.3 (#25709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 19:59:08 +02:00
karwosts
3c07289077
Handle shorthand template conditions in trace (#25705) 2025-06-06 18:10:10 +02:00
Mathieu
8eb7fe8b0a
Adjust tooltip positioning in ha-sidebar for not first lis… (#25696)
fix(tooltip): fix tooltip positioning in ha-sidebar for not first listbox
2025-06-05 04:35:32 +00:00
renovate[bot]
c8c2966d34
Update dependency gulp to v5.0.1 (#25698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 06:25:43 +02:00
renovate[bot]
a8768a5d9d
Update dependency @bundle-stats/plugin-webpack-filter to v4.20.2 (#25692)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 06:25:20 +02:00
karwosts
02bb7086e7
Hoist integration card tooltips (#25679) 2025-06-03 21:41:27 +02:00
renovate[bot]
42d8b2ae19
Update dependency lint-staged to v16 (#25463)
* Update dependency lint-staged to v16

* Remove shell parameter

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2025-06-03 19:18:39 +00:00
renovate[bot]
e08f4a6bba
Update dependency @types/chromecast-caf-receiver to v6.0.22 (#25681)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 17:32:25 +02:00
renovate[bot]
2e6c35d977
Update dependency hls.js to v1.6.4 (#25682)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 17:32:08 +02:00
renovate[bot]
17305a818b
Update dependency eslint to v9.28.0 (#25683)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 01:32:02 +02:00
renovate[bot]
08389dad04
Update babel monorepo to v7.27.4 (#25680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 22:36:58 +03:00
Bram Kragten
ab6ace46b5
Set answers to yes and no for cloud pipeline confirm (#25674) 2025-06-02 14:02:06 +00:00
renovate[bot]
535dedbbc4
Update dependency hls.js to v1.6.3 (#25669)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 16:01:37 +02:00
renovate[bot]
412eb0c647
Update dependency @codemirror/view to v6.37.1 (#25672)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 16:01:29 +02:00
renovate[bot]
87c8ebd493
Update dependency @codemirror/view to v6.37.0 (#25664)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-01 09:31:21 +02:00
Simon Lamon
6e49f89126
Calendar add event button gap alignment (#25662)
Calendar gap alignment
2025-06-01 09:39:10 +03:00
ildar170975
a099e65a9d
Fix "unavailable" state in Area card (#25063)
* fix "unavailable" state

* Show "-" for unavailable/undefined
2025-05-31 10:45:58 +03:00
renovate[bot]
11e4a9f056
Update dependency typescript-eslint to v8.33.0 (#25657)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 17:52:29 +00:00
Bram Kragten
b617299eee
Add css variables for start and end padding of tabs (#25654) 2025-05-30 16:48:15 +02:00
Bram Kragten
768f27b1b9
Add label to collapse button in data table groups (#25653) 2025-05-30 16:47:54 +02:00
Bram Kragten
5ed816df6d
fix line height entity card (#25652) 2025-05-30 15:34:03 +02:00
renovate[bot]
6692ac7517
Update dependency @lokalise/node-api to v14.8.0 (#25651)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 14:11:04 +02:00
renovate[bot]
65499db0cb
Update babel monorepo to v7.27.3 (#25650)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 14:27:05 +03:00
renovate[bot]
11a1eabf61
Update rspack monorepo to v1.3.12 (#25649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 14:26:40 +03:00
ildar170975
b30fa122ba
Revert #25027 "more-info-camera: disable download_snapshot if idle" (#25643)
remove a check for "idle"
2025-05-30 10:59:03 +03:00
ildar170975
6730d08b85
Map card: add prefix & suffix for "label_mode: attribute" (#25033)
* added prefix & suffix

* added prefix & suffix

* added prefix & suffix

* added prefix & suffix

* added prefix & suffix

* remove prefix, rename suffix -> unit

* remove prefix, rename suffix -> unit

* remove prefix, rename suffix -> unit

* remove prefix, rename suffix -> unit

* remove prefix, rename suffix -> unit
2025-05-30 10:56:35 +03:00
ildar170975
67003d6fd1
Add cyrilic letters to slugify() (#25647)
* add cyrilic

* Update src/common/string/slugify.ts

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2025-05-30 05:38:45 +00:00
Petar Petrov
414d46be65
Add device button on the Z-Wave controller's device page (#25636) 2025-05-29 15:29:34 +03:00
Petar Petrov
1485d1a1de
Fix Z-WaveJS device count in dashboard (#25635) 2025-05-29 15:29:24 +03:00
Ville Skyttä
fd13e41524
Spelling fixes (#25638) 2025-05-29 10:48:50 +02:00
Petar Petrov
77f7ca0368
Use theme variables for network graph labels (#25634) 2025-05-29 10:05:26 +02:00
Ville Skyttä
7471250a07
Fix Zigbee capitalization in manage device button (#25637) 2025-05-29 07:59:58 +00:00
karwosts
8b0a63d791
Cleanup some styling on disabled entity picker (#25632) 2025-05-29 08:53:30 +03:00
renovate[bot]
57ffa814ed
Update dependency @octokit/rest to v22 (#25633)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-29 08:51:54 +03:00
Paul Bottein
16e20456e2
Put item at the top of picker result if there is an exact match with entity id (#25625) 2025-05-28 22:33:42 +02:00
Paul Bottein
9c0ce41ebb
Improve search in add automation element dialog (#25626)
* Improve search in add automation element dialog

* Remove unexpected import

* Take min character search into account
2025-05-28 19:38:33 +02:00
Paul Bottein
b458a1d7c6
Improve action picker UI and search (#25525) 2025-05-28 15:03:17 +02:00
renovate[bot]
0eaeeb1141
Update dependency globals to v16.2.0 (#25624)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 14:51:35 +03:00
Paul Bottein
b7e63e697f
Fix picker field height (#25623) 2025-05-28 14:07:22 +03:00
Paul Bottein
06db0f4b98
Fix missing helper for entity picker (#25622) 2025-05-28 14:06:45 +03:00
Paul Bottein
d33636c6fb
Force narrow style for action, condition and trigger in flows (#25619) 2025-05-28 12:04:54 +02:00
Wendelin
bbb546159c
Set markdown code line-height (#25618) 2025-05-28 10:04:54 +02:00
karwosts
e8fc36026a
More error handling for preview flow (#25611)
* More error handling for preview flow

* await unsub
2025-05-28 07:04:03 +03:00
Petar Petrov
38f8c804af
Fix for history graph with tiny values (#25612) 2025-05-27 20:46:03 +02:00
Petar Petrov
7c5bf26240
Fix duplicate legend items when comparing energy data (#25610) 2025-05-27 20:43:32 +02:00
Norbert Rittel
189067d14b
Fix typo in restore_entity_id_selected::confirm_text (#25615) 2025-05-27 19:56:55 +02:00
Petar Petrov
e79e0f77b8
Navigate to newly added device (#25608) 2025-05-27 16:19:53 +02:00
Wendelin
b226e5c697
Fix font settings for button card (#25607) 2025-05-27 12:55:20 +02:00
Wendelin
52ad31601c
Fix sidebar loading and demo (#25606) 2025-05-27 10:22:04 +02:00
Petar Petrov
cba3e4df7f
Fix double history graphs for a disabled entity (#25604) 2025-05-27 09:08:58 +02:00
Paul Bottein
3532cfa974
Fix duplicated items in strategy editor (#25600) 2025-05-26 19:21:44 +02:00
556 changed files with 17204 additions and 7939 deletions

View File

@ -11,7 +11,7 @@ body:
**Please do not report issues for custom cards.**
[fr]: https://github.com/home-assistant/frontend/discussions
[fr]: https://github.com/orgs/home-assistant/discussions
[releases]: https://github.com/home-assistant/home-assistant/releases
- type: checkboxes
attributes:
@ -108,9 +108,9 @@ body:
render: yaml
- type: textarea
attributes:
label: Javascript errors shown in your browser console/inspector
label: JavaScript errors shown in your browser console/inspector
description: >
If you come across any Javascript or other error logs, e.g., in your
If you come across any JavaScript or other error logs, e.g., in your
browser console/inspector please provide them.
render: txt
- type: textarea

View File

@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Request a feature for the UI / Dashboards
url: https://github.com/home-assistant/frontend/discussions/category_choices
url: https://github.com/orgs/home-assistant/discussions
about: Request a new feature for the Home Assistant frontend.
- name: Report a bug that is NOT related to the UI / Dashboards
url: https://github.com/home-assistant/core/issues

53
.github/ISSUE_TEMPLATE/task.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: Task
description: For staff only - Create a task
type: Task
body:
- type: markdown
attributes:
value: |
## ⚠️ RESTRICTED ACCESS
**This form is restricted to Open Home Foundation staff and authorized contributors only.**
If you are a community member wanting to contribute, please:
- For bug reports: Use the [bug report form](https://github.com/home-assistant/frontend/issues/new?template=bug_report.yml)
- For feature requests: Submit to [Feature Requests](https://github.com/orgs/home-assistant/discussions)
---
### For authorized contributors
Use this form to create tasks for development work, improvements, or other actionable items that need to be tracked.
- type: textarea
id: description
attributes:
label: Description
description: |
Provide a clear and detailed description of the task that needs to be accomplished.
Be specific about what needs to be done, why it's important, and any constraints or requirements.
placeholder: |
Describe the task, including:
- What needs to be done
- Why this task is needed
- Expected outcome
- Any constraints or requirements
validations:
required: true
- type: textarea
id: additional_context
attributes:
label: Additional context
description: |
Any additional information, links, research, or context that would be helpful.
Include links to related issues, research, prototypes, roadmap opportunities etc.
placeholder: |
- Roadmap opportunity: [link]
- Epic: [link]
- Feature request: [link]
- Technical design documents: [link]
- Prototype/mockup: [link]
- Dependencies: [links]
validations:
required: false

592
.github/copilot-instructions.md vendored Normal file
View File

@ -0,0 +1,592 @@
# GitHub Copilot & Claude Code Instructions
You are an assistant helping with development of the Home Assistant frontend. The frontend is built using Lit-based Web Components and TypeScript, providing a responsive and performant interface for home automation control.
## Table of Contents
- [Quick Reference](#quick-reference)
- [Core Architecture](#core-architecture)
- [Development Standards](#development-standards)
- [Component Library](#component-library)
- [Common Patterns](#common-patterns)
- [Text and Copy Guidelines](#text-and-copy-guidelines)
- [Development Workflow](#development-workflow)
- [Review Guidelines](#review-guidelines)
## Quick Reference
### Essential Commands
```bash
yarn lint # ESLint + Prettier + TypeScript + Lit
yarn format # Auto-fix ESLint + Prettier
yarn lint:types # TypeScript compiler
yarn test # Vitest
script/develop # Development server
```
### Component Prefixes
- `ha-` - Home Assistant components
- `hui-` - Lovelace UI components
- `dialog-` - Dialog components
### Import Patterns
```typescript
import type { HomeAssistant } from "../types";
import { fireEvent } from "../common/dom/fire_event";
import { showAlertDialog } from "../dialogs/generic/show-alert-dialog";
```
## Core Architecture
The Home Assistant frontend is a modern web application that:
- Uses Web Components (custom elements) built with Lit framework
- Is written entirely in TypeScript with strict type checking
- Communicates with the backend via WebSocket API
- Provides comprehensive theming and internationalization
## Development Standards
### Code Quality Requirements
**Linting and Formatting (Enforced by Tools)**
- ESLint config extends Airbnb, TypeScript strict, Lit, Web Components, Accessibility
- Prettier with ES5 trailing commas enforced
- No console statements (`no-console: "error"`) - use proper logging
- Import organization: No unused imports, consistent type imports
**Naming Conventions**
- PascalCase for types and classes
- camelCase for variables, methods
- Private methods require leading underscore
- Public methods forbid leading underscore
### TypeScript Usage
- **Always use strict TypeScript**: Enable all strict flags, avoid `any` types
- **Proper type imports**: Use `import type` for type-only imports
- **Define interfaces**: Create proper interfaces for data structures
- **Type component properties**: All Lit properties must be properly typed
- **No unused variables**: Prefix with `_` if intentionally unused
- **Consistent imports**: Use `@typescript-eslint/consistent-type-imports`
```typescript
// Good
import type { HomeAssistant } from "../types";
interface EntityConfig {
entity: string;
name?: string;
}
@property({ type: Object })
hass!: HomeAssistant;
// Bad
@property()
hass: any;
```
### Web Components with Lit
- **Use Lit 3.x patterns**: Follow modern Lit practices
- **Extend appropriate base classes**: Use `LitElement`, `SubscribeMixin`, or other mixins as needed
- **Define custom element names**: Use `ha-` prefix for components
```typescript
@customElement("ha-my-component")
export class HaMyComponent extends LitElement {
@property({ attribute: false })
hass!: HomeAssistant;
@state()
private _config?: MyComponentConfig;
static get styles() {
return css`
:host {
display: block;
}
`;
}
render() {
return html`<div>Content</div>`;
}
}
```
### Component Guidelines
- **Use composition**: Prefer composition over inheritance
- **Lazy load panels**: Heavy panels should be dynamically imported
- **Optimize renders**: Use `@state()` for internal state, `@property()` for public API
- **Handle loading states**: Always show appropriate loading indicators
- **Support themes**: Use CSS custom properties from theme
### Data Management
- **Use WebSocket API**: All backend communication via home-assistant-js-websocket
- **Cache appropriately**: Use collections and caching for frequently accessed data
- **Handle errors gracefully**: All API calls should have error handling
- **Update real-time**: Subscribe to state changes for live updates
```typescript
// Good
try {
const result = await fetchEntityRegistry(this.hass.connection);
this._processResult(result);
} catch (err) {
showAlertDialog(this, {
text: `Failed to load: ${err.message}`,
});
}
```
### Styling Guidelines
- **Use CSS custom properties**: Leverage the theme system
- **Mobile-first responsive**: Design for mobile, enhance for desktop
- **Follow Material Design**: Use Material Web Components where appropriate
- **Support RTL**: Ensure all layouts work in RTL languages
```typescript
static get styles() {
return css`
:host {
--spacing: 16px;
padding: var(--spacing);
color: var(--primary-text-color);
background-color: var(--card-background-color);
}
@media (max-width: 600px) {
:host {
--spacing: 8px;
}
}
`;
}
```
### Performance Best Practices
- **Code split**: Split code at the panel/dialog level
- **Lazy load**: Use dynamic imports for heavy components
- **Optimize bundle**: Keep initial bundle size minimal
- **Use virtual scrolling**: For long lists, implement virtual scrolling
- **Memoize computations**: Cache expensive calculations
### Testing Requirements
- **Write tests**: Add tests for data processing and utilities
- **Test with Vitest**: Use the established test framework
- **Mock appropriately**: Mock WebSocket connections and API calls
- **Test accessibility**: Ensure components are accessible
## Component Library
### Dialog Components
**Available Dialog Types:**
- `ha-md-dialog` - Preferred for new code (Material Design 3)
- `ha-dialog` - Legacy component still widely used
**Opening Dialogs (Fire Event Pattern - Recommended):**
```typescript
fireEvent(this, "show-dialog", {
dialogTag: "dialog-example",
dialogImport: () => import("./dialog-example"),
dialogParams: { title: "Example", data: someData },
});
```
**Dialog Implementation Requirements:**
- Implement `HassDialog<T>` interface
- Use `createCloseHeading()` for standard headers
- Import `haStyleDialog` for consistent styling
- Return `nothing` when no params (loading state)
- Fire `dialog-closed` event when closing
- Add `dialogInitialFocus` for accessibility
````
### Form Component (ha-form)
- Schema-driven using `HaFormSchema[]`
- Supports entity, device, area, target, number, boolean, time, action, text, object, select, icon, media, location selectors
- Built-in validation with error display
- Use `dialogInitialFocus` in dialogs
- Use `computeLabel`, `computeError`, `computeHelper` for translations
```typescript
<ha-form
.hass=${this.hass}
.data=${this._data}
.schema=${this._schema}
.error=${this._errors}
.computeLabel=${(schema) => this.hass.localize(`ui.panel.${schema.name}`)}
@value-changed=${this._valueChanged}
></ha-form>
````
### Alert Component (ha-alert)
- Types: `error`, `warning`, `info`, `success`
- Properties: `title`, `alert-type`, `dismissable`, `icon`, `action`, `rtl`
- Content announced by screen readers when dynamically displayed
```html
<ha-alert alert-type="error">Error message</ha-alert>
<ha-alert alert-type="warning" title="Warning">Description</ha-alert>
<ha-alert alert-type="success" dismissable>Success message</ha-alert>
```
## Common Patterns
### Creating a Panel
```typescript
@customElement("ha-panel-myfeature")
export class HaPanelMyFeature extends SubscribeMixin(LitElement) {
@property({ attribute: false })
hass!: HomeAssistant;
@property({ type: Boolean, reflect: true })
narrow!: boolean;
@property()
route!: Route;
hassSubscribe() {
return [
subscribeEntityRegistry(this.hass.connection, (entities) => {
this._entities = entities;
}),
];
}
}
```
### Creating a Dialog
```typescript
@customElement("dialog-my-feature")
export class DialogMyFeature
extends LitElement
implements HassDialog<MyDialogParams>
{
@property({ attribute: false })
hass!: HomeAssistant;
@state()
private _params?: MyDialogParams;
public async showDialog(params: MyDialogParams): Promise<void> {
this._params = params;
}
public closeDialog(): void {
this._params = undefined;
fireEvent(this, "dialog-closed", { dialog: this.localName });
}
protected render() {
if (!this._params) {
return nothing;
}
return html`
<ha-dialog
open
@closed=${this.closeDialog}
.heading=${createCloseHeading(this.hass, this._params.title)}
>
<!-- Dialog content -->
<ha-button @click=${this.closeDialog} slot="secondaryAction">
${this.hass.localize("ui.common.cancel")}
</ha-button>
<ha-button @click=${this._submit} slot="primaryAction">
${this.hass.localize("ui.common.save")}
</ha-button>
</ha-dialog>
`;
}
static styles = [haStyleDialog, css``];
}
```
### Dialog Design Guidelines
- Max width: 560px (Alert/confirmation: 320px fixed width)
- Close X-icon on top left (all screen sizes)
- Submit button grouped with cancel at bottom right
- Keep button labels short: "Save", "Delete", "Enable"
- Destructive actions use red warning button
- Always use a title (best practice)
- Strive for minimalism
#### Creating a Lovelace Card
**Purpose**: Cards allow users to tell different stories about their house (based on gallery)
```typescript
@customElement("hui-my-card")
export class HuiMyCard extends LitElement implements LovelaceCard {
@property({ attribute: false })
hass!: HomeAssistant;
@state()
private _config?: MyCardConfig;
public setConfig(config: MyCardConfig): void {
if (!config.entity) {
throw new Error("Entity required");
}
this._config = config;
}
public getCardSize(): number {
return 3; // Height in grid units
}
// Optional: Editor for card configuration
public static getConfigElement(): LovelaceCardEditor {
return document.createElement("hui-my-card-editor");
}
// Optional: Stub config for card picker
public static getStubConfig(): object {
return { entity: "" };
}
}
```
**Card Guidelines:**
- Cards are highly customizable for different households
- Implement `LovelaceCard` interface with `setConfig()` and `getCardSize()`
- Use proper error handling in `setConfig()`
- Consider all possible states (loading, error, unavailable)
- Support different entity types and states
- Follow responsive design principles
- Add configuration editor when needed
### Internationalization
- **Use localize**: Always use the localization system
- **Add translation keys**: Add keys to src/translations/en.json
- **Support placeholders**: Use proper placeholder syntax
```typescript
this.hass.localize("ui.panel.config.updates.update_available", {
count: 5,
});
```
### Accessibility
- **ARIA labels**: Add appropriate ARIA labels
- **Keyboard navigation**: Ensure all interactions work with keyboard
- **Screen reader support**: Test with screen readers
- **Color contrast**: Meet WCAG AA standards
## Development Workflow
### Setup and Commands
1. **Setup**: `script/setup` - Install dependencies
2. **Develop**: `script/develop` - Development server
3. **Lint**: `yarn lint` - Run all linting before committing
4. **Test**: `yarn test` - Add and run tests
5. **Build**: `script/build_frontend` - Test production build
### Common Pitfalls to Avoid
- Don't use `querySelector` - Use refs or component properties
- Don't manipulate DOM directly - Let Lit handle rendering
- Don't use global styles - Scope styles to components
- Don't block the main thread - Use web workers for heavy computation
- Don't ignore TypeScript errors - Fix all type issues
### Security Best Practices
- Sanitize HTML - Never use `unsafeHTML` with user content
- Validate inputs - Always validate user inputs
- Use HTTPS - All external resources must use HTTPS
- CSP compliance - Ensure code works with Content Security Policy
### Text and Copy Guidelines
#### Terminology Standards
**Delete vs Remove** (Based on gallery/src/pages/Text/remove-delete-add-create.markdown)
- **Use "Remove"** for actions that can be restored or reapplied:
- Removing a user's permission
- Removing a user from a group
- Removing links between items
- Removing a widget from dashboard
- Removing an item from a cart
- **Use "Delete"** for permanent, non-recoverable actions:
- Deleting a field
- Deleting a value in a field
- Deleting a task
- Deleting a group
- Deleting a permission
- Deleting a calendar event
**Create vs Add** (Create pairs with Delete, Add pairs with Remove)
- **Use "Add"** for already-existing items:
- Adding a permission to a user
- Adding a user to a group
- Adding links between items
- Adding a widget to dashboard
- Adding an item to a cart
- **Use "Create"** for something made from scratch:
- Creating a new field
- Creating a new task
- Creating a new group
- Creating a new permission
- Creating a new calendar event
#### Writing Style (Consistent with Home Assistant Documentation)
- **Use American English**: Standard spelling and terminology
- **Friendly, informational tone**: Be inspiring, personal, comforting, engaging
- **Address users directly**: Use "you" and "your"
- **Be inclusive**: Objective, non-discriminatory language
- **Be concise**: Use clear, direct language
- **Be consistent**: Follow established terminology patterns
- **Use active voice**: "Delete the automation" not "The automation should be deleted"
- **Avoid jargon**: Use terms familiar to home automation users
#### Language Standards
- **Always use "Home Assistant"** in full, never "HA" or "HASS"
- **Avoid abbreviations**: Spell out terms when possible
- **Use sentence case everywhere**: Titles, headings, buttons, labels, UI elements
- ✅ "Create new automation"
- ❌ "Create New Automation"
- ✅ "Device settings"
- ❌ "Device Settings"
- **Oxford comma**: Use in lists (item 1, item 2, and item 3)
- **Replace Latin terms**: Use "like" instead of "e.g.", "for example" instead of "i.e."
- **Avoid CAPS for emphasis**: Use bold or italics instead
- **Write for all skill levels**: Both technical and non-technical users
#### Key Terminology
- **"add-on"** (hyphenated, not "addon")
- **"integration"** (preferred over "component")
- **Technical terms**: Use lowercase (automation, entity, device, service)
#### Translation Considerations
- **Add translation keys**: All user-facing text must be translatable
- **Use placeholders**: Support dynamic content in translations
- **Keep context**: Provide enough context for translators
```typescript
// Good
this.hass.localize("ui.panel.config.automation.delete_confirm", {
name: automation.alias,
});
// Bad - hardcoded text
("Are you sure you want to delete this automation?");
```
### Common Review Issues (From PR Analysis)
#### User Experience and Accessibility
- **Form validation**: Always provide proper field labels and validation feedback
- **Form accessibility**: Prevent password managers from incorrectly identifying fields
- **Loading states**: Show clear progress indicators during async operations
- **Error handling**: Display meaningful error messages when operations fail
- **Mobile responsiveness**: Ensure components work well on small screens
- **Hit targets**: Make clickable areas large enough for touch interaction
- **Visual feedback**: Provide clear indication of interactive states
#### Dialog and Modal Patterns
- **Dialog width constraints**: Respect minimum and maximum width requirements
- **Interview progress**: Show clear progress for multi-step operations
- **State persistence**: Handle dialog state properly during background operations
- **Cancel behavior**: Ensure cancel/close buttons work consistently
- **Form prefilling**: Use smart defaults but allow user override
#### Component Design Patterns
- **Terminology consistency**: Use "Join"/"Apply" instead of "Group" when appropriate
- **Visual hierarchy**: Ensure proper font sizes and spacing ratios
- **Grid alignment**: Components should align to the design grid system
- **Badge placement**: Position badges and indicators consistently
- **Color theming**: Respect theme variables and design system colors
#### Code Quality Issues
- **Null checking**: Always check if entities exist before accessing properties
- **TypeScript safety**: Handle potentially undefined array/object access
- **Import organization**: Remove unused imports and use proper type imports
- **Event handling**: Properly subscribe and unsubscribe from events
- **Memory leaks**: Clean up subscriptions and event listeners
#### Configuration and Props
- **Optional parameters**: Make configuration fields optional when sensible
- **Smart defaults**: Provide reasonable default values
- **Future extensibility**: Design APIs that can be extended later
- **Validation**: Validate configuration before applying changes
## Review Guidelines
### Core Requirements Checklist
- [ ] TypeScript strict mode passes (`yarn lint:types`)
- [ ] No ESLint errors or warnings (`yarn lint:eslint`)
- [ ] Prettier formatting applied (`yarn lint:prettier`)
- [ ] Lit analyzer passes (`yarn lint:lit`)
- [ ] Component follows Lit best practices
- [ ] Proper error handling implemented
- [ ] Loading states handled
- [ ] Mobile responsive
- [ ] Theme variables used
- [ ] Translations added
- [ ] Accessible to screen readers
- [ ] Tests added (where applicable)
- [ ] No console statements (use proper logging)
- [ ] Unused imports removed
- [ ] Proper naming conventions
### Text and Copy Checklist
- [ ] Follows terminology guidelines (Delete vs Remove, Create vs Add)
- [ ] Localization keys added for all user-facing text
- [ ] Uses "Home Assistant" (never "HA" or "HASS")
- [ ] Sentence case for ALL text (titles, headings, buttons, labels)
- [ ] American English spelling
- [ ] Friendly, informational tone
- [ ] Avoids abbreviations and jargon
- [ ] Correct terminology (add-on not addon, integration not component)
### Component-Specific Checks
- [ ] Dialogs implement HassDialog interface
- [ ] Dialog styling uses haStyleDialog
- [ ] Dialog accessibility includes dialogInitialFocus
- [ ] ha-alert used correctly for messages
- [ ] ha-form uses proper schema structure
- [ ] Components handle all states (loading, error, unavailable)
- [ ] Entity existence checked before property access
- [ ] Event subscriptions properly cleaned up

View File

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

View File

@ -55,7 +55,7 @@ jobs:
script/release
- name: Upload release assets
uses: softprops/action-gh-release@v2.2.2
uses: softprops/action-gh-release@v2.3.2
with:
files: |
dist/*.whl
@ -107,7 +107,7 @@ jobs:
- name: Tar folder
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
- name: Upload release asset
uses: softprops/action-gh-release@v2.2.2
uses: softprops/action-gh-release@v2.3.2
with:
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz
@ -136,6 +136,6 @@ jobs:
- name: Tar folder
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
- name: Upload release asset
uses: softprops/action-gh-release@v2.2.2
uses: softprops/action-gh-release@v2.3.2
with:
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz

View File

@ -0,0 +1,58 @@
name: Restrict task creation
# yamllint disable-line rule:truthy
on:
issues:
types: [opened]
jobs:
check-authorization:
runs-on: ubuntu-latest
# Only run if this is a Task issue type (from the issue form)
if: github.event.issue.issue_type == 'Task'
steps:
- name: Check if user is authorized
uses: actions/github-script@v7
with:
script: |
const issueAuthor = context.payload.issue.user.login;
// Check if user is an organization member
try {
await github.rest.orgs.checkMembershipForUser({
org: 'home-assistant',
username: issueAuthor
});
console.log(`✅ ${issueAuthor} is an organization member`);
return; // Authorized
} catch (error) {
console.log(`❌ ${issueAuthor} is not authorized to create Task issues`);
}
// Close the issue with a comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `Hi @${issueAuthor}, thank you for your contribution!\n\n` +
`Task issues are restricted to Open Home Foundation staff and authorized contributors.\n\n` +
`If you would like to:\n` +
`- Report a bug: Please use the [bug report form](https://github.com/home-assistant/frontend/issues/new?template=bug_report.yml)\n` +
`- Request a feature: Please submit to [Feature Requests](https://github.com/orgs/home-assistant/discussions)\n\n` +
`If you believe you should have access to create Task issues, please contact the maintainers.`
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
state: 'closed'
});
// Add a label to indicate this was auto-closed
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['auto-closed']
});

View File

@ -1,6 +1,7 @@
name: Translations
on:
workflow_dispatch:
push:
branches:
- dev

4
.gitignore vendored
View File

@ -53,3 +53,7 @@ src/cast/dev_const.ts
# test coverage
test/coverage/
# AI tooling
.claude

View File

@ -1 +1 @@
yarn run lint-staged --relative --shell "/bin/bash"
yarn run lint-staged --relative

File diff suppressed because one or more lines are too long

View File

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

1
CLAUDE.md Symbolic link
View File

@ -0,0 +1 @@
.github/copilot-instructions.md

View File

@ -1,5 +1,3 @@
import "@material/mwc-button/mwc-button";
import type { ActionDetail } from "@material/mwc-list/mwc-list";
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
import type { Auth, Connection } from "home-assistant-js-websocket";
@ -20,6 +18,7 @@ import { atLeastVersion } from "../../../../src/common/config/version";
import { toggleAttribute } from "../../../../src/common/dom/toggle_attribute";
import "../../../../src/components/ha-icon";
import "../../../../src/components/ha-list";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-list-item";
import "../../../../src/components/ha-svg-icon";
import {
@ -63,12 +62,20 @@ class HcCast extends LitElement {
<p class="question action-item">
Stay logged in?
<span>
<mwc-button @click=${this._handleSaveTokens}>
<ha-button
appearance="plain"
size="small"
@click=${this._handleSaveTokens}
>
YES
</mwc-button>
<mwc-button @click=${this._handleSkipSaveTokens}>
</ha-button>
<ha-button
appearance="plain"
size="small"
@click=${this._handleSkipSaveTokens}
>
NO
</mwc-button>
</ha-button>
</span>
</p>
`
@ -78,10 +85,10 @@ class HcCast extends LitElement {
: !this.castManager.status
? html`
<p class="center-item">
<mwc-button raised @click=${this._handleLaunch}>
<ha-svg-icon .path=${mdiCast}></ha-svg-icon>
<ha-button @click=${this._handleLaunch}>
<ha-svg-icon slot="start" .path=${mdiCast}></ha-svg-icon>
Start Casting
</mwc-button>
</ha-button>
</p>
`
: html`
@ -121,14 +128,22 @@ class HcCast extends LitElement {
<div class="card-actions">
${this.castManager.status
? html`
<mwc-button @click=${this._handleLaunch}>
<ha-svg-icon .path=${mdiCastConnected}></ha-svg-icon>
<ha-button appearance="plain" @click=${this._handleLaunch}>
<ha-svg-icon
slot="start"
.path=${mdiCastConnected}
></ha-svg-icon>
Manage
</mwc-button>
</ha-button>
`
: ""}
<div class="spacer"></div>
<mwc-button @click=${this._handleLogout}>Log out</mwc-button>
<ha-button
variant="danger"
appearance="plain"
@click=${this._handleLogout}
>Log out</ha-button
>
</div>
</hc-layout>
`;
@ -245,13 +260,6 @@ class HcCast extends LitElement {
color: var(--secondary-text-color);
}
mwc-button ha-svg-icon {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
height: 18px;
}
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;

View File

@ -1,4 +1,3 @@
import "@material/mwc-button";
import { mdiCastConnected, mdiCast } from "@mdi/js";
import type {
Auth,
@ -28,6 +27,7 @@ import "../../../../src/layouts/hass-loading-screen";
import { registerServiceWorker } from "../../../../src/util/register-service-worker";
import "./hc-layout";
import "../../../../src/components/ha-textfield";
import "../../../../src/components/ha-button";
const seeFAQ = (qid) => html`
See <a href="./faq.html${qid ? `#${qid}` : ""}">the FAQ</a> for more
@ -83,11 +83,14 @@ export class HcConnect extends LitElement {
Unable to connect to ${tokens!.hassUrl}.
</div>
<div class="card-actions">
<a href="/">
<mwc-button> Retry </mwc-button>
</a>
<ha-button appearance="plain" href="/">Retry</ha-button>
<div class="spacer"></div>
<mwc-button @click=${this._handleLogout}>Log out</mwc-button>
<ha-button
appearance="plain"
variant="danger"
@click=${this._handleLogout}
>Log out</ha-button
>
</div>
</hc-layout>
`;
@ -128,16 +131,19 @@ export class HcConnect extends LitElement {
${this.error ? html` <p class="error">${this.error}</p> ` : ""}
</div>
<div class="card-actions">
<mwc-button @click=${this._handleDemo}>
<ha-button appearance="plain" @click=${this._handleDemo}>
Show Demo
<ha-svg-icon
slot="end"
.path=${this.castManager.castState === "CONNECTED"
? mdiCastConnected
: mdiCast}
></ha-svg-icon>
</mwc-button>
</ha-button>
<div class="spacer"></div>
<mwc-button @click=${this._handleConnect}>Authorize</mwc-button>
<ha-button appearance="plain" @click=${this._handleConnect}
>Authorize</ha-button
>
</div>
</hc-layout>
`;
@ -309,10 +315,6 @@ export class HcConnect extends LitElement {
color: darkred;
}
mwc-button ha-svg-icon {
margin-left: 8px;
}
.spacer {
flex: 1;
}

View File

@ -11,6 +11,7 @@ import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import { configs as litConfigs } from "eslint-plugin-lit";
import { configs as wcConfigs } from "eslint-plugin-wc";
import { configs as a11yConfigs } from "eslint-plugin-lit-a11y";
const _filename = fileURLToPath(import.meta.url);
const _dirname = path.dirname(_filename);
@ -21,13 +22,14 @@ const compat = new FlatCompat({
});
export default tseslint.config(
...compat.extends("airbnb-base", "plugin:lit-a11y/recommended"),
...compat.extends("airbnb-base"),
eslintConfigPrettier,
litConfigs["flat/all"],
tseslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
wcConfigs["flat/recommended"],
a11yConfigs.recommended,
{
plugins: {
"unused-imports": unusedImports,

View File

@ -1,11 +1,11 @@
import "@material/mwc-button/mwc-button";
import type { Button } from "@material/mwc-button";
import type { TemplateResult } from "lit";
import { html, LitElement, css, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/ha-card";
import "../../../src/components/ha-button";
import type { HaButton } from "../../../src/components/ha-button";
@customElement("demo-black-white-row")
class DemoBlackWhiteRow extends LitElement {
@ -25,12 +25,9 @@ class DemoBlackWhiteRow extends LitElement {
<slot name="light"></slot>
</div>
<div class="card-actions">
<mwc-button
.disabled=${this.disabled}
@click=${this.handleSubmit}
>
<ha-button .disabled=${this.disabled} @click=${this.handleSubmit}>
Submit
</mwc-button>
</ha-button>
</div>
</ha-card>
</div>
@ -40,12 +37,9 @@ class DemoBlackWhiteRow extends LitElement {
<slot name="dark"></slot>
</div>
<div class="card-actions">
<mwc-button
.disabled=${this.disabled}
@click=${this.handleSubmit}
>
<ha-button .disabled=${this.disabled} @click=${this.handleSubmit}>
Submit
</mwc-button>
</ha-button>
</div>
</ha-card>
${this.value
@ -74,7 +68,7 @@ class DemoBlackWhiteRow extends LitElement {
}
handleSubmit(ev) {
const content = (ev.target as Button).closest(".content")!;
const content = (ev.target as HaButton).closest(".content")!;
fireEvent(this, "submitted" as any, {
slot: content.classList.contains("light") ? "light" : "dark",
});

View File

@ -147,13 +147,13 @@ The `title ` option should not be used without a description.
<ha-alert alert-type="success">
This is a success alert — check it out!
<mwc-button slot="action" label="Undo"></mwc-button>
<ha-button slot="action" label="Undo"></ha-button>
</ha-alert>
```html
<ha-alert alert-type="success">
This is a success alert — check it out!
<mwc-button slot="action" label="Undo"></mwc-button>
<ha-button slot="action" label="Undo"></ha-button>
</ha-alert>
```

View File

@ -1,10 +1,10 @@
import "@material/mwc-button/mwc-button";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
import { applyThemesOnElement } from "../../../../src/common/dom/apply_themes_on_element";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-logo-svg";
const alerts: {
@ -78,13 +78,21 @@ const alerts: {
title: "Error with action",
description: "This is a test error alert with action",
type: "error",
actionSlot: html`<mwc-button slot="action" label="restart"></mwc-button>`,
actionSlot: html`<ha-button
size="small"
slot="action"
label="restart"
></ha-button>`,
},
{
title: "Unsaved data",
description: "You have unsaved data",
type: "warning",
actionSlot: html`<mwc-button slot="action" label="save"></mwc-button>`,
actionSlot: html`<ha-button
size="small"
slot="action"
label="save"
></ha-button>`,
},
{
title: "Slotted icon",
@ -108,7 +116,7 @@ const alerts: {
title: "Slotted action",
description: "Alert with slotted action",
type: "info",
actionSlot: html`<mwc-button slot="action" label="action"></mwc-button>`,
actionSlot: html`<ha-button slot="action" label="action"></ha-button>`,
},
{
description: "Dismissable information (RTL)",
@ -120,7 +128,7 @@ const alerts: {
title: "Error with action",
description: "This is a test error alert with action (RTL)",
type: "error",
actionSlot: html`<mwc-button slot="action" label="restart"></mwc-button>`,
actionSlot: html`<ha-button slot="action" label="restart"></ha-button>`,
rtl: true,
},
{
@ -211,7 +219,7 @@ export class DemoHaAlert extends LitElement {
max-height: 24px;
width: 24px;
}
mwc-button {
ha-button {
--mdc-theme-primary: var(--primary-text-color);
}
`;

View File

@ -0,0 +1,66 @@
---
title: Button
---
<style>
.wrapper {
display: flex;
gap: 24px;
}
</style>
# Button `<ha-button>`
## Implementation
### Example Usage
<div class="wrapper">
<ha-button>
simple button
</ha-button>
<ha-button appearance="plain">
plain button
</ha-button>
<ha-button appearance="filled">
filled button
</ha-button>
<ha-button size="small">
small
</ha-button>
</div>
```html
<ha-button> simple button </ha-button>
<ha-button size="small"> small </ha-button>
```
### API
This component is based on the webawesome button component.
Check the [webawesome documentation](https://webawesome.com/docs/components/button/) for more details.
**Slots**
- default slot: Label of the button
` - no default
- `start`: The prefix container (usually for icons).
` - no default
- `end`: The suffix container (usually for icons).
` - no default
**Properties/Attributes**
| Name | Type | Default | Description |
| ----------- | ---------------------------------------------- | -------- | -------------------------------------------------- |
| appearance | "accent"/"filled"/"plain" | "accent" | Sets the button appearance. |
| variants | "brand"/"danger"/"neutral"/"warning"/"success" | "brand" | Sets the button color variant. "brand" is default. |
| size | "small"/"medium" | "medium" | Sets the button size. |
| hideContent | Boolean | false | Hides the button content (for overlays) |
**CSS Custom Properties**
- `--ha-button-height` - Height of the button.
- `--ha-button-radius` - Border radius of the button. Defaults to `var(--wa-border-radius-pill)`.

View File

@ -0,0 +1,171 @@
import { mdiHome } from "@mdi/js";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
import { applyThemesOnElement } from "../../../../src/common/dom/apply_themes_on_element";
import { titleCase } from "../../../../src/common/string/title-case";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-svg-icon";
import { mdiHomeAssistant } from "../../../../src/resources/home-assistant-logo-svg";
const appearances = ["accent", "filled", "plain"];
const variants = ["brand", "danger", "neutral", "warning", "success"];
@customElement("demo-components-ha-button")
export class DemoHaButton extends LitElement {
protected render(): TemplateResult {
return html`
${["light", "dark"].map(
(mode) => html`
<div class=${mode}>
<ha-card header="ha-button in ${mode}">
<div class="card-content">
${variants.map(
(variant) => html`
<div>
${appearances.map(
(appearance) => html`
<ha-button
.appearance=${appearance}
.variant=${variant}
>
<ha-svg-icon
.path=${mdiHomeAssistant}
slot="start"
></ha-svg-icon>
${titleCase(`${variant} ${appearance}`)}
<ha-svg-icon
.path=${mdiHome}
slot="end"
></ha-svg-icon>
</ha-button>
`
)}
</div>
<div>
${appearances.map(
(appearance) => html`
<ha-button
.appearance=${appearance}
.variant=${variant}
size="small"
>
${titleCase(`${variant} ${appearance}`)}
</ha-button>
`
)}
</div>
<div>
${appearances.map(
(appearance) => html`
<ha-button
.appearance=${appearance}
.variant=${variant}
loading
>
<ha-svg-icon
.path=${mdiHomeAssistant}
slot="start"
></ha-svg-icon>
${titleCase(`${variant} ${appearance}`)}
<ha-svg-icon
.path=${mdiHome}
slot="end"
></ha-svg-icon>
</ha-button>
`
)}
</div>
`
)}
${variants.map(
(variant) => html`
<div>
${appearances.map(
(appearance) => html`
<ha-button
.variant=${variant}
.appearance=${appearance}
disabled
>
${titleCase(`${appearance}`)}
</ha-button>
`
)}
</div>
<div>
${appearances.map(
(appearance) => html`
<ha-button
.variant=${variant}
.appearance=${appearance}
size="small"
disabled
>
${titleCase(`${appearance}`)}
</ha-button>
`
)}
</div>
`
)}
</div>
</ha-card>
</div>
`
)}
`;
}
firstUpdated(changedProps) {
super.firstUpdated(changedProps);
applyThemesOnElement(
this.shadowRoot!.querySelector(".dark"),
{
default_theme: "default",
default_dark_theme: "default",
themes: {},
darkMode: true,
theme: "default",
},
undefined,
undefined,
true
);
}
static styles = css`
:host {
display: flex;
justify-content: center;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
.button {
padding: unset;
}
ha-card {
margin: 24px auto;
}
.card-content {
display: flex;
flex-direction: column;
gap: 24px;
}
.card-content div {
display: flex;
gap: 8px;
}
`;
}
declare global {
interface HTMLElementTagNameMap {
"demo-components-ha-button": DemoHaButton;
}
}

View File

@ -135,7 +135,7 @@ export class DemoHaControlSelect extends LitElement {
.options=${options}
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
aria-labelledby=${id}
.label=${label}
?disabled=${config.disabled}
>
</ha-control-select>
@ -156,7 +156,7 @@ export class DemoHaControlSelect extends LitElement {
vertical
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
aria-labelledby=${id}
.label=${label}
?disabled=${config.disabled}
>
</ha-control-select>

View File

@ -97,7 +97,7 @@ export class DemoHaBarSlider extends LitElement {
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
@slider-moved=${this.handleSliderMoved}
aria-labelledby=${id}
.label=${label}
.unit=${config.unit}
>
</ha-control-slider>
@ -119,7 +119,7 @@ export class DemoHaBarSlider extends LitElement {
class=${ifDefined(config.class)}
@value-changed=${this.handleValueChanged}
@slider-moved=${this.handleSliderMoved}
aria-label=${label}
.label=${label}
.unit=${config.unit}
>
</ha-control-slider>

View File

@ -63,7 +63,7 @@ export class DemoHaControlSwitch extends LitElement {
@change=${this.handleValueChanged}
.pathOn=${mdiLightbulb}
.pathOff=${mdiLightbulbOff}
aria-labelledby=${id}
.label=${label}
?disabled=${config.disabled}
?reversed=${config.reversed}
>
@ -84,7 +84,7 @@ export class DemoHaControlSwitch extends LitElement {
vertical
class=${ifDefined(config.class)}
@change=${this.handleValueChanged}
aria-label=${label}
.label=${label}
.pathOn=${mdiGarageOpen}
.pathOff=${mdiGarage}
?disabled=${config.disabled}

View File

@ -1,5 +1,4 @@
/* eslint-disable lit/no-template-arrow */
import "@material/mwc-button";
import type { TemplateResult } from "lit";
import { html, LitElement } from "lit";
import { customElement, state } from "lit/decorators";

View File

@ -0,0 +1,32 @@
---
title: Progress Button
---
<style>
.wrapper {
display: flex;
gap: 24px;
}
</style>
# Progress Button `<ha-progress-button>`
### API
This component is a wrapper around `<ha-button>` that adds support for showing progress
**Slots**
- default slot: Label of the button
` - no default
**Properties/Attributes**
| Name | Type | Default | Description |
| ---------- | ---------------------------------------------- | --------- | -------------------------------------------------- |
| label | string | "accent" | Sets the button label. |
| disabled | Boolean | false | Disables the button if true. |
| progress | Boolean | false | Shows a progress indicator on the button. |
| appearance | "accent"/"filled"/"plain" | "accent" | Sets the button appearance. |
| variants | "brand"/"danger"/"neutral"/"warning"/"success" | "brand" | Sets the button color variant. "brand" is default. |
| iconPath | string | undefined | Sets the icon path for the button. |

View File

@ -0,0 +1,139 @@
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
import { applyThemesOnElement } from "../../../../src/common/dom/apply_themes_on_element";
import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-svg-icon";
import { mdiHomeAssistant } from "../../../../src/resources/home-assistant-logo-svg";
@customElement("demo-components-ha-progress-button")
export class DemoHaProgressButton extends LitElement {
protected render(): TemplateResult {
return html`
${["light", "dark"].map(
(mode) => html`
<div class=${mode}>
<ha-card header="ha-progress-button in ${mode}">
<div class="card-content">
<ha-progress-button @click=${this._clickedSuccess}>
Success
</ha-progress-button>
<ha-progress-button @click=${this._clickedFail}>
Fail
</ha-progress-button>
<ha-progress-button size="small" @click=${this._clickedSuccess}>
small
</ha-progress-button>
<ha-progress-button
appearance="filled"
@click=${this._clickedSuccess}
>
filled
</ha-progress-button>
<ha-progress-button
appearance="plain"
@click=${this._clickedSuccess}
>
plain
</ha-progress-button>
<ha-progress-button
variant="warning"
@click=${this._clickedSuccess}
>
warning
</ha-progress-button>
<ha-progress-button
variant="neutral"
@click=${this._clickedSuccess}
label="with icon"
.iconPath=${mdiHomeAssistant}
>
With Icon
</ha-progress-button>
<ha-progress-button progress @click=${this._clickedSuccess}>
progress
</ha-progress-button>
<ha-progress-button disabled @click=${this._clickedSuccess}>
disabled
</ha-progress-button>
</div>
</ha-card>
</div>
`
)}
`;
}
firstUpdated(changedProps) {
super.firstUpdated(changedProps);
applyThemesOnElement(
this.shadowRoot!.querySelector(".dark"),
{
default_theme: "default",
default_dark_theme: "default",
themes: {},
darkMode: true,
theme: "default",
},
undefined,
undefined,
true
);
}
private async _clickedSuccess(ev: CustomEvent): Promise<void> {
console.log("Clicked success");
const button = ev.currentTarget as any;
button.progress = true;
setTimeout(() => {
button.actionSuccess();
button.progress = false;
}, 1000);
}
private async _clickedFail(ev: CustomEvent): Promise<void> {
const button = ev.currentTarget as any;
button.progress = true;
setTimeout(() => {
button.actionError();
button.progress = false;
}, 1000);
}
static styles = css`
:host {
display: flex;
justify-content: center;
}
.dark,
.light {
display: block;
background-color: var(--primary-background-color);
padding: 0 50px;
}
.button {
padding: unset;
}
ha-card {
margin: 24px auto;
}
.card-content {
display: flex;
flex-direction: column;
gap: 24px;
}
.card-content div {
display: flex;
gap: 8px;
}
`;
}
declare global {
interface HTMLElementTagNameMap {
"demo-components-ha-progress-button": DemoHaProgressButton;
}
}

View File

@ -1,4 +1,3 @@
import "@material/mwc-button";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, state } from "lit/decorators";
@ -416,6 +415,34 @@ const SCHEMAS: {
},
},
},
items: {
name: "Items",
selector: {
object: {
label_field: "name",
description_field: "value",
multiple: true,
fields: {
name: {
label: "Name",
selector: { text: {} },
required: true,
},
value: {
label: "Value",
selector: {
number: {
mode: "slider",
min: 0,
max: 100,
unit_of_measurement: "%",
},
},
},
},
},
},
},
},
},
];

View File

@ -1,7 +1,7 @@
import "@material/mwc-button";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-card";
import type { ActionHandlerEvent } from "../../../../src/data/lovelace/action_handler";
import { actionHandler } from "../../../../src/panels/lovelace/common/directives/action-handler-directive";
@ -13,12 +13,16 @@ export class DemoUtilLongPress extends LitElement {
${[1, 2, 3].map(
() => html`
<ha-card>
<mwc-button
<ha-button
appearance="plain"
@action=${this._handleAction}
.actionHandler=${actionHandler({})}
.actionHandler=${actionHandler({
hasHold: true,
hasDoubleClick: true,
})}
>
(long) press me!
</mwc-button>
</ha-button>
<textarea></textarea>

View File

@ -99,7 +99,8 @@ class HassioAddonNetwork extends LitElement {
: nothing}
<div class="card-actions">
<ha-progress-button
class="warning"
variant="danger"
appearance="plain"
.disabled=${this.disabled}
@click=${this._resetTapped}
>

View File

@ -25,6 +25,7 @@ import type { CSSResultGroup, TemplateResult } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { ifDefined } from "lit/directives/if-defined";
import memoizeOne from "memoize-one";
import { atLeastVersion } from "../../../../src/common/config/version";
import { fireEvent } from "../../../../src/common/dom/fire_event";
@ -187,12 +188,13 @@ class HassioAddonInfo extends LitElement {
"addon.dashboard.protection_mode.content"
)}
<ha-button
variant="danger"
slot="action"
.label=${this.supervisor.localize(
"addon.dashboard.protection_mode.enable"
)}
@click=${this._protectionToggled}
>
${this.supervisor.localize(
"addon.dashboard.protection_mode.enable"
)}
</ha-button>
</ha-alert>
`
@ -692,14 +694,16 @@ class HassioAddonInfo extends LitElement {
? this._computeIsRunning
? html`
<ha-progress-button
class="warning"
variant="danger"
appearance="plain"
@click=${this._stopClicked}
.disabled=${systemManaged && !this.controlEnabled}
>
${this.supervisor.localize("addon.dashboard.stop")}
</ha-progress-button>
<ha-progress-button
class="warning"
variant="danger"
appearance="plain"
@click=${this._restartClicked}
>
${this.supervisor.localize("addon.dashboard.restart")}
@ -709,48 +713,19 @@ class HassioAddonInfo extends LitElement {
<ha-progress-button
@click=${this._startClicked}
.progress=${this.addon.state === "startup"}
appearance="plain"
>
${this.supervisor.localize("addon.dashboard.start")}
</ha-progress-button>
`
: html`
<ha-progress-button
.disabled=${!this.addon.available}
@click=${this._installClicked}
>
${this.supervisor.localize("addon.dashboard.install")}
</ha-progress-button>
`}
: nothing}
</div>
<div>
${this.addon.version
? html` ${this._computeShowWebUI
? html`
<a
href=${this._pathWebui!}
tabindex="-1"
target="_blank"
rel="noopener"
>
<ha-button>
${this.supervisor.localize(
"addon.dashboard.open_web_ui"
)}
</ha-button>
</a>
`
: nothing}
${this._computeShowIngressUI
? html`
<ha-button @click=${this._openIngress}>
${this.supervisor.localize(
"addon.dashboard.open_web_ui"
)}
</ha-button>
`
: nothing}
? html`
<ha-progress-button
class="warning"
variant="danger"
appearance="plain"
@click=${this._uninstallClicked}
.disabled=${systemManaged && !this.controlEnabled}
>
@ -759,14 +734,47 @@ class HassioAddonInfo extends LitElement {
${this.addon.build
? html`
<ha-progress-button
class="warning"
variant="danger"
appearance="plain"
@click=${this._rebuildClicked}
>
${this.supervisor.localize("addon.dashboard.rebuild")}
</ha-progress-button>
`
: nothing}`
: nothing}
: nothing}
${this._computeShowWebUI || this._computeShowIngressUI
? html`
<ha-button
href=${ifDefined(
!this._computeShowIngressUI
? this._pathWebui!
: nothing
)}
target=${ifDefined(
!this._computeShowIngressUI ? "_blank" : nothing
)}
rel=${ifDefined(
!this._computeShowIngressUI ? "noopener" : nothing
)}
@click=${!this._computeShowWebUI
? this._openIngress
: undefined}
>
${this.supervisor.localize(
"addon.dashboard.open_web_ui"
)}
</ha-button>
`
: nothing}
`
: html`
<ha-progress-button
.disabled=${!this.addon.available}
@click=${this._installClicked}
>
${this.supervisor.localize("addon.dashboard.install")}
</ha-progress-button>
`}
</div>
</div>
</ha-card>
@ -1146,15 +1154,17 @@ class HassioAddonInfo extends LitElement {
),
dismissText: this.supervisor.localize("common.cancel"),
});
button.actionError();
button.progress = false;
return;
}
} catch (err: any) {
button.actionError();
button.progress = false;
showAlertDialog(this, {
title: "Failed to validate addon configuration",
text: extractApiErrorMessage(err),
});
button.progress = false;
return;
}
@ -1168,11 +1178,15 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
button.actionError();
button.progress = false;
showAlertDialog(this, {
title: this.supervisor.localize("addon.dashboard.action_error.start"),
text: extractApiErrorMessage(err),
});
return;
}
button.actionSuccess();
button.progress = false;
}
@ -1228,6 +1242,7 @@ class HassioAddonInfo extends LitElement {
path: "uninstall",
};
fireEvent(this, "hass-api-called", eventdata);
button.actionSuccess();
} catch (err: any) {
showAlertDialog(this, {
title: this.supervisor.localize(
@ -1235,6 +1250,7 @@ class HassioAddonInfo extends LitElement {
),
text: extractApiErrorMessage(err),
});
button.actionError();
}
button.progress = false;
}

View File

@ -1,4 +1,3 @@
import "@material/mwc-button";
import type { TemplateResult } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property } from "lit/decorators";

View File

@ -1,4 +1,3 @@
import "@material/mwc-button";
import type { ActionDetail } from "@material/mwc-list";
import { mdiBackupRestore, mdiDelete, mdiDotsVertical, mdiPlus } from "@mdi/js";
@ -17,6 +16,7 @@ import type {
} from "../../../src/components/data-table/ha-data-table";
import "../../../src/components/ha-button-menu";
import "../../../src/components/ha-fab";
import "../../../src/components/ha-button";
import "../../../src/components/ha-icon-button";
import "../../../src/components/ha-list-item";
import "../../../src/components/ha-svg-icon";
@ -241,12 +241,13 @@ export class HassioBackups extends LitElement {
<div class="header-btns">
${!this.narrow
? html`
<mwc-button
<ha-button
appearance="plain"
variant="danger"
@click=${this._deleteSelected}
class="warning"
>
${this.supervisor.localize("backup.delete_selected")}
</mwc-button>
</ha-button>
`
: html`
<ha-icon-button
@ -408,7 +409,7 @@ export class HassioBackups extends LitElement {
margin-inline-end: -12px;
margin-inline-start: initial;
}
.header-btns > mwc-button,
.header-btns > ha-button,
.header-btns > ha-icon-button {
margin: 8px;
}

View File

@ -1,10 +1,9 @@
import "@material/mwc-button";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-card";
import "../../../src/components/ha-button";
import "../../../src/components/ha-settings-row";
import "../../../src/components/ha-svg-icon";
import type { HassioHassOSInfo } from "../../../src/data/hassio/host";
@ -109,10 +108,9 @@ export class HassioUpdate extends LitElement {
</ha-settings-row>
</div>
<div class="card-actions">
<a href="/hassio/update-available/${key}">
<mwc-button .label=${this.supervisor.localize("common.show")}>
</mwc-button>
</a>
<ha-button appearance="plain" href="/hassio/update-available/${key}">
${this.supervisor.localize("common.show")}
</ha-button>
</div>
</ha-card>
`;

View File

@ -1,10 +1,10 @@
import "@material/mwc-button/mwc-button";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import "../../../../src/components/ha-dialog";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-form/ha-form";
import type { SchemaUnion } from "../../../../src/components/ha-form/types";
import { extractApiErrorMessage } from "../../../../src/data/hassio/common";
@ -77,20 +77,21 @@ class HassioBackupLocationDialog extends LitElement {
@value-changed=${this._valueChanged}
dialogInitialFocus
></ha-form>
<mwc-button
<ha-button
appearance="plain"
slot="secondaryAction"
@click=${this.closeDialog}
dialogInitialFocus
>
${this._dialogParams.supervisor.localize("common.cancel")}
</mwc-button>
<mwc-button
</ha-button>
<ha-button
.disabled=${this._waiting || !this._data}
slot="primaryAction"
@click=${this._changeMount}
>
${this._dialogParams.supervisor.localize("common.save")}
</mwc-button>
</ha-button>
</ha-dialog>
`;
}

View File

@ -8,7 +8,6 @@ import { atLeastVersion } from "../../../../src/common/config/version";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import { stopPropagation } from "../../../../src/common/dom/stop_propagation";
import { slugify } from "../../../../src/common/string/slugify";
import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-button-menu";

View File

@ -1,10 +1,9 @@
import "@material/mwc-button";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-spinner";
import { createCloseHeading } from "../../../../src/components/ha-dialog";
import {
@ -69,16 +68,20 @@ class HassioCreateBackupDialog extends LitElement {
${this._error
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
: ""}
<mwc-button slot="secondaryAction" @click=${this.closeDialog}>
<ha-button
appearance="plain"
slot="secondaryAction"
@click=${this.closeDialog}
>
${this._dialogParams.supervisor.localize("common.close")}
</mwc-button>
<mwc-button
</ha-button>
<ha-button
.disabled=${this._creatingBackup}
slot="primaryAction"
@click=${this._createBackup}
>
${this._dialogParams.supervisor.localize("backup.create")}
</mwc-button>
</ha-button>
</ha-dialog>
`;
}

View File

@ -4,6 +4,7 @@ import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import "../../../../src/components/ha-dialog";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-list-item";
import "../../../../src/components/ha-select";
import "../../../../src/components/ha-spinner";
@ -109,17 +110,18 @@ class HassioDatadiskDialog extends LitElement {
"dialog.datadisk_move.no_devices"
)}
<mwc-button
slot="secondaryAction"
<ha-button
appearance="plain"
slot="primaryAction"
@click=${this.closeDialog}
dialogInitialFocus
>
${this.dialogParams.supervisor.localize(
"dialog.datadisk_move.cancel"
)}
</mwc-button>
</ha-button>
<mwc-button
<ha-button
.disabled=${!this.selectedDevice}
slot="primaryAction"
@click=${this._moveDatadisk}
@ -127,7 +129,7 @@ class HassioDatadiskDialog extends LitElement {
${this.dialogParams.supervisor.localize(
"dialog.datadisk_move.move"
)}
</mwc-button>`}
</ha-button>`}
</ha-dialog>
`;
}

View File

@ -1,4 +1,3 @@
import "@material/mwc-button/mwc-button";
import { mdiClose } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
@ -6,6 +5,7 @@ import { customElement, property, state } from "lit/decorators";
import { cache } from "lit/directives/cache";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-dialog";
import "../../../../src/components/ha-expansion-panel";
import "../../../../src/components/ha-formfield";
@ -15,7 +15,6 @@ import "../../../../src/components/ha-list";
import "../../../../src/components/ha-list-item";
import "../../../../src/components/ha-password-field";
import "../../../../src/components/ha-radio";
import "../../../../src/components/ha-spinner";
import "../../../../src/components/ha-textfield";
import type { HaTextField } from "../../../../src/components/ha-textfield";
import { extractApiErrorMessage } from "../../../../src/data/hassio/common";
@ -154,16 +153,16 @@ export class DialogHassioNetwork
)}
</p>`
: ""}
<mwc-button
<ha-button
appearance="plain"
size="small"
class="scan"
@click=${this._scanForAP}
.disabled=${this._scanning}
.loading=${this._scanning}
>
${this._scanning
? html`<ha-spinner aria-label="Scanning" size="small">
</ha-spinner>`
: this.supervisor.localize("dialog.network.scan_ap")}
</mwc-button>
${this.supervisor.localize("dialog.network.scan_ap")}
</ha-button>
${this._accessPoints &&
this._accessPoints.accesspoints &&
this._accessPoints.accesspoints.length !== 0
@ -270,16 +269,16 @@ export class DialogHassioNetwork
: ""}
</div>
<div class="buttons">
<mwc-button
.label=${this.supervisor.localize("common.cancel")}
@click=${this.closeDialog}
<ha-button @click=${this.closeDialog} appearance="plain">
${this.supervisor.localize("common.cancel")}
</ha-button>
<ha-button
@click=${this._updateNetwork}
.disabled=${!this._dirty}
.loading=${this._processing}
>
</mwc-button>
<mwc-button @click=${this._updateNetwork} .disabled=${!this._dirty}>
${this._processing
? html`<ha-spinner size="small"> </ha-spinner>`
: this.supervisor.localize("common.save")}
</mwc-button>
${this.supervisor.localize("common.save")}
</ha-button>
</div>`;
}
@ -584,11 +583,7 @@ export class DialogHassioNetwork
}
}
mwc-button.warning {
--mdc-theme-primary: var(--error-color);
}
mwc-button.scan {
ha-button.scan {
margin-left: 8px;
margin-inline-start: 8px;
margin-inline-end: initial;

View File

@ -1,5 +1,4 @@
import "@material/mwc-button/mwc-button";
import { mdiDelete } from "@mdi/js";
import { mdiDelete, mdiPlus } from "@mdi/js";
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";
@ -7,6 +6,8 @@ import { createCloseHeading } from "../../../../src/components/ha-dialog";
import "../../../../src/components/ha-form/ha-form";
import type { SchemaUnion } from "../../../../src/components/ha-form/types";
import "../../../../src/components/ha-icon-button";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-svg-icon";
import "../../../../src/components/ha-settings-row";
import { extractApiErrorMessage } from "../../../../src/data/hassio/common";
import {
@ -84,16 +85,19 @@ class HassioRegistriesDialog extends LitElement {
dialogInitialFocus
></ha-form>
<div class="action">
<mwc-button
<ha-button
?disabled=${Boolean(
!this._input.registry ||
!this._input.username ||
!this._input.password
)}
@click=${this._addNewRegistry}
appearance="filled"
size="small"
>
<ha-svg-icon slot="start" .path=${mdiPlus}></ha-svg-icon>
${this.supervisor.localize("dialog.registries.add_registry")}
</mwc-button>
</ha-button>
</div>
`
: html`${this._registries?.length
@ -126,11 +130,17 @@ class HassioRegistriesDialog extends LitElement {
</ha-alert>
`}
<div class="action">
<mwc-button @click=${this._addRegistry} dialogInitialFocus>
<ha-button
@click=${this._addRegistry}
dialogInitialFocus
appearance="filled"
size="small"
>
<ha-svg-icon slot="start" .path=${mdiPlus}></ha-svg-icon>
${this.supervisor.localize(
"dialog.registries.add_new_registry"
)}
</mwc-button>
</ha-button>
</div> `}
</ha-dialog>
`;

View File

@ -1,5 +1,4 @@
import "@material/mwc-button/mwc-button";
import { mdiDelete, mdiDeleteOff } from "@mdi/js";
import { mdiDelete, mdiDeleteOff, mdiPlus } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
@ -7,8 +6,9 @@ import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import { caseInsensitiveStringCompare } from "../../../../src/common/string/compare";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-button";
import "../../../../src/components/ha-tooltip";
import "../../../../src/components/ha-spinner";
import "../../../../src/components/ha-svg-icon";
import { createCloseHeading } from "../../../../src/components/ha-dialog";
import "../../../../src/components/ha-icon-button";
import type {
@ -159,18 +159,22 @@ class HassioRepositoriesDialog extends LitElement {
@keydown=${this._handleKeyAdd}
dialogInitialFocus
></ha-textfield>
<mwc-button @click=${this._addRepository}>
${this._processing
? html`<ha-spinner size="small"></ha-spinner>`
: this._dialogParams!.supervisor.localize(
"dialog.repositories.add"
)}
</mwc-button>
<ha-button
.loading=${this._processing}
@click=${this._addRepository}
appearance="filled"
size="small"
>
<ha-svg-icon slot="start" .path=${mdiPlus}></ha-svg-icon>
${this._dialogParams!.supervisor.localize(
"dialog.repositories.add"
)}
</ha-button>
</div>
</div>
<mwc-button slot="primaryAction" @click=${this.closeDialog}>
<ha-button slot="primaryAction" @click=${this.closeDialog}>
${this._dialogParams?.supervisor.localize("common.close")}
</mwc-button>
</ha-button>
</ha-dialog>
`;
}
@ -191,16 +195,11 @@ class HassioRepositoriesDialog extends LitElement {
border-radius: 4px;
margin-top: 4px;
}
mwc-button {
ha-button {
margin-left: 8px;
margin-inline-start: 8px;
margin-inline-end: initial;
}
ha-spinner {
display: block;
margin: 32px;
text-align: center;
}
div.delete ha-icon-button {
color: var(--error-color);
}
@ -249,6 +248,8 @@ class HassioRepositoriesDialog extends LitElement {
await addStoreRepository(this.hass, input.value);
await this._loadData();
fireEvent(this, "supervisor-collection-refresh", { collection: "store" });
input.value = "";
} catch (err: any) {
this._error = extractApiErrorMessage(err);
@ -261,6 +262,8 @@ class HassioRepositoriesDialog extends LitElement {
try {
await removeStoreRepository(this.hass, slug);
await this._loadData();
fireEvent(this, "supervisor-collection-refresh", { collection: "store" });
} catch (err: any) {
this._error = extractApiErrorMessage(err);
}

View File

@ -1,10 +1,9 @@
import "@material/mwc-button";
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";
import { atLeastVersion } from "../../../src/common/config/version";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-button";
import "../../../src/components/ha-button-menu";
import "../../../src/components/ha-card";
import "../../../src/components/ha-settings-row";
@ -70,12 +69,12 @@ class HassioCoreInfo extends LitElement {
${!atLeastVersion(this.hass.config.version, 2021, 12) &&
this.supervisor.core.update_available
? html`
<a href="/hassio/update-available/core">
<mwc-button
.label=${this.supervisor.localize("common.show")}
>
</mwc-button>
</a>
<ha-button
appearance="plain"
href="/hassio/update-available/core"
>
${this.supervisor.localize("common.show")}
</ha-button>
`
: ""}
</ha-settings-row>
@ -95,7 +94,7 @@ class HassioCoreInfo extends LitElement {
<div class="card-actions">
<ha-progress-button
slot="primaryAction"
class="warning"
variant="danger"
@click=${this._coreRestart}
.title=${this.supervisor.localize("common.restart_name", {
name: "Core",
@ -188,11 +187,6 @@ class HassioCoreInfo extends LitElement {
white-space: normal;
color: var(--secondary-text-color);
}
.warning {
--mdc-theme-primary: var(--error-color);
}
ha-button-menu {
color: var(--secondary-text-color);
--mdc-menu-min-width: 200px;

View File

@ -1,5 +1,3 @@
import "@material/mwc-button";
import { mdiDotsVertical } from "@mdi/js";
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
@ -8,10 +6,11 @@ import memoizeOne from "memoize-one";
import { atLeastVersion } from "../../../src/common/config/version";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-button";
import "../../../src/components/ha-button-menu";
import "../../../src/components/ha-card";
import "../../../src/components/ha-list-item";
import "../../../src/components/ha-icon-button";
import "../../../src/components/ha-list-item";
import "../../../src/components/ha-settings-row";
import {
extractApiErrorMessage,
@ -77,24 +76,28 @@ class HassioHostInfo extends LitElement {
<span slot="description">
${this.supervisor.host.hostname}
</span>
<mwc-button
.label=${this.supervisor.localize("system.host.change")}
<ha-button
@click=${this._changeHostnameClicked}
appearance="plain"
size="small"
>
</mwc-button>
${this.supervisor.localize("system.host.change")}
</ha-button>
</ha-settings-row>`
: ""}
${this.supervisor.host.features.includes("network")
? html` <ha-settings-row>
? html`<ha-settings-row>
<span slot="heading">
${this.supervisor.localize("system.host.ip_address")}
</span>
<span slot="description"> ${primaryIpAddress} </span>
<mwc-button
.label=${this.supervisor.localize("system.host.change")}
<ha-button
@click=${this._changeNetworkClicked}
appearance="plain"
size="small"
>
</mwc-button>
${this.supervisor.localize("system.host.change")}
</ha-button>
</ha-settings-row>`
: ""}
@ -108,12 +111,13 @@ class HassioHostInfo extends LitElement {
${!atLeastVersion(this.hass.config.version, 2021, 12) &&
this.supervisor.os.update_available
? html`
<a href="/hassio/update-available/os">
<mwc-button
.label=${this.supervisor.localize("common.show")}
>
</mwc-button>
</a>
<ha-button
appearance="plain"
size="small"
href="/hassio/update-available/os"
>
${this.supervisor.localize("common.show")}
</ha-button>
`
: ""}
</ha-settings-row>
@ -167,7 +171,7 @@ class HassioHostInfo extends LitElement {
<div class="card-actions">
${this.supervisor.host.features.includes("reboot")
? html`
<ha-progress-button class="warning" @click=${this._hostReboot}>
<ha-progress-button variant="danger" @click=${this._hostReboot}>
${this.supervisor.localize("system.host.reboot_host")}
</ha-progress-button>
`
@ -175,7 +179,7 @@ class HassioHostInfo extends LitElement {
${this.supervisor.host.features.includes("shutdown")
? html`
<ha-progress-button
class="warning"
variant="danger"
@click=${this._hostShutdown}
>
${this.supervisor.localize("system.host.shutdown_host")}
@ -431,10 +435,6 @@ class HassioHostInfo extends LitElement {
color: var(--secondary-text-color);
}
.warning {
--mdc-theme-primary: var(--error-color);
}
ha-button-menu {
color: var(--secondary-text-color);
--mdc-menu-min-width: 200px;

View File

@ -5,6 +5,7 @@ import { atLeastVersion } from "../../../src/common/config/version";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-alert";
import "../../../src/components/ha-button";
import "../../../src/components/ha-card";
import "../../../src/components/ha-settings-row";
import "../../../src/components/ha-switch";
@ -80,12 +81,13 @@ class HassioSupervisorInfo extends LitElement {
${!atLeastVersion(this.hass.config.version, 2021, 12) &&
this.supervisor.supervisor.update_available
? html`
<a href="/hassio/update-available/supervisor">
<mwc-button
.label=${this.supervisor.localize("common.show")}
>
</mwc-button>
</a>
<ha-button
appearance="plain"
size="small"
href="/hassio/update-available/supervisor"
>
${this.supervisor.localize("common.show")}
</ha-button>
`
: ""}
</ha-settings-row>
@ -156,24 +158,28 @@ class HassioSupervisorInfo extends LitElement {
${this.supervisor.localize(
"system.supervisor.unsupported_title"
)}
<mwc-button
<ha-button
slot="action"
.label=${this.supervisor.localize("common.learn_more")}
@click=${this._unsupportedDialog}
variant="warning"
size="small"
>
</mwc-button>
${this.supervisor.localize("common.learn_more")}
</ha-button>
</ha-alert>`}
${!this.supervisor.supervisor.healthy
? html`<ha-alert alert-type="error">
${this.supervisor.localize(
"system.supervisor.unhealthy_title"
)}
<mwc-button
<ha-button
variant="danger"
size="small"
slot="action"
.label=${this.supervisor.localize("common.learn_more")}
@click=${this._unhealthyDialog}
>
</mwc-button>
${this.supervisor.localize("common.learn_more")}
</ha-button>
</ha-alert>`
: ""}
</div>
@ -448,9 +454,6 @@ class HassioSupervisorInfo extends LitElement {
white-space: normal;
color: var(--secondary-text-color);
}
ha-alert mwc-button {
--mdc-theme-primary: var(--primary-text-color);
}
a {
text-decoration: none;
}

View File

@ -1,5 +1,3 @@
import "@material/mwc-button";
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";

View File

@ -64,7 +64,7 @@ class LandingPageLogs extends LitElement {
protected render() {
return html`
<div class="actions">
<ha-button @click=${this._toggleLogDetails}>
<ha-button appearance="plain" @click=${this._toggleLogDetails}>
${this.localize(this._show ? "hide_details" : "show_details")}
</ha-button>
${this._show
@ -81,7 +81,11 @@ class LandingPageLogs extends LitElement {
alert-type="error"
.title=${this.localize("logs.fetch_error")}
>
<ha-button @click=${this._startLogStream}>
<ha-button
size="small"
variant="danger"
@click=${this._startLogStream}
>
${this.localize("logs.retry")}
</ha-button>
</ha-alert>

View File

@ -67,6 +67,7 @@ class LandingPageNetwork extends LitElement {
${ALTERNATIVE_DNS_SERVERS.map(
({ translationKey }, key) =>
html`<ha-button
size="small"
.index=${key}
.disabled=${!dnsPrimaryInterfaceNameservers}
@click=${this._setDns}

View File

@ -26,15 +26,16 @@
"license": "Apache-2.0",
"type": "module",
"dependencies": {
"@babel/runtime": "7.27.1",
"@awesome.me/webawesome": "3.0.0-beta.3",
"@babel/runtime": "7.28.2",
"@braintree/sanitize-url": "7.1.1",
"@codemirror/autocomplete": "6.18.6",
"@codemirror/commands": "6.8.1",
"@codemirror/language": "6.11.0",
"@codemirror/language": "6.11.2",
"@codemirror/legacy-modes": "6.5.1",
"@codemirror/search": "6.5.11",
"@codemirror/state": "6.5.2",
"@codemirror/view": "6.36.8",
"@codemirror/view": "6.38.1",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.18.0",
"@formatjs/intl-displaynames": "6.8.11",
@ -45,18 +46,18 @@
"@formatjs/intl-numberformat": "8.15.4",
"@formatjs/intl-pluralrules": "5.4.4",
"@formatjs/intl-relativetimeformat": "11.4.11",
"@fullcalendar/core": "6.1.17",
"@fullcalendar/daygrid": "6.1.17",
"@fullcalendar/interaction": "6.1.17",
"@fullcalendar/list": "6.1.17",
"@fullcalendar/luxon3": "6.1.17",
"@fullcalendar/timegrid": "6.1.17",
"@fullcalendar/core": "6.1.18",
"@fullcalendar/daygrid": "6.1.18",
"@fullcalendar/interaction": "6.1.18",
"@fullcalendar/list": "6.1.18",
"@fullcalendar/luxon3": "6.1.18",
"@fullcalendar/timegrid": "6.1.18",
"@lezer/highlight": "1.2.1",
"@lit-labs/motion": "1.0.8",
"@lit-labs/observers": "2.0.5",
"@lit-labs/virtualizer": "2.1.0",
"@lit/context": "1.1.5",
"@lit/reactive-element": "2.1.0",
"@lit-labs/motion": "1.0.9",
"@lit-labs/observers": "2.0.6",
"@lit-labs/virtualizer": "2.1.1",
"@lit/context": "1.1.6",
"@lit/reactive-element": "2.1.1",
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
"@material/mwc-base": "0.27.0",
@ -89,18 +90,19 @@
"@thomasloven/round-slider": "0.6.0",
"@tsparticles/engine": "3.8.1",
"@tsparticles/preset-links": "3.2.0",
"@vaadin/combo-box": "24.7.7",
"@vaadin/vaadin-themable-mixin": "24.7.7",
"@vaadin/combo-box": "24.7.9",
"@vaadin/vaadin-themable-mixin": "24.7.9",
"@vibrant/color": "4.0.0",
"@vue/web-component-wrapper": "1.3.0",
"@webcomponents/scoped-custom-element-registry": "0.0.10",
"@webcomponents/webcomponentsjs": "2.8.0",
"app-datepicker": "5.1.1",
"barcode-detector": "3.0.4",
"barcode-detector": "3.0.5",
"color-name": "2.0.0",
"comlink": "4.4.2",
"core-js": "3.42.0",
"core-js": "3.44.0",
"cropperjs": "1.6.2",
"culori": "4.0.2",
"date-fns": "4.1.0",
"date-fns-tz": "3.2.0",
"deep-clone-simple": "1.1.1",
@ -111,7 +113,7 @@
"fuse.js": "7.1.0",
"google-timezones-json": "1.2.0",
"gulp-zopfli-green": "6.0.2",
"hls.js": "1.6.2",
"hls.js": "1.6.7",
"home-assistant-js-websocket": "9.5.0",
"idb-keyval": "6.2.2",
"intl-messageformat": "10.7.16",
@ -119,10 +121,10 @@
"leaflet": "1.9.4",
"leaflet-draw": "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch",
"leaflet.markercluster": "1.5.3",
"lit": "3.3.0",
"lit-html": "3.3.0",
"luxon": "3.6.1",
"marked": "15.0.12",
"lit": "3.3.1",
"lit-html": "3.3.1",
"luxon": "3.7.1",
"marked": "16.1.1",
"memoize-one": "6.0.0",
"node-vibrant": "4.0.3",
"object-hash": "3.0.0",
@ -135,8 +137,7 @@
"stacktrace-js": "2.0.2",
"superstruct": "2.0.2",
"tinykeys": "3.0.0",
"ua-parser-js": "2.0.3",
"vis-data": "7.1.9",
"ua-parser-js": "2.0.4",
"vue": "2.7.16",
"vue2-daterange-picker": "0.6.8",
"weekstart": "2.0.0",
@ -149,26 +150,26 @@
"xss": "1.0.15"
},
"devDependencies": {
"@babel/core": "7.27.1",
"@babel/helper-define-polyfill-provider": "0.6.4",
"@babel/plugin-transform-runtime": "7.27.1",
"@babel/preset-env": "7.27.2",
"@bundle-stats/plugin-webpack-filter": "4.20.1",
"@lokalise/node-api": "14.7.0",
"@babel/core": "7.28.0",
"@babel/helper-define-polyfill-provider": "0.6.5",
"@babel/plugin-transform-runtime": "7.28.0",
"@babel/preset-env": "7.28.0",
"@bundle-stats/plugin-webpack-filter": "4.21.1",
"@lokalise/node-api": "15.0.0",
"@octokit/auth-oauth-device": "8.0.1",
"@octokit/plugin-retry": "8.0.1",
"@octokit/rest": "21.1.1",
"@rsdoctor/rspack-plugin": "1.1.2",
"@rspack/cli": "1.3.11",
"@rspack/core": "1.3.11",
"@octokit/rest": "22.0.0",
"@rsdoctor/rspack-plugin": "1.1.10",
"@rspack/cli": "1.4.10",
"@rspack/core": "1.4.10",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "6.0.21",
"@types/chromecast-caf-receiver": "6.0.22",
"@types/chromecast-caf-sender": "1.0.11",
"@types/color-name": "2.0.0",
"@types/glob": "8.1.0",
"@types/culori": "4.0.0",
"@types/html-minifier-terser": "7.0.2",
"@types/js-yaml": "4.0.9",
"@types/leaflet": "1.9.18",
"@types/leaflet": "1.9.20",
"@types/leaflet-draw": "1.0.12",
"@types/leaflet.markercluster": "1.5.5",
"@types/lodash.merge": "4.6.9",
@ -179,62 +180,63 @@
"@types/tar": "6.1.13",
"@types/ua-parser-js": "0.7.39",
"@types/webspeechapi": "0.0.29",
"@vitest/coverage-v8": "3.1.4",
"@vitest/coverage-v8": "3.2.4",
"babel-loader": "10.0.0",
"babel-plugin-template-html-minifier": "4.1.0",
"browserslist-useragent-regexp": "4.1.3",
"del": "8.0.0",
"eslint": "9.27.0",
"eslint": "9.32.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "10.1.5",
"eslint-config-prettier": "10.1.8",
"eslint-import-resolver-webpack": "0.13.10",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-lit": "2.1.1",
"eslint-plugin-lit-a11y": "4.1.4",
"eslint-plugin-lit-a11y": "5.1.1",
"eslint-plugin-unused-imports": "4.1.4",
"eslint-plugin-wc": "3.0.1",
"fancy-log": "2.0.0",
"fs-extra": "11.3.0",
"glob": "11.0.2",
"gulp": "5.0.0",
"glob": "11.0.3",
"gulp": "5.0.1",
"gulp-brotli": "3.0.0",
"gulp-json-transform": "0.5.0",
"gulp-rename": "2.0.0",
"gulp-rename": "2.1.0",
"html-minifier-terser": "7.2.0",
"husky": "9.1.7",
"jsdom": "26.1.0",
"jszip": "3.10.1",
"lint-staged": "15.5.2",
"lint-staged": "16.1.2",
"lit-analyzer": "2.0.3",
"lodash.merge": "4.6.2",
"lodash.template": "4.5.0",
"map-stream": "0.0.7",
"pinst": "3.0.0",
"prettier": "3.5.3",
"prettier": "3.6.2",
"rspack-manifest-plugin": "5.0.3",
"serve": "14.2.4",
"sinon": "20.0.0",
"sinon": "21.0.0",
"tar": "7.4.3",
"terser-webpack-plugin": "5.3.14",
"ts-lit-plugin": "2.0.2",
"typescript": "5.8.3",
"typescript-eslint": "8.32.1",
"typescript-eslint": "8.38.0",
"vite-tsconfig-paths": "5.1.4",
"vitest": "3.1.4",
"vitest": "3.2.4",
"webpack-stats-plugin": "1.1.3",
"webpackbar": "7.0.0",
"workbox-build": "patch:workbox-build@npm%3A7.1.1#~/.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch"
},
"resolutions": {
"@material/mwc-button@^0.25.3": "^0.27.0",
"lit": "3.3.0",
"lit-html": "3.3.0",
"lit": "3.3.1",
"lit-html": "3.3.1",
"clean-css": "5.3.3",
"@lit/reactive-element": "2.1.0",
"@fullcalendar/daygrid": "6.1.17",
"globals": "16.1.0",
"@lit/reactive-element": "2.1.1",
"@fullcalendar/daygrid": "6.1.18",
"globals": "16.3.0",
"tslib": "2.8.1",
"@material/mwc-list@^0.27.0": "patch:@material/mwc-list@npm%3A0.27.0#~/.yarn/patches/@material-mwc-list-npm-0.27.0-5344fc9de4.patch"
"@material/mwc-list@^0.27.0": "patch:@material/mwc-list@npm%3A0.27.0#~/.yarn/patches/@material-mwc-list-npm-0.27.0-5344fc9de4.patch",
"@vaadin/vaadin-themable-mixin": "24.7.9"
},
"packageManager": "yarn@4.9.1"
"packageManager": "yarn@4.9.2"
}

View File

@ -0,0 +1,32 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3969_57097)">
<path d="M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V4C20 6.20914 18.2091 8 16 8H4C1.79086 8 0 6.20914 0 4V4Z" fill="white" fill-opacity="0.48"/>
<path d="M0 20C0 15.5817 3.58172 12 8 12H68C72.4183 12 76 15.5817 76 20V36C76 40.4183 72.4183 44 68 44H8C3.58172 44 0 40.4183 0 36V20Z" fill="#1C1C1C"/>
<path d="M8 12.5H68C72.1421 12.5 75.5 15.8579 75.5 20V36C75.5 40.1421 72.1421 43.5 68 43.5H8C3.85786 43.5 0.5 40.1421 0.5 36V20C0.5 15.8579 3.85786 12.5 8 12.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M32.9844 27.0156C32.9844 26.0781 32.7031 25.2656 32.1406 24.5781C31.5781 23.8594 30.8594 23.375 29.9844 23.125V22C29.9844 21.4375 30.125 20.9375 30.4062 20.5C30.6875 20.0312 31.0469 19.6719 31.4844 19.4219C31.9531 19.1406 32.4531 19 32.9844 19H43.0156C43.5469 19 44.0312 19.1406 44.4688 19.4219C44.9375 19.6719 45.3125 20.0312 45.5938 20.5C45.875 20.9375 46.0156 21.4375 46.0156 22V23.125C45.1406 23.375 44.4219 23.8594 43.8594 24.5781C43.2969 25.2656 43.0156 26.0781 43.0156 27.0156V28.9844H32.9844V27.0156ZM47 25C47.5625 25 48.0312 25.2031 48.4062 25.6094C48.8125 25.9844 49.0156 26.4531 49.0156 27.0156V31.9844C49.0156 32.5469 48.875 33.0625 48.5938 33.5312C48.3125 33.9688 47.9375 34.3281 47.4688 34.6094C47.0312 34.8594 46.5469 34.9844 46.0156 34.9844V36.0156C46.0156 36.2656 45.9062 36.5 45.6875 36.7188C45.5 36.9062 45.2656 37 44.9844 37C44.7344 37 44.5 36.9062 44.2812 36.7188C44.0938 36.5 44 36.2656 44 36.0156V34.9844H32V36.0156C32 36.2656 31.8906 36.5 31.6719 36.7188C31.4844 36.9062 31.2656 37 31.0156 37C30.7344 37 30.4844 36.9062 30.2656 36.7188C30.0781 36.5 29.9844 36.2656 29.9844 36.0156V34.9844C29.4531 34.9844 28.9531 34.8594 28.4844 34.6094C28.0469 34.3281 27.6875 33.9688 27.4062 33.5312C27.125 33.0625 26.9844 32.5469 26.9844 31.9844V27.0156C26.9844 26.4531 27.1719 25.9844 27.5469 25.6094C27.9531 25.2031 28.4375 25 29 25C29.5625 25 30.0312 25.2031 30.4062 25.6094C30.8125 25.9844 31.0156 26.4531 31.0156 27.0156V31H44.9844V27.0156C44.9844 26.4531 45.1719 25.9844 45.5469 25.6094C45.9531 25.2031 46.4375 25 47 25Z" fill="#03A9F4"/>
<path d="M0 56C0 51.5817 3.58172 48 8 48H68C72.4183 48 76 51.5817 76 56V72C76 76.4183 72.4183 80 68 80H8C3.58172 80 0 76.4183 0 72V56Z" fill="#1C1C1C"/>
<path d="M8 48.5H68C72.1421 48.5 75.5 51.8579 75.5 56V72C75.5 76.1421 72.1421 79.5 68 79.5H8C3.85786 79.5 0.5 76.1421 0.5 72V56C0.5 51.8579 3.85786 48.5 8 48.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M44 61.9844H47.9844V64H46.0156V72.0156H29.9844V64H28.0156V61.9844H32C31.4375 61.9844 30.9531 61.7969 30.5469 61.4219C30.1719 61.0156 29.9844 60.5469 29.9844 60.0156V55.9844H35.9844V60.0156C35.9844 60.5469 35.7812 61.0156 35.375 61.4219C35 61.7969 34.5469 61.9844 34.0156 61.9844H41.9844V58.9844C41.9844 58.7344 41.8906 58.5156 41.7031 58.3281C41.5156 58.1094 41.2812 58 41 58C40.7188 58 40.4844 58.1094 40.2969 58.3281C40.1094 58.5156 40.0156 58.7344 40.0156 58.9844H38C38 58.4531 38.125 57.9688 38.375 57.5312C38.6562 57.0625 39.0156 56.6875 39.4531 56.4062C39.9219 56.125 40.4375 55.9844 41 55.9844C41.5625 55.9844 42.0625 56.125 42.5 56.4062C42.9688 56.6875 43.3281 57.0625 43.5781 57.5312C43.8594 57.9688 44 58.4531 44 58.9844V61.9844ZM38.9844 70V64H37.0156V70H38.9844Z" fill="#03A9F4"/>
<path d="M0 92C0 87.5817 3.58172 84 8 84H68C72.4183 84 76 87.5817 76 92V108C76 112.418 72.4183 116 68 116H8C3.58172 116 0 112.418 0 108V92Z" fill="#1C1C1C"/>
<path d="M8 84.5H68C72.1421 84.5 75.5 87.8579 75.5 92V108C75.5 112.142 72.1421 115.5 68 115.5H8C3.85786 115.5 0.5 112.142 0.5 108V92C0.5 87.8579 3.85786 84.5 8 84.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M44.9844 94.9844C46.0781 94.9844 47.0156 95.3906 47.7969 96.2031C48.6094 96.9844 49.0156 97.9219 49.0156 99.0156V108.016H47V105.016H29V108.016H26.9844V93.0156H29V102.016H37.0156V94.9844H44.9844ZM35.0938 100.094C34.5 100.688 33.7969 100.984 32.9844 100.984C32.1719 100.984 31.4688 100.688 30.875 100.094C30.2812 99.5 29.9844 98.7969 29.9844 97.9844C29.9844 97.1719 30.2812 96.4688 30.875 95.875C31.4688 95.2812 32.1719 94.9844 32.9844 94.9844C33.7969 94.9844 34.5 95.2812 35.0938 95.875C35.6875 96.4688 35.9844 97.1719 35.9844 97.9844C35.9844 98.7969 35.6875 99.5 35.0938 100.094Z" fill="#03A9F4"/>
<path d="M0 128C0 123.582 3.58172 120 8 120H68C72.4183 120 76 123.582 76 128V144C76 148.418 72.4183 152 68 152H8C3.58172 152 0 148.418 0 144V128Z" fill="#1C1C1C"/>
<path d="M8 120.5H68C72.1421 120.5 75.5 123.858 75.5 128V144C75.5 148.142 72.1421 151.5 68 151.5H8C3.85786 151.5 0.5 148.142 0.5 144V128C0.5 123.858 3.85786 120.5 8 120.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M46.0156 136.984H47.9844V142.984C47.9844 143.516 47.7812 143.984 47.375 144.391C47 144.797 46.5469 145 46.0156 145C46.0156 145.281 45.9062 145.516 45.6875 145.703C45.5 145.891 45.2656 145.984 44.9844 145.984H31.0156C30.7344 145.984 30.4844 145.891 30.2656 145.703C30.0781 145.516 29.9844 145.281 29.9844 145C29.4531 145 28.9844 144.797 28.5781 144.391C28.2031 143.984 28.0156 143.516 28.0156 142.984V136.984H31.0156V136.234C31.0156 135.641 31.2344 135.125 31.6719 134.688C32.1406 134.219 32.6719 133.984 33.2656 133.984C33.8906 133.984 34.4531 134.234 34.9531 134.734L36.3125 136.281C36.5 136.5 36.7812 136.734 37.1562 136.984H44V128.828C44 128.609 43.9219 128.422 43.7656 128.266C43.6094 128.078 43.4062 127.984 43.1562 127.984C42.9375 127.984 42.75 128.062 42.5938 128.219L41.3281 129.484C41.3906 129.734 41.4219 129.906 41.4219 130C41.4219 130.344 41.3125 130.703 41.0938 131.078L38.3281 128.312C38.7031 128.094 39.0625 127.984 39.4062 127.984C39.5625 127.984 39.7344 128.016 39.9219 128.078L41.1875 126.812C41.7188 126.281 42.375 126.016 43.1562 126.016C43.9375 126.016 44.6094 126.297 45.1719 126.859C45.7344 127.391 46.0156 128.047 46.0156 128.828V136.984ZM31.5781 132.438C31.2031 132.031 31.0156 131.547 31.0156 130.984C31.0156 130.422 31.2031 129.953 31.5781 129.578C31.9531 129.203 32.4219 129.016 32.9844 129.016C33.5469 129.016 34.0156 129.203 34.3906 129.578C34.7969 129.953 35 130.422 35 130.984C35 131.547 34.7969 132.031 34.3906 132.438C34.0156 132.812 33.5469 133 32.9844 133C32.4219 133 31.9531 132.812 31.5781 132.438Z" fill="#03A9F4"/>
<path d="M84 4C84 1.79086 85.7909 0 88 0H100C102.209 0 104 1.79086 104 4V4C104 6.20914 102.209 8 100 8H88C85.7909 8 84 6.20914 84 4V4Z" fill="white" fill-opacity="0.48"/>
<path d="M84 20C84 15.5817 87.5817 12 92 12H152C156.418 12 160 15.5817 160 20V36C160 40.4183 156.418 44 152 44H92C87.5817 44 84 40.4183 84 36V20Z" fill="#1C1C1C"/>
<path d="M92 12.5H152C156.142 12.5 159.5 15.8579 159.5 20V36C159.5 40.1421 156.142 43.5 152 43.5H92C87.8579 43.5 84.5 40.1421 84.5 36V20C84.5 15.8579 87.8579 12.5 92 12.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M131.984 30.0156C131.984 30.7656 131.797 31.4531 131.422 32.0781C131.047 32.6719 130.562 33.1406 129.969 33.4844C129.844 34.2031 129.5 34.8125 128.938 35.3125C128.406 35.7812 127.766 36.0156 127.016 36.0156C126.359 36.0156 125.766 35.8281 125.234 35.4531C124.734 35.0781 124.391 34.5938 124.203 34H119.797C119.609 34.5938 119.25 35.0781 118.719 35.4531C118.219 35.8281 117.641 36.0156 116.984 36.0156C116.234 36.0156 115.578 35.7812 115.016 35.3125C114.484 34.8125 114.156 34.2031 114.031 33.4844C113.438 33.1406 112.953 32.6719 112.578 32.0781C112.203 31.4531 112.016 30.7656 112.016 30.0156C112.016 29.1094 112.266 28.3125 112.766 27.625C113.297 26.9375 113.969 26.4688 114.781 26.2188L113 24.3906L112.719 24.7188C112.5 24.9062 112.25 25 111.969 25C111.719 25 111.5 24.9062 111.312 24.7188C111.094 24.5312 110.984 24.2969 110.984 24.0156C110.984 23.7344 111.094 23.5 111.312 23.3125L113.281 21.2969C113.469 21.1094 113.703 21.0156 113.984 21.0156C114.266 21.0156 114.5 21.1094 114.688 21.2969C114.906 21.4844 115.016 21.7188 115.016 22C115.016 22.2812 114.906 22.5156 114.688 22.7031L114.406 22.9844L115.812 24.3906L116.609 22.0469C116.797 21.4219 117.156 20.9219 117.688 20.5469C118.219 20.1719 118.797 19.9844 119.422 19.9844H124.578C125.203 19.9844 125.781 20.1719 126.312 20.5469C126.844 20.9219 127.203 21.4219 127.391 22.0469L128.75 26.0781C129.375 26.2031 129.922 26.4531 130.391 26.8281C130.891 27.2031 131.281 27.6719 131.562 28.2344C131.844 28.7656 131.984 29.3594 131.984 30.0156ZM116.984 34C117.266 34 117.5 33.9062 117.688 33.7188C117.906 33.5 118.016 33.2656 118.016 33.0156C118.016 32.7344 117.906 32.5 117.688 32.3125C117.5 32.0938 117.266 31.9844 116.984 31.9844C116.734 31.9844 116.5 32.0938 116.281 32.3125C116.094 32.5 116 32.7344 116 33.0156C116 33.2656 116.094 33.5 116.281 33.7188C116.5 33.9062 116.734 34 116.984 34ZM121.016 25.9844V22H119.422C118.953 22 118.641 22.2344 118.484 22.7031L117.406 25.9844H121.016ZM122.984 22V25.9844H126.594L125.516 22.7031C125.359 22.2344 125.047 22 124.578 22H122.984ZM127.016 34C127.266 34 127.484 33.9062 127.672 33.7188C127.891 33.5 128 33.2656 128 33.0156C128 32.7344 127.891 32.5 127.672 32.3125C127.484 32.0938 127.266 31.9844 127.016 31.9844C126.734 31.9844 126.484 32.0938 126.266 32.3125C126.078 32.5 125.984 32.7344 125.984 33.0156C125.984 33.2656 126.078 33.5 126.266 33.7188C126.484 33.9062 126.734 34 127.016 34Z" fill="#03A9F4"/>
<path d="M84 56C84 51.5817 87.5817 48 92 48H152C156.418 48 160 51.5817 160 56V72C160 76.4183 156.418 80 152 80H92C87.5817 80 84 76.4183 84 72V56Z" fill="#1C1C1C"/>
<path d="M92 48.5H152C156.142 48.5 159.5 51.8579 159.5 56V72C159.5 76.1421 156.142 79.5 152 79.5H92C87.8579 79.5 84.5 76.1421 84.5 72V56C84.5 51.8579 87.8579 48.5 92 48.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M128.984 58.9844C130.078 58.9844 131.016 59.3906 131.797 60.2031C132.609 60.9844 133.016 61.9219 133.016 63.0156V72.0156H131V69.0156H113V72.0156H110.984V57.0156H113V66.0156H121.016V58.9844H128.984ZM119.094 64.0938C118.5 64.6875 117.797 64.9844 116.984 64.9844C116.172 64.9844 115.469 64.6875 114.875 64.0938C114.281 63.5 113.984 62.7969 113.984 61.9844C113.984 61.1719 114.281 60.4688 114.875 59.875C115.469 59.2812 116.172 58.9844 116.984 58.9844C117.797 58.9844 118.5 59.2812 119.094 59.875C119.688 60.4688 119.984 61.1719 119.984 61.9844C119.984 62.7969 119.688 63.5 119.094 64.0938Z" fill="#03A9F4"/>
<path d="M84 92C84 87.5817 87.5817 84 92 84H152C156.418 84 160 87.5817 160 92V108C160 112.418 156.418 116 152 116H92C87.5817 116 84 112.418 84 108V92Z" fill="#1C1C1C"/>
<path d="M92 84.5H152C156.142 84.5 159.5 87.8579 159.5 92V108C159.5 112.142 156.142 115.5 152 115.5H92C87.8579 115.5 84.5 112.142 84.5 108V92C84.5 87.8579 87.8579 84.5 92 84.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M112.016 94H131.984V106H130.016V103.984H125.984V106H124.016V96.0156H113.984V106H112.016V94ZM130.016 96.0156H125.984V97.9844H130.016V96.0156ZM125.984 102.016H130.016V100H125.984V102.016Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_3969_57097">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,63 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5534)">
<path d="M0 8C0 3.58172 3.58172 0 8 0H42.6667C47.0849 0 50.6667 3.58172 50.6667 8V64C50.6667 68.4183 47.0849 72 42.6667 72H8.00001C3.58173 72 0 68.4183 0 64V8Z" fill="#1C1C1C"/>
<path d="M8 0.5H42.667C46.809 0.500178 50.167 3.85798 50.167 8V64C50.167 68.142 46.809 71.4998 42.667 71.5H8C3.85787 71.5 0.5 68.1421 0.5 64V8C0.5 3.85786 3.85786 0.5 8 0.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M8 12C8 9.79086 9.79086 8 12 8H38.6667C40.8758 8 42.6667 9.79086 42.6667 12V12C42.6667 14.2091 40.8758 16 38.6667 16H12C9.79086 16 8 14.2091 8 12V12Z" fill="white" fill-opacity="0.48"/>
<path d="M8 27C8 25.3431 9.34315 24 11 24H27.6667C29.3235 24 30.6667 25.3431 30.6667 27V29C30.6667 30.6569 29.3235 32 27.6667 32H11C9.34314 32 8 30.6569 8 29V27Z" fill="white" fill-opacity="0.24"/>
<path d="M34.6667 28C34.6667 25.7909 36.4575 24 38.6667 24V24C40.8758 24 42.6667 25.7909 42.6667 28V28C42.6667 30.2091 40.8758 32 38.6667 32V32C36.4575 32 34.6667 30.2091 34.6667 28V28Z" fill="white" fill-opacity="0.24"/>
<path d="M8 43C8 41.3431 9.34315 40 11 40H27.6667C29.3235 40 30.6667 41.3431 30.6667 43V45C30.6667 46.6569 29.3235 48 27.6667 48H11C9.34314 48 8 46.6569 8 45V43Z" fill="white" fill-opacity="0.24"/>
<path d="M34.6667 44C34.6667 41.7909 36.4575 40 38.6667 40V40C40.8758 40 42.6667 41.7909 42.6667 44V44C42.6667 46.2091 40.8758 48 38.6667 48V48C36.4575 48 34.6667 46.2091 34.6667 44V44Z" fill="white" fill-opacity="0.24"/>
<path d="M8 59C8 57.3431 9.34315 56 11 56H27.6667C29.3235 56 30.6667 57.3431 30.6667 59V61C30.6667 62.6569 29.3235 64 27.6667 64H11C9.34314 64 8 62.6569 8 61V59Z" fill="white" fill-opacity="0.24"/>
<path d="M34.6667 60C34.6667 57.7909 36.4575 56 38.6667 56V56C40.8758 56 42.6667 57.7909 42.6667 60V60C42.6667 62.2091 40.8758 64 38.6667 64V64C36.4575 64 34.6667 62.2091 34.6667 60V60Z" fill="white" fill-opacity="0.24"/>
<path d="M0 84C0 79.5817 3.58172 76 8 76H42.6667C47.0849 76 50.6667 79.5817 50.6667 84V124C50.6667 128.418 47.0849 132 42.6667 132H8.00001C3.58173 132 0 128.418 0 124V84Z" fill="#1C1C1C"/>
<path d="M8 76.5H42.667C46.809 76.5002 50.167 79.858 50.167 84V124C50.167 128.142 46.809 131.5 42.667 131.5H8C3.85787 131.5 0.5 128.142 0.5 124V84C0.5 79.8579 3.85786 76.5 8 76.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M8 88C8 85.7909 9.79086 84 12 84H38.6667C40.8758 84 42.6667 85.7909 42.6667 88V88C42.6667 90.2091 40.8758 92 38.6667 92H12C9.79086 92 8 90.2091 8 88V88Z" fill="white" fill-opacity="0.48"/>
<path d="M8 103C8 101.343 9.34315 100 11 100H27.6667C29.3235 100 30.6667 101.343 30.6667 103V105C30.6667 106.657 29.3235 108 27.6667 108H11C9.34314 108 8 106.657 8 105V103Z" fill="white" fill-opacity="0.24"/>
<path d="M34.6667 104C34.6667 101.791 36.4575 100 38.6667 100V100C40.8758 100 42.6667 101.791 42.6667 104V104C42.6667 106.209 40.8758 108 38.6667 108V108C36.4575 108 34.6667 106.209 34.6667 104V104Z" fill="white" fill-opacity="0.24"/>
<path d="M8 119C8 117.343 9.34315 116 11 116H27.6667C29.3235 116 30.6667 117.343 30.6667 119V121C30.6667 122.657 29.3235 124 27.6667 124H11C9.34314 124 8 122.657 8 121V119Z" fill="white" fill-opacity="0.24"/>
<path d="M34.6667 120C34.6667 117.791 36.4575 116 38.6667 116V116C40.8758 116 42.6667 117.791 42.6667 120V120C42.6667 122.209 40.8758 124 38.6667 124V124C36.4575 124 34.6667 122.209 34.6667 120V120Z" fill="white" fill-opacity="0.24"/>
<path d="M0 144C0 139.582 3.58172 136 8 136H42.6667C47.0849 136 50.6667 139.582 50.6667 144V152C50.6667 156.418 47.0849 160 42.6667 160H8.00001C3.58173 160 0 156.418 0 152V144Z" fill="#1C1C1C"/>
<path d="M8 136.5H42.667C46.809 136.5 50.167 139.858 50.167 144V152C50.167 156.142 46.809 159.5 42.667 159.5H8C3.85787 159.5 0.5 156.142 0.5 152V144C0.5 139.858 3.85786 136.5 8 136.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M8 148C8 145.791 9.79086 144 12 144H38.6667C40.8758 144 42.6667 145.791 42.6667 148V148C42.6667 150.209 40.8758 152 38.6667 152H12C9.79086 152 8 150.209 8 148V148Z" fill="white" fill-opacity="0.48"/>
<path d="M54.6667 8C54.6667 3.58172 58.2484 0 62.6667 0H97.3333C101.752 0 105.333 3.58172 105.333 8V48C105.333 52.4183 101.752 56 97.3334 56H62.6667C58.2484 56 54.6667 52.4183 54.6667 48V8Z" fill="#1C1C1C"/>
<path d="M62.6667 0.5H97.3337C101.476 0.50018 104.834 3.85798 104.834 8V48C104.834 52.142 101.476 55.4998 97.3337 55.5H62.6667C58.5246 55.5 55.1667 52.1421 55.1667 48V8C55.1667 3.85786 58.5246 0.5 62.6667 0.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M62.6667 12C62.6667 9.79086 64.4575 8 66.6667 8H93.3334C95.5425 8 97.3334 9.79086 97.3334 12V12C97.3334 14.2091 95.5425 16 93.3334 16H66.6667C64.4576 16 62.6667 14.2091 62.6667 12V12Z" fill="white" fill-opacity="0.48"/>
<path d="M62.6667 27C62.6667 25.3431 64.0098 24 65.6667 24H82.3334C83.9902 24 85.3334 25.3431 85.3334 27V29C85.3334 30.6569 83.9902 32 82.3334 32H65.6667C64.0098 32 62.6667 30.6569 62.6667 29V27Z" fill="white" fill-opacity="0.24"/>
<path d="M89.3333 28C89.3333 25.7909 91.1242 24 93.3333 24V24C95.5425 24 97.3333 25.7909 97.3333 28V28C97.3333 30.2091 95.5425 32 93.3333 32V32C91.1242 32 89.3333 30.2091 89.3333 28V28Z" fill="white" fill-opacity="0.24"/>
<path d="M62.6667 43C62.6667 41.3431 64.0098 40 65.6667 40H82.3334C83.9902 40 85.3334 41.3431 85.3334 43V45C85.3334 46.6569 83.9902 48 82.3334 48H65.6667C64.0098 48 62.6667 46.6569 62.6667 45V43Z" fill="white" fill-opacity="0.24"/>
<path d="M89.3333 44C89.3333 41.7909 91.1242 40 93.3333 40V40C95.5425 40 97.3333 41.7909 97.3333 44V44C97.3333 46.2091 95.5425 48 93.3333 48V48C91.1242 48 89.3333 46.2091 89.3333 44V44Z" fill="white" fill-opacity="0.24"/>
<path d="M54.6667 68C54.6667 63.5817 58.2484 60 62.6667 60H97.3333C101.752 60 105.333 63.5817 105.333 68V76C105.333 80.4183 101.752 84 97.3334 84H62.6667C58.2484 84 54.6667 80.4183 54.6667 76V68Z" fill="#1C1C1C"/>
<path d="M62.6667 60.5H97.3337C101.476 60.5002 104.834 63.858 104.834 68V76C104.834 80.142 101.476 83.4998 97.3337 83.5H62.6667C58.5246 83.5 55.1667 80.1421 55.1667 76V68C55.1667 63.8579 58.5246 60.5 62.6667 60.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M62.6667 72C62.6667 69.7909 64.4575 68 66.6667 68H93.3334C95.5425 68 97.3334 69.7909 97.3334 72V72C97.3334 74.2091 95.5425 76 93.3334 76H66.6667C64.4576 76 62.6667 74.2091 62.6667 72V72Z" fill="white" fill-opacity="0.48"/>
<path d="M54.6667 96C54.6667 91.5817 58.2484 88 62.6667 88H97.3333C101.752 88 105.333 91.5817 105.333 96V136C105.333 140.418 101.752 144 97.3334 144H62.6667C58.2484 144 54.6667 140.418 54.6667 136V96Z" fill="#1C1C1C"/>
<path d="M62.6667 88.5H97.3337C101.476 88.5002 104.834 91.858 104.834 96V136C104.834 140.142 101.476 143.5 97.3337 143.5H62.6667C58.5246 143.5 55.1667 140.142 55.1667 136V96C55.1667 91.8579 58.5246 88.5 62.6667 88.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M62.6667 100C62.6667 97.7909 64.4575 96 66.6667 96H93.3334C95.5425 96 97.3334 97.7909 97.3334 100V100C97.3334 102.209 95.5425 104 93.3334 104H66.6667C64.4576 104 62.6667 102.209 62.6667 100V100Z" fill="white" fill-opacity="0.48"/>
<path d="M62.6667 115C62.6667 113.343 64.0098 112 65.6667 112H82.3334C83.9902 112 85.3334 113.343 85.3334 115V117C85.3334 118.657 83.9902 120 82.3334 120H65.6667C64.0098 120 62.6667 118.657 62.6667 117V115Z" fill="white" fill-opacity="0.24"/>
<path d="M89.3333 116C89.3333 113.791 91.1242 112 93.3333 112V112C95.5425 112 97.3333 113.791 97.3333 116V116C97.3333 118.209 95.5425 120 93.3333 120V120C91.1242 120 89.3333 118.209 89.3333 116V116Z" fill="white" fill-opacity="0.24"/>
<path d="M62.6667 131C62.6667 129.343 64.0098 128 65.6667 128H82.3334C83.9902 128 85.3334 129.343 85.3334 131V133C85.3334 134.657 83.9902 136 82.3334 136H65.6667C64.0098 136 62.6667 134.657 62.6667 133V131Z" fill="white" fill-opacity="0.24"/>
<path d="M89.3333 132C89.3333 129.791 91.1242 128 93.3333 128V128C95.5425 128 97.3333 129.791 97.3333 132V132C97.3333 134.209 95.5425 136 93.3333 136V136C91.1242 136 89.3333 134.209 89.3333 132V132Z" fill="white" fill-opacity="0.24"/>
<path d="M109.333 8C109.333 3.58172 112.915 0 117.333 0H152C156.418 0 160 3.58172 160 8V112C160 116.418 156.418 120 152 120H117.333C112.915 120 109.333 116.418 109.333 112V8Z" fill="#1C1C1C"/>
<path d="M117.333 0.5H152C156.142 0.50018 159.5 3.85798 159.5 8V112C159.5 116.142 156.142 119.5 152 119.5H117.333C113.191 119.5 109.833 116.142 109.833 112V8C109.833 3.85786 113.191 0.5 117.333 0.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M117.333 12C117.333 9.79086 119.124 8 121.333 8H148C150.209 8 152 9.79086 152 12V12C152 14.2091 150.209 16 148 16H121.333C119.124 16 117.333 14.2091 117.333 12V12Z" fill="white" fill-opacity="0.48"/>
<path d="M117.333 27C117.333 25.3431 118.676 24 120.333 24H137C138.657 24 140 25.3431 140 27V29C140 30.6569 138.657 32 137 32H120.333C118.676 32 117.333 30.6569 117.333 29V27Z" fill="white" fill-opacity="0.24"/>
<path d="M144 28C144 25.7909 145.791 24 148 24V24C150.209 24 152 25.7909 152 28V28C152 30.2091 150.209 32 148 32V32C145.791 32 144 30.2091 144 28V28Z" fill="white" fill-opacity="0.24"/>
<path d="M117.333 43C117.333 41.3431 118.676 40 120.333 40H137C138.657 40 140 41.3431 140 43V45C140 46.6569 138.657 48 137 48H120.333C118.676 48 117.333 46.6569 117.333 45V43Z" fill="white" fill-opacity="0.24"/>
<path d="M144 44C144 41.7909 145.791 40 148 40V40C150.209 40 152 41.7909 152 44V44C152 46.2091 150.209 48 148 48V48C145.791 48 144 46.2091 144 44V44Z" fill="white" fill-opacity="0.24"/>
<path d="M117.333 59C117.333 57.3431 118.676 56 120.333 56H137C138.657 56 140 57.3431 140 59V61C140 62.6569 138.657 64 137 64H120.333C118.676 64 117.333 62.6569 117.333 61V59Z" fill="white" fill-opacity="0.24"/>
<path d="M144 60C144 57.7909 145.791 56 148 56V56C150.209 56 152 57.7909 152 60V60C152 62.2091 150.209 64 148 64V64C145.791 64 144 62.2091 144 60V60Z" fill="white" fill-opacity="0.24"/>
<path d="M117.333 75C117.333 73.3431 118.676 72 120.333 72H137C138.657 72 140 73.3431 140 75V77C140 78.6569 138.657 80 137 80H120.333C118.676 80 117.333 78.6569 117.333 77V75Z" fill="white" fill-opacity="0.24"/>
<path d="M144 76C144 73.7909 145.791 72 148 72V72C150.209 72 152 73.7909 152 76V76C152 78.2091 150.209 80 148 80V80C145.791 80 144 78.2091 144 76V76Z" fill="white" fill-opacity="0.24"/>
<path d="M117.333 91C117.333 89.3431 118.676 88 120.333 88H137C138.657 88 140 89.3431 140 91V93C140 94.6569 138.657 96 137 96H120.333C118.676 96 117.333 94.6569 117.333 93V91Z" fill="white" fill-opacity="0.24"/>
<path d="M144 92C144 89.7909 145.791 88 148 88V88C150.209 88 152 89.7909 152 92V92C152 94.2091 150.209 96 148 96V96C145.791 96 144 94.2091 144 92V92Z" fill="white" fill-opacity="0.24"/>
<path d="M117.333 107C117.333 105.343 118.676 104 120.333 104H137C138.657 104 140 105.343 140 107V109C140 110.657 138.657 112 137 112H120.333C118.676 112 117.333 110.657 117.333 109V107Z" fill="white" fill-opacity="0.24"/>
<path d="M144 108C144 105.791 145.791 104 148 104V104C150.209 104 152 105.791 152 108V108C152 110.209 150.209 112 148 112V112C145.791 112 144 110.209 144 108V108Z" fill="white" fill-opacity="0.24"/>
<path d="M109.333 132C109.333 127.582 112.915 124 117.333 124H152C156.418 124 160 127.582 160 132V140C160 144.418 156.418 148 152 148H117.333C112.915 148 109.333 144.418 109.333 140V132Z" fill="#1C1C1C"/>
<path d="M117.333 124.5H152C156.142 124.5 159.5 127.858 159.5 132V140C159.5 144.142 156.142 147.5 152 147.5H117.333C113.191 147.5 109.833 144.142 109.833 140V132C109.833 127.858 113.191 124.5 117.333 124.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M117.333 136C117.333 133.791 119.124 132 121.333 132H148C150.209 132 152 133.791 152 136V136C152 138.209 150.209 140 148 140H121.333C119.124 140 117.333 138.209 117.333 136V136Z" fill="white" fill-opacity="0.48"/>
</g>
<defs>
<clipPath id="clip0_1738_5534">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,16 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5540)">
<path d="M0 8C0 3.58172 3.58172 0 8 0H152C156.418 0 160 3.58172 160 8V152C160 156.418 156.418 160 152 160H8C3.58172 160 0 156.418 0 152V8Z" fill="#1C1C1C"/>
<path d="M8 0.5H152C156.142 0.500001 159.5 3.85787 159.5 8V152C159.5 156.142 156.142 159.5 152 159.5H8C3.85787 159.5 0.5 156.142 0.5 152V8C0.500001 3.85787 3.85787 0.5 8 0.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M83 86.9844V75.125L77 73.0156V84.875L83 86.9844ZM88.4844 71C88.8281 71 89 71.1719 89 71.5156V86.6094C89 86.8594 88.875 87.0156 88.625 87.0781L83 89L77 86.8906L71.6562 88.9531L71.5156 89C71.1719 89 71 88.8281 71 88.4844V73.3906C71 73.1406 71.125 72.9844 71.375 72.9219L77 71L83 73.1094L88.3438 71.0469L88.4844 71Z" fill="#03A9F4"/>
<path d="M148 77.0508L139.288 85.8983M139.288 85.8983L116.852 108.684C115.724 109.83 114.184 110.475 112.576 110.475H81.6939M139.288 85.8983V69.4322M21.1957 82.9492H12M21.1957 82.9492L32.3274 71.6441M21.1957 82.9492L44.427 106.542M81.6939 110.475V124.237M81.6939 110.475H54.5907M81.6939 138V124.237M81.6939 124.237H148M32.3274 71.6441L43.4591 60.339L54.5907 49.0339L70.4941 32.8828C74.2533 29.0651 79.3871 26.9153 84.7451 26.9153H128.641V26.9153C134.521 26.9153 139.288 31.6824 139.288 37.5629V37.7288V49.0339M32.3274 71.6441L24.8569 64.0572C22.5573 61.7218 22.5573 57.9732 24.8569 55.6377L57.9786 22M139.288 49.0339H126.313C124.706 49.0339 123.166 48.389 122.038 47.2436L116.057 41.1695M139.288 49.0339V69.4322M139.288 69.4322H126.313C124.706 69.4322 123.166 68.7873 122.038 67.6419L116.057 61.5678M54.5907 110.475V110.475C54.5907 107.488 52.17 105.068 49.184 105.068H49.0249C45.951 105.068 43.4591 107.56 43.4591 110.634V110.807C43.4591 113.881 45.951 116.373 49.0249 116.373V116.373C52.0988 116.373 54.5907 113.881 54.5907 110.807V110.475ZM44.427 115.39L22.1637 138" stroke="white" stroke-opacity="0.24" stroke-width="5" stroke-linecap="round"/>
<circle cx="41" cy="39" r="14" fill="white" fill-opacity="0.48"/>
<circle cx="89" cy="117" r="14" fill="white" fill-opacity="0.48"/>
<path d="M116 62.325C115.767 62.325 115.533 62.2833 115.3 62.2C115.067 62.1167 114.858 61.9917 114.675 61.825C113.592 60.825 112.633 59.85 111.8 58.9C110.967 57.95 110.267 57.0333 109.7 56.15C109.15 55.25 108.725 54.3917 108.425 53.575C108.142 52.7417 108 51.95 108 51.2C108 48.7 108.8 46.7083 110.4 45.225C112.017 43.7417 113.883 43 116 43C118.117 43 119.975 43.7417 121.575 45.225C123.192 46.7083 124 48.7 124 51.2C124 51.95 123.85 52.7417 123.55 53.575C123.267 54.3917 122.842 55.25 122.275 56.15C121.725 57.0333 121.033 57.95 120.2 58.9C119.367 59.85 118.408 60.825 117.325 61.825C117.142 61.9917 116.933 62.1167 116.7 62.2C116.467 62.2833 116.233 62.325 116 62.325Z" fill="white" fill-opacity="0.48"/>
</g>
<defs>
<clipPath id="clip0_1738_5540">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,13 @@
<svg width="160" height="72" viewBox="0 0 160 72" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5536)">
<path d="M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V4C32 6.20914 30.2091 8 28 8H4C1.79086 8 0 6.20914 0 4V4Z" fill="white" fill-opacity="0.48"/>
<path d="M0 20C0 15.5817 3.58172 12 8 12H42.6667C47.0849 12 50.6667 15.5817 50.6667 20V64C50.6667 68.4183 47.0849 72 42.6667 72H8.00001C3.58173 72 0 68.4183 0 64V20Z" fill="#1C1C1C"/>
<path d="M8 12.5H42.667C46.809 12.5002 50.167 15.858 50.167 20V64C50.167 68.142 46.809 71.4998 42.667 71.5H8C3.85787 71.5 0.5 68.1421 0.5 64V20L0.509766 19.6143C0.710536 15.6514 3.98724 12.5 8 12.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M32.3177 42.9844H26.3177V48.9844H24.349V42.9844H18.349V41.0156H24.349V35.0156H26.3177V41.0156H32.3177V42.9844Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_1738_5536">
<rect width="160" height="72" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 973 B

View File

@ -0,0 +1,19 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5538)">
<path d="M0 8C0 3.58172 3.58172 0 8 0H152C156.418 0 160 3.58172 160 8V152C160 156.418 156.418 160 152 160H8C3.58172 160 0 156.418 0 152V8Z" fill="#1C1C1C"/>
<path d="M8 0.5H152C156.142 0.500001 159.5 3.85787 159.5 8V152C159.5 156.142 156.142 159.5 152 159.5H8C3.85787 159.5 0.5 156.142 0.5 152V8C0.500001 3.85787 3.85787 0.5 8 0.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M8 13.5C8 10.4624 10.4624 8 13.5 8H146.5C149.538 8 152 10.4624 152 13.5V13.5C152 16.5376 149.538 19 146.5 19H13.5C10.4624 19 8 16.5376 8 13.5V13.5Z" fill="white" fill-opacity="0.48"/>
<path d="M8 35C8 30.5817 11.5817 27 16 27H45.3333C49.7516 27 53.3333 30.5817 53.3333 35V125C53.3333 129.418 49.7516 133 45.3333 133H16C11.5817 133 8 129.418 8 125V35Z" fill="#1C1C1C"/>
<path d="M16 27.5H45.333C49.4751 27.5 52.833 30.8579 52.833 35V125C52.833 129.142 49.4751 132.5 45.333 132.5H16C11.8579 132.5 8.5 129.142 8.5 125V35C8.5 30.8579 11.8579 27.5 16 27.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M57.3333 35C57.3333 30.5817 60.9151 27 65.3333 27H94.6667C99.0849 27 102.667 30.5817 102.667 35V49C102.667 53.4183 99.0849 57 94.6667 57H65.3333C60.915 57 57.3333 53.4183 57.3333 49V35Z" fill="#1C1C1C"/>
<path d="M65.3333 27.5H94.6663C98.8085 27.5 102.166 30.8579 102.166 35V49C102.166 53.1421 98.8085 56.5 94.6663 56.5H65.3333C61.1912 56.5 57.8333 53.1421 57.8333 49V35C57.8333 30.8579 61.1912 27.5 65.3333 27.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M106.667 35C106.667 30.5817 110.248 27 114.667 27H144C148.418 27 152 30.5817 152 35V87C152 91.4183 148.418 95 144 95H114.667C110.248 95 106.667 91.4183 106.667 87V35Z" fill="#1C1C1C"/>
<path d="M114.667 27.5H144C148.142 27.5 151.5 30.8579 151.5 35V87C151.5 91.1421 148.142 94.5 144 94.5H114.667C110.525 94.5 107.167 91.1421 107.167 87V35C107.167 30.8579 110.525 27.5 114.667 27.5Z" stroke="white" stroke-opacity="0.24"/>
<path d="M84.3594 82.0156H87.7344C87.9219 81.1406 88.0156 80.4688 88.0156 80C88.0156 79.5312 87.9219 78.8594 87.7344 77.9844H84.3594C84.4531 78.6406 84.5 79.3125 84.5 80C84.5 80.6875 84.4531 81.3594 84.3594 82.0156ZM82.5781 87.5469C83.3594 87.2969 84.1719 86.8281 85.0156 86.1406C85.8594 85.4219 86.5 84.7031 86.9375 83.9844H83.9844C83.6719 85.2344 83.2031 86.4219 82.5781 87.5469ZM82.3438 82.0156C82.4375 81.3594 82.4844 80.6875 82.4844 80C82.4844 79.3125 82.4375 78.6406 82.3438 77.9844H77.6562C77.5625 78.6406 77.5156 79.3125 77.5156 80C77.5156 80.6875 77.5625 81.3594 77.6562 82.0156H82.3438ZM80 87.9688C80.875 86.6875 81.5156 85.3594 81.9219 83.9844H78.0781C78.4844 85.3594 79.125 86.6875 80 87.9688ZM76.0156 76.0156C76.3906 74.6719 76.8594 73.4844 77.4219 72.4531C76.6406 72.7031 75.8125 73.1875 74.9375 73.9062C74.0938 74.5938 73.4688 75.2969 73.0625 76.0156H76.0156ZM73.0625 83.9844C73.4688 84.7031 74.0938 85.4219 74.9375 86.1406C75.8125 86.8281 76.6406 87.2969 77.4219 87.5469C76.7969 86.4219 76.3281 85.2344 76.0156 83.9844H73.0625ZM72.2656 82.0156H75.6406C75.5469 81.3594 75.5 80.6875 75.5 80C75.5 79.3125 75.5469 78.6406 75.6406 77.9844H72.2656C72.0781 78.8594 71.9844 79.5312 71.9844 80C71.9844 80.4688 72.0781 81.1406 72.2656 82.0156ZM80 72.0312C79.125 73.3125 78.4844 74.6406 78.0781 76.0156H81.9219C81.5156 74.6406 80.875 73.3125 80 72.0312ZM86.9375 76.0156C86.5 75.2969 85.8594 74.5938 85.0156 73.9062C84.1719 73.1875 83.3594 72.7031 82.5781 72.4531C83.1406 73.4844 83.6094 74.6719 83.9844 76.0156H86.9375ZM72.9219 72.9688C74.8906 71 77.25 70.0156 80 70.0156C82.75 70.0156 85.0938 71 87.0312 72.9688C89 74.9062 89.9844 77.25 89.9844 80C89.9844 82.75 89 85.1094 87.0312 87.0781C85.0938 89.0156 82.75 89.9844 80 89.9844C77.25 89.9844 74.8906 89.0156 72.9219 87.0781C70.9844 85.1094 70.0156 82.75 70.0156 80C70.0156 77.25 70.9844 74.9062 72.9219 72.9688Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_1738_5538">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,32 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3969_50764)">
<path d="M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V4C20 6.20914 18.2091 8 16 8H4C1.79086 8 0 6.20914 0 4V4Z" fill="black" fill-opacity="0.32"/>
<path d="M0 20C0 15.5817 3.58172 12 8 12H68C72.4183 12 76 15.5817 76 20V36C76 40.4183 72.4183 44 68 44H8C3.58172 44 0 40.4183 0 36V20Z" fill="white"/>
<path d="M8 12.5H68C72.1421 12.5 75.5 15.8579 75.5 20V36C75.5 40.1421 72.1421 43.5 68 43.5H8C3.85786 43.5 0.5 40.1421 0.5 36V20C0.5 15.8579 3.85786 12.5 8 12.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M32.9844 27.0156C32.9844 26.0781 32.7031 25.2656 32.1406 24.5781C31.5781 23.8594 30.8594 23.375 29.9844 23.125V22C29.9844 21.4375 30.125 20.9375 30.4062 20.5C30.6875 20.0312 31.0469 19.6719 31.4844 19.4219C31.9531 19.1406 32.4531 19 32.9844 19H43.0156C43.5469 19 44.0312 19.1406 44.4688 19.4219C44.9375 19.6719 45.3125 20.0312 45.5938 20.5C45.875 20.9375 46.0156 21.4375 46.0156 22V23.125C45.1406 23.375 44.4219 23.8594 43.8594 24.5781C43.2969 25.2656 43.0156 26.0781 43.0156 27.0156V28.9844H32.9844V27.0156ZM47 25C47.5625 25 48.0312 25.2031 48.4062 25.6094C48.8125 25.9844 49.0156 26.4531 49.0156 27.0156V31.9844C49.0156 32.5469 48.875 33.0625 48.5938 33.5312C48.3125 33.9688 47.9375 34.3281 47.4688 34.6094C47.0312 34.8594 46.5469 34.9844 46.0156 34.9844V36.0156C46.0156 36.2656 45.9062 36.5 45.6875 36.7188C45.5 36.9062 45.2656 37 44.9844 37C44.7344 37 44.5 36.9062 44.2812 36.7188C44.0938 36.5 44 36.2656 44 36.0156V34.9844H32V36.0156C32 36.2656 31.8906 36.5 31.6719 36.7188C31.4844 36.9062 31.2656 37 31.0156 37C30.7344 37 30.4844 36.9062 30.2656 36.7188C30.0781 36.5 29.9844 36.2656 29.9844 36.0156V34.9844C29.4531 34.9844 28.9531 34.8594 28.4844 34.6094C28.0469 34.3281 27.6875 33.9688 27.4062 33.5312C27.125 33.0625 26.9844 32.5469 26.9844 31.9844V27.0156C26.9844 26.4531 27.1719 25.9844 27.5469 25.6094C27.9531 25.2031 28.4375 25 29 25C29.5625 25 30.0312 25.2031 30.4062 25.6094C30.8125 25.9844 31.0156 26.4531 31.0156 27.0156V31H44.9844V27.0156C44.9844 26.4531 45.1719 25.9844 45.5469 25.6094C45.9531 25.2031 46.4375 25 47 25Z" fill="#03A9F4"/>
<path d="M0 56C0 51.5817 3.58172 48 8 48H68C72.4183 48 76 51.5817 76 56V72C76 76.4183 72.4183 80 68 80H8C3.58172 80 0 76.4183 0 72V56Z" fill="white"/>
<path d="M8 48.5H68C72.1421 48.5 75.5 51.8579 75.5 56V72C75.5 76.1421 72.1421 79.5 68 79.5H8C3.85786 79.5 0.5 76.1421 0.5 72V56C0.5 51.8579 3.85786 48.5 8 48.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M44 61.9844H47.9844V64H46.0156V72.0156H29.9844V64H28.0156V61.9844H32C31.4375 61.9844 30.9531 61.7969 30.5469 61.4219C30.1719 61.0156 29.9844 60.5469 29.9844 60.0156V55.9844H35.9844V60.0156C35.9844 60.5469 35.7812 61.0156 35.375 61.4219C35 61.7969 34.5469 61.9844 34.0156 61.9844H41.9844V58.9844C41.9844 58.7344 41.8906 58.5156 41.7031 58.3281C41.5156 58.1094 41.2812 58 41 58C40.7188 58 40.4844 58.1094 40.2969 58.3281C40.1094 58.5156 40.0156 58.7344 40.0156 58.9844H38C38 58.4531 38.125 57.9688 38.375 57.5312C38.6562 57.0625 39.0156 56.6875 39.4531 56.4062C39.9219 56.125 40.4375 55.9844 41 55.9844C41.5625 55.9844 42.0625 56.125 42.5 56.4062C42.9688 56.6875 43.3281 57.0625 43.5781 57.5312C43.8594 57.9688 44 58.4531 44 58.9844V61.9844ZM38.9844 70V64H37.0156V70H38.9844Z" fill="#03A9F4"/>
<path d="M0 92C0 87.5817 3.58172 84 8 84H68C72.4183 84 76 87.5817 76 92V108C76 112.418 72.4183 116 68 116H8C3.58172 116 0 112.418 0 108V92Z" fill="white"/>
<path d="M8 84.5H68C72.1421 84.5 75.5 87.8579 75.5 92V108C75.5 112.142 72.1421 115.5 68 115.5H8C3.85786 115.5 0.5 112.142 0.5 108V92C0.5 87.8579 3.85786 84.5 8 84.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M44.9844 94.9844C46.0781 94.9844 47.0156 95.3906 47.7969 96.2031C48.6094 96.9844 49.0156 97.9219 49.0156 99.0156V108.016H47V105.016H29V108.016H26.9844V93.0156H29V102.016H37.0156V94.9844H44.9844ZM35.0938 100.094C34.5 100.688 33.7969 100.984 32.9844 100.984C32.1719 100.984 31.4688 100.688 30.875 100.094C30.2812 99.5 29.9844 98.7969 29.9844 97.9844C29.9844 97.1719 30.2812 96.4688 30.875 95.875C31.4688 95.2812 32.1719 94.9844 32.9844 94.9844C33.7969 94.9844 34.5 95.2812 35.0938 95.875C35.6875 96.4688 35.9844 97.1719 35.9844 97.9844C35.9844 98.7969 35.6875 99.5 35.0938 100.094Z" fill="#03A9F4"/>
<path d="M0 128C0 123.582 3.58172 120 8 120H68C72.4183 120 76 123.582 76 128V144C76 148.418 72.4183 152 68 152H8C3.58172 152 0 148.418 0 144V128Z" fill="white"/>
<path d="M8 120.5H68C72.1421 120.5 75.5 123.858 75.5 128V144C75.5 148.142 72.1421 151.5 68 151.5H8C3.85786 151.5 0.5 148.142 0.5 144V128C0.5 123.858 3.85786 120.5 8 120.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M46.0156 136.984H47.9844V142.984C47.9844 143.516 47.7812 143.984 47.375 144.391C47 144.797 46.5469 145 46.0156 145C46.0156 145.281 45.9062 145.516 45.6875 145.703C45.5 145.891 45.2656 145.984 44.9844 145.984H31.0156C30.7344 145.984 30.4844 145.891 30.2656 145.703C30.0781 145.516 29.9844 145.281 29.9844 145C29.4531 145 28.9844 144.797 28.5781 144.391C28.2031 143.984 28.0156 143.516 28.0156 142.984V136.984H31.0156V136.234C31.0156 135.641 31.2344 135.125 31.6719 134.688C32.1406 134.219 32.6719 133.984 33.2656 133.984C33.8906 133.984 34.4531 134.234 34.9531 134.734L36.3125 136.281C36.5 136.5 36.7812 136.734 37.1562 136.984H44V128.828C44 128.609 43.9219 128.422 43.7656 128.266C43.6094 128.078 43.4062 127.984 43.1562 127.984C42.9375 127.984 42.75 128.062 42.5938 128.219L41.3281 129.484C41.3906 129.734 41.4219 129.906 41.4219 130C41.4219 130.344 41.3125 130.703 41.0938 131.078L38.3281 128.312C38.7031 128.094 39.0625 127.984 39.4062 127.984C39.5625 127.984 39.7344 128.016 39.9219 128.078L41.1875 126.812C41.7188 126.281 42.375 126.016 43.1562 126.016C43.9375 126.016 44.6094 126.297 45.1719 126.859C45.7344 127.391 46.0156 128.047 46.0156 128.828V136.984ZM31.5781 132.438C31.2031 132.031 31.0156 131.547 31.0156 130.984C31.0156 130.422 31.2031 129.953 31.5781 129.578C31.9531 129.203 32.4219 129.016 32.9844 129.016C33.5469 129.016 34.0156 129.203 34.3906 129.578C34.7969 129.953 35 130.422 35 130.984C35 131.547 34.7969 132.031 34.3906 132.438C34.0156 132.812 33.5469 133 32.9844 133C32.4219 133 31.9531 132.812 31.5781 132.438Z" fill="#03A9F4"/>
<path d="M84 4C84 1.79086 85.7909 0 88 0H100C102.209 0 104 1.79086 104 4V4C104 6.20914 102.209 8 100 8H88C85.7909 8 84 6.20914 84 4V4Z" fill="black" fill-opacity="0.32"/>
<path d="M84 20C84 15.5817 87.5817 12 92 12H152C156.418 12 160 15.5817 160 20V36C160 40.4183 156.418 44 152 44H92C87.5817 44 84 40.4183 84 36V20Z" fill="white"/>
<path d="M92 12.5H152C156.142 12.5 159.5 15.8579 159.5 20V36C159.5 40.1421 156.142 43.5 152 43.5H92C87.8579 43.5 84.5 40.1421 84.5 36V20C84.5 15.8579 87.8579 12.5 92 12.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M131.984 30.0156C131.984 30.7656 131.797 31.4531 131.422 32.0781C131.047 32.6719 130.562 33.1406 129.969 33.4844C129.844 34.2031 129.5 34.8125 128.938 35.3125C128.406 35.7812 127.766 36.0156 127.016 36.0156C126.359 36.0156 125.766 35.8281 125.234 35.4531C124.734 35.0781 124.391 34.5938 124.203 34H119.797C119.609 34.5938 119.25 35.0781 118.719 35.4531C118.219 35.8281 117.641 36.0156 116.984 36.0156C116.234 36.0156 115.578 35.7812 115.016 35.3125C114.484 34.8125 114.156 34.2031 114.031 33.4844C113.438 33.1406 112.953 32.6719 112.578 32.0781C112.203 31.4531 112.016 30.7656 112.016 30.0156C112.016 29.1094 112.266 28.3125 112.766 27.625C113.297 26.9375 113.969 26.4688 114.781 26.2188L113 24.3906L112.719 24.7188C112.5 24.9062 112.25 25 111.969 25C111.719 25 111.5 24.9062 111.312 24.7188C111.094 24.5312 110.984 24.2969 110.984 24.0156C110.984 23.7344 111.094 23.5 111.312 23.3125L113.281 21.2969C113.469 21.1094 113.703 21.0156 113.984 21.0156C114.266 21.0156 114.5 21.1094 114.688 21.2969C114.906 21.4844 115.016 21.7188 115.016 22C115.016 22.2812 114.906 22.5156 114.688 22.7031L114.406 22.9844L115.812 24.3906L116.609 22.0469C116.797 21.4219 117.156 20.9219 117.688 20.5469C118.219 20.1719 118.797 19.9844 119.422 19.9844H124.578C125.203 19.9844 125.781 20.1719 126.312 20.5469C126.844 20.9219 127.203 21.4219 127.391 22.0469L128.75 26.0781C129.375 26.2031 129.922 26.4531 130.391 26.8281C130.891 27.2031 131.281 27.6719 131.562 28.2344C131.844 28.7656 131.984 29.3594 131.984 30.0156ZM116.984 34C117.266 34 117.5 33.9062 117.688 33.7188C117.906 33.5 118.016 33.2656 118.016 33.0156C118.016 32.7344 117.906 32.5 117.688 32.3125C117.5 32.0938 117.266 31.9844 116.984 31.9844C116.734 31.9844 116.5 32.0938 116.281 32.3125C116.094 32.5 116 32.7344 116 33.0156C116 33.2656 116.094 33.5 116.281 33.7188C116.5 33.9062 116.734 34 116.984 34ZM121.016 25.9844V22H119.422C118.953 22 118.641 22.2344 118.484 22.7031L117.406 25.9844H121.016ZM122.984 22V25.9844H126.594L125.516 22.7031C125.359 22.2344 125.047 22 124.578 22H122.984ZM127.016 34C127.266 34 127.484 33.9062 127.672 33.7188C127.891 33.5 128 33.2656 128 33.0156C128 32.7344 127.891 32.5 127.672 32.3125C127.484 32.0938 127.266 31.9844 127.016 31.9844C126.734 31.9844 126.484 32.0938 126.266 32.3125C126.078 32.5 125.984 32.7344 125.984 33.0156C125.984 33.2656 126.078 33.5 126.266 33.7188C126.484 33.9062 126.734 34 127.016 34Z" fill="#03A9F4"/>
<path d="M84 56C84 51.5817 87.5817 48 92 48H152C156.418 48 160 51.5817 160 56V72C160 76.4183 156.418 80 152 80H92C87.5817 80 84 76.4183 84 72V56Z" fill="white"/>
<path d="M92 48.5H152C156.142 48.5 159.5 51.8579 159.5 56V72C159.5 76.1421 156.142 79.5 152 79.5H92C87.8579 79.5 84.5 76.1421 84.5 72V56C84.5 51.8579 87.8579 48.5 92 48.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M128.984 58.9844C130.078 58.9844 131.016 59.3906 131.797 60.2031C132.609 60.9844 133.016 61.9219 133.016 63.0156V72.0156H131V69.0156H113V72.0156H110.984V57.0156H113V66.0156H121.016V58.9844H128.984ZM119.094 64.0938C118.5 64.6875 117.797 64.9844 116.984 64.9844C116.172 64.9844 115.469 64.6875 114.875 64.0938C114.281 63.5 113.984 62.7969 113.984 61.9844C113.984 61.1719 114.281 60.4688 114.875 59.875C115.469 59.2812 116.172 58.9844 116.984 58.9844C117.797 58.9844 118.5 59.2812 119.094 59.875C119.688 60.4688 119.984 61.1719 119.984 61.9844C119.984 62.7969 119.688 63.5 119.094 64.0938Z" fill="#03A9F4"/>
<path d="M84 92C84 87.5817 87.5817 84 92 84H152C156.418 84 160 87.5817 160 92V108C160 112.418 156.418 116 152 116H92C87.5817 116 84 112.418 84 108V92Z" fill="white"/>
<path d="M92 84.5H152C156.142 84.5 159.5 87.8579 159.5 92V108C159.5 112.142 156.142 115.5 152 115.5H92C87.8579 115.5 84.5 112.142 84.5 108V92C84.5 87.8579 87.8579 84.5 92 84.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M112.016 94H131.984V106H130.016V103.984H125.984V106H124.016V96.0156H113.984V106H112.016V94ZM130.016 96.0156H125.984V97.9844H130.016V96.0156ZM125.984 102.016H130.016V100H125.984V102.016Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_3969_50764">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,63 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5533)">
<path d="M0 8C0 3.58172 3.58172 0 8 0H42.6667C47.0849 0 50.6667 3.58172 50.6667 8V64C50.6667 68.4183 47.0849 72 42.6667 72H8.00001C3.58173 72 0 68.4183 0 64V8Z" fill="white"/>
<path d="M8 0.5H42.667C46.809 0.500178 50.167 3.85798 50.167 8V64C50.167 68.142 46.809 71.4998 42.667 71.5H8C3.85787 71.5 0.5 68.1421 0.5 64V8C0.5 3.85786 3.85786 0.5 8 0.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M8 12C8 9.79086 9.79086 8 12 8H38.6667C40.8758 8 42.6667 9.79086 42.6667 12V12C42.6667 14.2091 40.8758 16 38.6667 16H12C9.79086 16 8 14.2091 8 12V12Z" fill="black" fill-opacity="0.32"/>
<path d="M8 27C8 25.3431 9.34315 24 11 24H27.6667C29.3235 24 30.6667 25.3431 30.6667 27V29C30.6667 30.6569 29.3235 32 27.6667 32H11C9.34314 32 8 30.6569 8 29V27Z" fill="black" fill-opacity="0.12"/>
<rect x="34.6667" y="24" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M8 43C8 41.3431 9.34315 40 11 40H27.6667C29.3235 40 30.6667 41.3431 30.6667 43V45C30.6667 46.6569 29.3235 48 27.6667 48H11C9.34314 48 8 46.6569 8 45V43Z" fill="black" fill-opacity="0.12"/>
<rect x="34.6667" y="40" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M8 59C8 57.3431 9.34315 56 11 56H27.6667C29.3235 56 30.6667 57.3431 30.6667 59V61C30.6667 62.6569 29.3235 64 27.6667 64H11C9.34314 64 8 62.6569 8 61V59Z" fill="black" fill-opacity="0.12"/>
<rect x="34.6667" y="56" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M0 84C0 79.5817 3.58172 76 8 76H42.6667C47.0849 76 50.6667 79.5817 50.6667 84V124C50.6667 128.418 47.0849 132 42.6667 132H8.00001C3.58173 132 0 128.418 0 124V84Z" fill="white"/>
<path d="M8 76.5H42.667C46.809 76.5002 50.167 79.858 50.167 84V124C50.167 128.142 46.809 131.5 42.667 131.5H8C3.85787 131.5 0.5 128.142 0.5 124V84C0.5 79.8579 3.85786 76.5 8 76.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M8 88C8 85.7909 9.79086 84 12 84H38.6667C40.8758 84 42.6667 85.7909 42.6667 88V88C42.6667 90.2091 40.8758 92 38.6667 92H12C9.79086 92 8 90.2091 8 88V88Z" fill="black" fill-opacity="0.32"/>
<path d="M8 103C8 101.343 9.34315 100 11 100H27.6667C29.3235 100 30.6667 101.343 30.6667 103V105C30.6667 106.657 29.3235 108 27.6667 108H11C9.34314 108 8 106.657 8 105V103Z" fill="black" fill-opacity="0.12"/>
<rect x="34.6667" y="100" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M8 119C8 117.343 9.34315 116 11 116H27.6667C29.3235 116 30.6667 117.343 30.6667 119V121C30.6667 122.657 29.3235 124 27.6667 124H11C9.34314 124 8 122.657 8 121V119Z" fill="black" fill-opacity="0.12"/>
<rect x="34.6667" y="116" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M0 144C0 139.582 3.58172 136 8 136H42.6667C47.0849 136 50.6667 139.582 50.6667 144V152C50.6667 156.418 47.0849 160 42.6667 160H8.00001C3.58173 160 0 156.418 0 152V144Z" fill="white"/>
<path d="M8 136.5H42.667C46.809 136.5 50.167 139.858 50.167 144V152C50.167 156.142 46.809 159.5 42.667 159.5H8C3.85787 159.5 0.5 156.142 0.5 152V144C0.5 139.858 3.85786 136.5 8 136.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M8 148C8 145.791 9.79086 144 12 144H38.6667C40.8758 144 42.6667 145.791 42.6667 148V148C42.6667 150.209 40.8758 152 38.6667 152H12C9.79086 152 8 150.209 8 148V148Z" fill="black" fill-opacity="0.32"/>
<path d="M54.6667 8C54.6667 3.58172 58.2484 0 62.6667 0H97.3333C101.752 0 105.333 3.58172 105.333 8V48C105.333 52.4183 101.752 56 97.3334 56H62.6667C58.2484 56 54.6667 52.4183 54.6667 48V8Z" fill="white"/>
<path d="M62.6667 0.5H97.3337C101.476 0.50018 104.834 3.85798 104.834 8V48C104.834 52.142 101.476 55.4998 97.3337 55.5H62.6667C58.5246 55.5 55.1667 52.1421 55.1667 48V8C55.1667 3.85786 58.5246 0.5 62.6667 0.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M62.6667 12C62.6667 9.79086 64.4575 8 66.6667 8H93.3334C95.5425 8 97.3334 9.79086 97.3334 12V12C97.3334 14.2091 95.5425 16 93.3334 16H66.6667C64.4576 16 62.6667 14.2091 62.6667 12V12Z" fill="black" fill-opacity="0.32"/>
<path d="M62.6667 27C62.6667 25.3431 64.0098 24 65.6667 24H82.3334C83.9902 24 85.3334 25.3431 85.3334 27V29C85.3334 30.6569 83.9902 32 82.3334 32H65.6667C64.0098 32 62.6667 30.6569 62.6667 29V27Z" fill="black" fill-opacity="0.12"/>
<rect x="89.3333" y="24" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M62.6667 43C62.6667 41.3431 64.0098 40 65.6667 40H82.3334C83.9902 40 85.3334 41.3431 85.3334 43V45C85.3334 46.6569 83.9902 48 82.3334 48H65.6667C64.0098 48 62.6667 46.6569 62.6667 45V43Z" fill="black" fill-opacity="0.12"/>
<rect x="89.3333" y="40" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M54.6667 68C54.6667 63.5817 58.2484 60 62.6667 60H97.3333C101.752 60 105.333 63.5817 105.333 68V76C105.333 80.4183 101.752 84 97.3334 84H62.6667C58.2484 84 54.6667 80.4183 54.6667 76V68Z" fill="white"/>
<path d="M62.6667 60.5H97.3337C101.476 60.5002 104.834 63.858 104.834 68V76C104.834 80.142 101.476 83.4998 97.3337 83.5H62.6667C58.5246 83.5 55.1667 80.1421 55.1667 76V68C55.1667 63.8579 58.5246 60.5 62.6667 60.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M62.6667 72C62.6667 69.7909 64.4575 68 66.6667 68H93.3334C95.5425 68 97.3334 69.7909 97.3334 72V72C97.3334 74.2091 95.5425 76 93.3334 76H66.6667C64.4576 76 62.6667 74.2091 62.6667 72V72Z" fill="black" fill-opacity="0.32"/>
<path d="M54.6667 96C54.6667 91.5817 58.2484 88 62.6667 88H97.3333C101.752 88 105.333 91.5817 105.333 96V136C105.333 140.418 101.752 144 97.3334 144H62.6667C58.2484 144 54.6667 140.418 54.6667 136V96Z" fill="white"/>
<path d="M62.6667 88.5H97.3337C101.476 88.5002 104.834 91.858 104.834 96V136C104.834 140.142 101.476 143.5 97.3337 143.5H62.6667C58.5246 143.5 55.1667 140.142 55.1667 136V96C55.1667 91.8579 58.5246 88.5 62.6667 88.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M62.6667 100C62.6667 97.7909 64.4575 96 66.6667 96H93.3334C95.5425 96 97.3334 97.7909 97.3334 100V100C97.3334 102.209 95.5425 104 93.3334 104H66.6667C64.4576 104 62.6667 102.209 62.6667 100V100Z" fill="black" fill-opacity="0.32"/>
<path d="M62.6667 115C62.6667 113.343 64.0098 112 65.6667 112H82.3334C83.9902 112 85.3334 113.343 85.3334 115V117C85.3334 118.657 83.9902 120 82.3334 120H65.6667C64.0098 120 62.6667 118.657 62.6667 117V115Z" fill="black" fill-opacity="0.12"/>
<rect x="89.3333" y="112" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M62.6667 131C62.6667 129.343 64.0098 128 65.6667 128H82.3334C83.9902 128 85.3334 129.343 85.3334 131V133C85.3334 134.657 83.9902 136 82.3334 136H65.6667C64.0098 136 62.6667 134.657 62.6667 133V131Z" fill="black" fill-opacity="0.12"/>
<rect x="89.3333" y="128" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M109.333 8C109.333 3.58172 112.915 0 117.333 0H152C156.418 0 160 3.58172 160 8V112C160 116.418 156.418 120 152 120H117.333C112.915 120 109.333 116.418 109.333 112V8Z" fill="white"/>
<path d="M117.333 0.5H152C156.142 0.50018 159.5 3.85798 159.5 8V112C159.5 116.142 156.142 119.5 152 119.5H117.333C113.191 119.5 109.833 116.142 109.833 112V8C109.833 3.85786 113.191 0.5 117.333 0.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M117.333 12C117.333 9.79086 119.124 8 121.333 8H148C150.209 8 152 9.79086 152 12V12C152 14.2091 150.209 16 148 16H121.333C119.124 16 117.333 14.2091 117.333 12V12Z" fill="black" fill-opacity="0.32"/>
<path d="M117.333 27C117.333 25.3431 118.676 24 120.333 24H137C138.657 24 140 25.3431 140 27V29C140 30.6569 138.657 32 137 32H120.333C118.676 32 117.333 30.6569 117.333 29V27Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="24" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M117.333 43C117.333 41.3431 118.676 40 120.333 40H137C138.657 40 140 41.3431 140 43V45C140 46.6569 138.657 48 137 48H120.333C118.676 48 117.333 46.6569 117.333 45V43Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="40" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M117.333 59C117.333 57.3431 118.676 56 120.333 56H137C138.657 56 140 57.3431 140 59V61C140 62.6569 138.657 64 137 64H120.333C118.676 64 117.333 62.6569 117.333 61V59Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="56" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M117.333 75C117.333 73.3431 118.676 72 120.333 72H137C138.657 72 140 73.3431 140 75V77C140 78.6569 138.657 80 137 80H120.333C118.676 80 117.333 78.6569 117.333 77V75Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="72" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M117.333 91C117.333 89.3431 118.676 88 120.333 88H137C138.657 88 140 89.3431 140 91V93C140 94.6569 138.657 96 137 96H120.333C118.676 96 117.333 94.6569 117.333 93V91Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="88" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M117.333 107C117.333 105.343 118.676 104 120.333 104H137C138.657 104 140 105.343 140 107V109C140 110.657 138.657 112 137 112H120.333C118.676 112 117.333 110.657 117.333 109V107Z" fill="black" fill-opacity="0.12"/>
<rect x="144" y="104" width="8" height="8" rx="4" fill="black" fill-opacity="0.12"/>
<path d="M109.333 132C109.333 127.582 112.915 124 117.333 124H152C156.418 124 160 127.582 160 132V140C160 144.418 156.418 148 152 148H117.333C112.915 148 109.333 144.418 109.333 140V132Z" fill="white"/>
<path d="M117.333 124.5H152C156.142 124.5 159.5 127.858 159.5 132V140C159.5 144.142 156.142 147.5 152 147.5H117.333C113.191 147.5 109.833 144.142 109.833 140V132C109.833 127.858 113.191 124.5 117.333 124.5Z" stroke="black" stroke-opacity="0.12"/>
<path d="M117.333 136C117.333 133.791 119.124 132 121.333 132H148C150.209 132 152 133.791 152 136V136C152 138.209 150.209 140 148 140H121.333C119.124 140 117.333 138.209 117.333 136V136Z" fill="black" fill-opacity="0.32"/>
</g>
<defs>
<clipPath id="clip0_1738_5533">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -0,0 +1,16 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5539)">
<rect width="160" height="160" rx="8" fill="white"/>
<rect x="0.5" y="0.5" width="159" height="159" rx="7.5" stroke="black" stroke-opacity="0.12"/>
<path d="M83 86.9844V75.125L77 73.0156V84.875L83 86.9844ZM88.4844 71C88.8281 71 89 71.1719 89 71.5156V86.6094C89 86.8594 88.875 87.0156 88.625 87.0781L83 89L77 86.8906L71.6562 88.9531L71.5156 89C71.1719 89 71 88.8281 71 88.4844V73.3906C71 73.1406 71.125 72.9844 71.375 72.9219L77 71L83 73.1094L88.3438 71.0469L88.4844 71Z" fill="#03A9F4"/>
<path d="M148 77.0508L139.288 85.8983M139.288 85.8983L116.852 108.684C115.724 109.83 114.184 110.475 112.576 110.475H81.6939M139.288 85.8983V69.4322M21.1957 82.9492H12M21.1957 82.9492L32.3274 71.6441M21.1957 82.9492L44.427 106.542M81.6939 110.475V124.237M81.6939 110.475H54.5907M81.6939 138V124.237M81.6939 124.237H148M32.3274 71.6441L43.4591 60.339L54.5907 49.0339L70.4941 32.8828C74.2533 29.0651 79.3871 26.9153 84.7451 26.9153H128.641V26.9153C134.521 26.9153 139.288 31.6824 139.288 37.5629V37.7288V49.0339M32.3274 71.6441L24.8569 64.0572C22.5573 61.7218 22.5573 57.9732 24.8569 55.6377L57.9786 22M139.288 49.0339H126.313C124.706 49.0339 123.166 48.389 122.038 47.2436L116.057 41.1695M139.288 49.0339V69.4322M139.288 69.4322H126.313C124.706 69.4322 123.166 68.7873 122.038 67.6419L116.057 61.5678M54.5907 110.475V110.475C54.5907 107.488 52.17 105.068 49.184 105.068H49.0249C45.951 105.068 43.4591 107.56 43.4591 110.634V110.807C43.4591 113.881 45.951 116.373 49.0249 116.373V116.373C52.0988 116.373 54.5907 113.881 54.5907 110.807V110.475ZM44.427 115.39L22.1637 138" stroke="black" stroke-opacity="0.12" stroke-width="5" stroke-linecap="round"/>
<circle cx="41" cy="39" r="14" fill="black" fill-opacity="0.32"/>
<circle cx="89" cy="117" r="14" fill="black" fill-opacity="0.32"/>
<path d="M116 62.325C115.767 62.325 115.533 62.2833 115.3 62.2C115.067 62.1167 114.858 61.9917 114.675 61.825C113.592 60.825 112.633 59.85 111.8 58.9C110.967 57.95 110.267 57.0333 109.7 56.15C109.15 55.25 108.725 54.3917 108.425 53.575C108.142 52.7417 108 51.95 108 51.2C108 48.7 108.8 46.7083 110.4 45.225C112.017 43.7417 113.883 43 116 43C118.117 43 119.975 43.7417 121.575 45.225C123.192 46.7083 124 48.7 124 51.2C124 51.95 123.85 52.7417 123.55 53.575C123.267 54.3917 122.842 55.25 122.275 56.15C121.725 57.0333 121.033 57.95 120.2 58.9C119.367 59.85 118.408 60.825 117.325 61.825C117.142 61.9917 116.933 62.1167 116.7 62.2C116.467 62.2833 116.233 62.325 116 62.325Z" fill="black" fill-opacity="0.32"/>
</g>
<defs>
<clipPath id="clip0_1738_5539">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,13 @@
<svg width="160" height="72" viewBox="0 0 160 72" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5535)">
<path d="M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V4C32 6.20914 30.2091 8 28 8H4C1.79086 8 0 6.20914 0 4V4Z" fill="black" fill-opacity="0.32"/>
<rect y="12" width="50.6667" height="60" rx="8" fill="white"/>
<rect x="0.5" y="12.5" width="49.6667" height="59" rx="7.5" stroke="black" stroke-opacity="0.12"/>
<path d="M32.3177 42.9844H26.3177V48.9844H24.349V42.9844H18.349V41.0156H24.349V35.0156H26.3177V41.0156H32.3177V42.9844Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_1738_5535">
<rect width="160" height="72" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 712 B

View File

@ -0,0 +1,16 @@
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1738_5537)">
<rect width="160" height="160" rx="6" fill="white"/>
<rect x="0.5" y="0.5" width="159" height="159" rx="5.5" stroke="black" stroke-opacity="0.12"/>
<rect x="8" y="8" width="144" height="11" rx="5.5" fill="black" fill-opacity="0.32"/>
<rect x="8" y="27" width="45.3333" height="106" rx="4" fill="#E9E9E9"/>
<rect x="57.3333" y="27" width="45.3333" height="30" rx="4" fill="#E9E9E9"/>
<rect x="106.667" y="27" width="45.3333" height="68" rx="4" fill="#E9E9E9"/>
<path d="M84.3594 82.0156H87.7344C87.9219 81.1406 88.0156 80.4688 88.0156 80C88.0156 79.5312 87.9219 78.8594 87.7344 77.9844H84.3594C84.4531 78.6406 84.5 79.3125 84.5 80C84.5 80.6875 84.4531 81.3594 84.3594 82.0156ZM82.5781 87.5469C83.3594 87.2969 84.1719 86.8281 85.0156 86.1406C85.8594 85.4219 86.5 84.7031 86.9375 83.9844H83.9844C83.6719 85.2344 83.2031 86.4219 82.5781 87.5469ZM82.3438 82.0156C82.4375 81.3594 82.4844 80.6875 82.4844 80C82.4844 79.3125 82.4375 78.6406 82.3438 77.9844H77.6562C77.5625 78.6406 77.5156 79.3125 77.5156 80C77.5156 80.6875 77.5625 81.3594 77.6562 82.0156H82.3438ZM80 87.9688C80.875 86.6875 81.5156 85.3594 81.9219 83.9844H78.0781C78.4844 85.3594 79.125 86.6875 80 87.9688ZM76.0156 76.0156C76.3906 74.6719 76.8594 73.4844 77.4219 72.4531C76.6406 72.7031 75.8125 73.1875 74.9375 73.9062C74.0938 74.5938 73.4688 75.2969 73.0625 76.0156H76.0156ZM73.0625 83.9844C73.4688 84.7031 74.0938 85.4219 74.9375 86.1406C75.8125 86.8281 76.6406 87.2969 77.4219 87.5469C76.7969 86.4219 76.3281 85.2344 76.0156 83.9844H73.0625ZM72.2656 82.0156H75.6406C75.5469 81.3594 75.5 80.6875 75.5 80C75.5 79.3125 75.5469 78.6406 75.6406 77.9844H72.2656C72.0781 78.8594 71.9844 79.5312 71.9844 80C71.9844 80.4688 72.0781 81.1406 72.2656 82.0156ZM80 72.0312C79.125 73.3125 78.4844 74.6406 78.0781 76.0156H81.9219C81.5156 74.6406 80.875 73.3125 80 72.0312ZM86.9375 76.0156C86.5 75.2969 85.8594 74.5938 85.0156 73.9062C84.1719 73.1875 83.3594 72.7031 82.5781 72.4531C83.1406 73.4844 83.6094 74.6719 83.9844 76.0156H86.9375ZM72.9219 72.9688C74.8906 71 77.25 70.0156 80 70.0156C82.75 70.0156 85.0938 71 87.0312 72.9688C89 74.9062 89.9844 77.25 89.9844 80C89.9844 82.75 89 85.1094 87.0312 87.0781C85.0938 89.0156 82.75 89.9844 80 89.9844C77.25 89.9844 74.8906 89.0156 72.9219 87.0781C70.9844 85.1094 70.0156 82.75 70.0156 80C70.0156 77.25 70.9844 74.9062 72.9219 72.9688Z" fill="#03A9F4"/>
</g>
<defs>
<clipPath id="clip0_1738_5537">
<rect width="160" height="160" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20250531.3"
version = "20250730.0"
license = "Apache-2.0"
license-files = ["LICENSE*"]
description = "The Home Assistant frontend"

View File

@ -33,7 +33,7 @@ fi
docker run \
-v ${LOCAL_FILE}:/opt/src/${LOCAL_FILE} \
lokalise/lokalise-cli-2:v2.6.10 lokalise2 \
lokalise/lokalise-cli-2:v3.1.4 lokalise2 \
--token ${LOKALISE_TOKEN} \
--project-id ${PROJECT_ID} \
file upload \

View File

@ -1,5 +1,4 @@
/* eslint-disable lit/prefer-static-styles */
import "@material/mwc-button";
import { genClientId } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { html, LitElement, nothing } from "lit";
@ -7,6 +6,7 @@ import { keyed } from "lit/directives/keyed";
import { customElement, property, state } from "lit/decorators";
import type { LocalizeFunc } from "../common/translations/localize";
import "../components/ha-alert";
import "../components/ha-button";
import "../components/ha-checkbox";
import { computeInitialHaFormData } from "../components/ha-form/compute-initial-ha-form-data";
import "../components/ha-formfield";
@ -173,15 +173,14 @@ export class HaAuthFlow extends LitElement {
return html`
${this._renderStep(this.step)}
<div class="action">
<mwc-button
raised
<ha-button
@click=${this._handleSubmit}
.disabled=${this._submitting}
>
${this.step.type === "form"
? this.localize("ui.panel.page-authorize.form.next")
: this.localize("ui.panel.page-authorize.form.start_over")}
</mwc-button>
</ha-button>
</div>
`;
case "error":
@ -192,9 +191,9 @@ export class HaAuthFlow extends LitElement {
})}
</ha-alert>
<div class="action">
<mwc-button raised @click=${this._startOver}>
<ha-button @click=${this._startOver}>
${this.localize("ui.panel.page-authorize.form.start_over")}
</mwc-button>
</ha-button>
</div>
`;
case "loading":

View File

@ -11,7 +11,6 @@ export const COLORS = [
"#9c6b4e",
"#97bbf5",
"#01ab63",
"#9498a0",
"#094bad",
"#c99000",
"#d84f3e",
@ -21,7 +20,6 @@ export const COLORS = [
"#8043ce",
"#7599d1",
"#7a4c31",
"#74787f",
"#6989f4",
"#ffd444",
"#ff957c",
@ -31,7 +29,6 @@ export const COLORS = [
"#c884ff",
"#badeff",
"#bf8b6d",
"#b6bac2",
"#927acc",
"#97ee3f",
"#bf3947",
@ -44,7 +41,6 @@ export const COLORS = [
"#d9b100",
"#9d7a00",
"#698cff",
"#d9d9d9",
"#00d27e",
"#d06800",
"#009f82",

115
src/common/color/palette.ts Normal file
View File

@ -0,0 +1,115 @@
import { formatHex, oklch, wcagLuminance, type Oklch } from "culori";
const MIN_LUMINANCE = 0.3;
const MAX_LUMINANCE = 0.6;
/**
* Normalizes the luminance of a given color to ensure it falls within the specified minimum and maximum luminance range.
* This helps to keep everything readable and accessible, especially for text and UI elements.
*
* This function converts the input color to the OKLCH color space, calculates its luminance,
* and adjusts the lightness component if the luminance is outside the allowed range.
* The adjustment is performed using a binary search to find the appropriate lightness value.
* If the color is already within the range, it is returned unchanged.
*
* @param color - css color string
* @returns The normalized color as a hex string, or the original color if normalization is not needed.
* @throws If the provided color is invalid or cannot be parsed.
*/
export const normalizeLuminance = (color: string): string => {
const baseOklch = oklch(color);
if (baseOklch === undefined) {
throw new Error("Invalid color provided");
}
const luminance = wcagLuminance(baseOklch);
if (luminance >= MIN_LUMINANCE && luminance <= MAX_LUMINANCE) {
return color;
}
const targetLuminance =
luminance < MIN_LUMINANCE ? MIN_LUMINANCE : MAX_LUMINANCE;
function findLightness(lowL = 0, highL = 1, iterations = 10) {
if (iterations <= 0) {
return (lowL + highL) / 2;
}
const midL = (lowL + highL) / 2;
const testColor = { ...baseOklch, l: midL } as Oklch;
const testLuminance = wcagLuminance(testColor);
if (Math.abs(testLuminance - targetLuminance) < 0.01) {
return midL;
}
if (testLuminance < targetLuminance) {
return findLightness(midL, highL, iterations--);
}
return findLightness(lowL, midL, iterations--);
}
baseOklch.l = findLightness();
return formatHex(baseOklch) || color;
};
/**
* Generates a color palette based on a base color using the OKLCH color space.
*
* The palette consists of multiple shades, both lighter and darker than the base color,
* calculated by adjusting the lightness and chroma values. Each shade is labeled and
* returned as a tuple containing the shade name and its hexadecimal color value.
*
* @param baseColor - The base color in a HEX format.
* @param label - A string label used to name each color variant in the palette.
* @param steps - An array of numbers representing the percentage steps for generating shades (default: [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95]).
* @returns An array of tuples, each containing the shade name and its corresponding hex color value.
* @throws If the provided base color is invalid or cannot be parsed by the `oklch` function.
*/
export const generateColorPalette = (
baseColor: string,
label: string,
steps = [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95]
) => {
const baseOklch = oklch(baseColor);
if (baseOklch === undefined) {
throw new Error("Invalid base color provided");
}
return steps.map((step) => {
const name = `color-${label}-${step}`;
// Base color at 50%
if (step === 50) {
return [name, formatHex(baseOklch)];
}
// For darker shades (below 50%)
if (step < 50) {
const darkFactor = step / 50;
// Adjust lightness and chroma to create darker variants
const darker = {
...baseOklch,
l: baseOklch.l * darkFactor, // darkening
c: baseOklch.c * (0.9 + 0.1 * darkFactor), // Slightly adjust chroma
};
return [name, formatHex(darker)];
}
// For lighter shades (above 50%)
const lightFactor = (step - 50) / 45; // Normalized from 0 to 1
// Adjust lightness and reduce chroma for lighter variants
const lighter = {
...baseOklch,
l: Math.min(1, baseOklch.l + (1 - baseOklch.l) * lightFactor), // Increase lightness
c: baseOklch.c * Math.max(0, 1 - lightFactor * 0.7), // Gradually reduce chroma
};
return [name, formatHex(lighter)];
});
};

View File

@ -77,7 +77,7 @@ export const formatDateNumeric = (
const month = parts.find((value) => value.type === "month")?.value;
const year = parts.find((value) => value.type === "year")?.value;
const lastPart = parts.at(parts.length - 1);
const lastPart = parts[parts.length - 1];
let lastLiteral = lastPart?.type === "literal" ? lastPart?.value : "";
if (locale.language === "bg" && locale.date_format === DateFormat.YMD) {

View File

@ -202,7 +202,6 @@ export function storage(options: {
// Don't set the initial value if we have a value in localStorage
if (this.__initialized || getValue() === undefined) {
setValue(this, value);
this.requestUpdate(propertyKey, undefined);
}
},
configurable: true,
@ -212,11 +211,13 @@ export function storage(options: {
const oldSetter = descriptor.set;
newDescriptor = {
...descriptor,
get(this: ReactiveStorageElement) {
return getValue();
},
set(this: ReactiveStorageElement, value) {
// Don't set the initial value if we have a value in localStorage
if (this.__initialized || getValue() === undefined) {
setValue(this, value);
this.requestUpdate(propertyKey, undefined);
}
oldSetter?.call(this, value);
},

View File

@ -1,5 +1,5 @@
import type { ThemeVars } from "../../data/ws-themes";
import { darkColorVariables } from "../../resources/theme/color.globals";
import { darkColorVariables } from "../../resources/theme/color";
import { derivedStyles } from "../../resources/theme/theme";
import type { HomeAssistant } from "../../types";
import {
@ -11,6 +11,7 @@ import {
} from "../color/convert-color";
import { hexBlend } from "../color/hex";
import { labBrighten, labDarken } from "../color/lab";
import { generateColorPalette } from "../color/palette";
import { rgbContrast } from "../color/rgb";
interface ProcessedTheme {
@ -75,8 +76,16 @@ export const applyThemesOnElement = (
const labPrimaryColor = rgb2lab(rgbPrimaryColor);
themeRules["primary-color"] = primaryColor;
const rgbLightPrimaryColor = lab2rgb(labBrighten(labPrimaryColor));
generateColorPalette(primaryColor, "primary").forEach(([key, color]) => {
themeRules[key] = color;
});
themeRules["light-primary-color"] = rgb2hex(rgbLightPrimaryColor);
themeRules["dark-primary-color"] = lab2hex(labDarken(labPrimaryColor));
themeRules["darker-primary-color"] = lab2hex(
labDarken(labPrimaryColor, 2)
);
themeRules["text-primary-color"] =
rgbContrast(rgbPrimaryColor, [33, 33, 33]) < 6 ? "#fff" : "#212121";
themeRules["text-light-primary-color"] =

View File

@ -165,6 +165,7 @@ export const computeStateDisplayFromEntityAttributes = (
// state is a timestamp
if (
[
"ai_task",
"button",
"conversation",
"event",

View File

@ -0,0 +1,68 @@
import type { HassEntity } from "home-assistant-js-websocket";
import { computeStateDomain } from "./compute_state_domain";
import { isUnavailableState, UNAVAILABLE } from "../../data/entity";
import type { HomeAssistant } from "../../types";
export const computeGroupEntitiesState = (states: HassEntity[]): string => {
if (!states.length) {
return UNAVAILABLE;
}
const validState = states.filter((stateObj) => isUnavailableState(stateObj));
if (!validState) {
return UNAVAILABLE;
}
// Use the first state to determine the domain
// This assumes all states in the group have the same domain
const domain = computeStateDomain(states[0]);
if (domain === "cover") {
for (const s of ["opening", "closing", "open"]) {
if (states.some((stateObj) => stateObj.state === s)) {
return s;
}
}
return "closed";
}
if (states.some((stateObj) => stateObj.state === "on")) {
return "on";
}
return "off";
};
export const toggleGroupEntities = (
hass: HomeAssistant,
states: HassEntity[]
) => {
if (!states.length) {
return;
}
// Use the first state to determine the domain
// This assumes all states in the group have the same domain
const domain = computeStateDomain(states[0]);
const state = computeGroupEntitiesState(states);
const isOn = state === "on" || state === "open";
let service = isOn ? "turn_off" : "turn_on";
if (domain === "cover") {
if (state === "opening" || state === "closing") {
// If the cover is opening or closing, we toggle it to stop it
service = "stop_cover";
} else {
// For covers, we use the open/close service
service = isOn ? "close_cover" : "open_cover";
}
}
const entitiesIds = states.map((stateObj) => stateObj.entity_id);
hass.callService(domain, service, {
entity_id: entitiesIds,
});
};

View File

@ -64,15 +64,27 @@ export const domainStateColorProperties = (
const compareState = state !== undefined ? state : stateObj.state;
const active = stateActive(stateObj, state);
return domainColorProperties(
domain,
stateObj.attributes.device_class,
compareState,
active
);
};
export const domainColorProperties = (
domain: string,
deviceClass: string | undefined,
state: string,
active: boolean
) => {
const properties: string[] = [];
const stateKey = slugify(compareState, "_");
const stateKey = slugify(state, "_");
const activeKey = active ? "active" : "inactive";
const dc = stateObj.attributes.device_class;
if (dc) {
properties.push(`--state-${domain}-${dc}-${stateKey}-color`);
if (deviceClass) {
properties.push(`--state-${domain}-${deviceClass}-${stateKey}-color`);
}
properties.push(

View File

@ -1,12 +1,14 @@
import memoizeOne from "memoize-one";
import { isIPAddress } from "./is_ip_address";
const collator = memoizeOne(
(language: string | undefined) => new Intl.Collator(language)
(language: string | undefined) =>
new Intl.Collator(language, { numeric: true })
);
const caseInsensitiveCollator = memoizeOne(
(language: string | undefined) =>
new Intl.Collator(language, { sensitivity: "accent" })
new Intl.Collator(language, { sensitivity: "accent", numeric: true })
);
const fallbackStringCompare = (a: string, b: string) => {
@ -33,6 +35,19 @@ export const stringCompare = (
return fallbackStringCompare(a, b);
};
export const ipCompare = (a: string, b: string) => {
const aIsIpV4 = isIPAddress(a);
const bIsIpV4 = isIPAddress(b);
if (aIsIpV4 && bIsIpV4) {
return ipv4Compare(a, b);
}
if (!aIsIpV4 && !bIsIpV4) {
return ipV6Compare(a, b);
}
return aIsIpV4 ? -1 : 1;
};
export const caseInsensitiveStringCompare = (
a: string,
b: string,
@ -64,3 +79,42 @@ export const orderCompare = (order: string[]) => (a: string, b: string) => {
return idxA - idxB;
};
function ipv4Compare(a: string, b: string) {
const num1 = Number(
a
.split(".")
.map((num) => num.padStart(3, "0"))
.join("")
);
const num2 = Number(
b
.split(".")
.map((num) => num.padStart(3, "0"))
.join("")
);
return num1 - num2;
}
function ipV6Compare(a: string, b: string) {
const ipv6a = normalizeIPv6(a)
.split(":")
.map((part) => part.padStart(4, "0"))
.join("");
const ipv6b = normalizeIPv6(b)
.split(":")
.map((part) => part.padStart(4, "0"))
.join("");
return ipv6a.localeCompare(ipv6b);
}
function normalizeIPv6(ip) {
const parts = ip.split("::");
const head = parts[0].split(":");
const tail = parts[1] ? parts[1].split(":") : [];
const totalParts = 8;
const missing = totalParts - (head.length + tail.length);
const zeros = new Array(missing).fill("0");
return [...head, ...zeros, ...tail].join(":");
}

View File

@ -9,14 +9,52 @@ const _extractCssVars = (
cssString.split(";").forEach((rawLine) => {
const line = rawLine.substring(rawLine.indexOf("--")).trim();
if (line.startsWith("--") && condition(line)) {
const [name, value] = line.split(":").map((part) => part.trim());
const [name, value] = line
.split(":")
.map((part) => part.replaceAll("}", "").trim());
variables[name.substring(2, name.length)] = value;
}
});
return variables;
};
export const extractVar = (css: CSSResult, varName: string) => {
/**
* Recursively resolves a CSS variable reference from a base variable map.
*
* If the value of the specified variable in `baseVars` is itself a CSS variable reference
* (i.e., starts with `var(`), this function will recursively resolve the reference until
* it finds a concrete value or reaches an undefined variable.
*
* @param varName - The name of the CSS variable to resolve.
* @param baseVars - A record mapping variable names to their values or references.
* @returns The resolved value of the variable, or `undefined` if not found.
*/
const extractVarFromBase = (
varName: string,
baseVars: Record<string, string>
): string | undefined => {
if (baseVars[varName] && baseVars[varName].startsWith("var(")) {
const baseVarName = baseVars[varName]
.substring(6, baseVars[varName].length - 1)
.trim();
return extractVarFromBase(baseVarName, baseVars);
}
return baseVars[varName];
};
/**
* Extracts the value of a CSS custom property (CSS variable) from a given CSSResult object.
*
* @param css - The CSSResult object containing the CSS string to search.
* @param varName - The name of the CSS variable (without the leading '--') to extract.
* @param baseVars - (Optional) A record of base variable names and their values, used to resolve variables that reference other variables via `var()`.
* @returns The value of the CSS variable if found, otherwise an empty string. If the variable references another variable and `baseVars` is provided, attempts to resolve it from `baseVars`.
*/
export const extractVar = (
css: CSSResult,
varName: string,
baseVars?: Record<string, string>
) => {
const cssString = css.toString();
const search = `--${varName}:`;
const startIndex = cssString.indexOf(search);
@ -25,7 +63,17 @@ export const extractVar = (css: CSSResult, varName: string) => {
}
const endIndex = cssString.indexOf(";", startIndex + search.length);
return cssString.substring(startIndex + search.length, endIndex).trim();
const value = cssString
.substring(startIndex + search.length, endIndex)
.replaceAll("}", "")
.trim();
if (baseVars && value.startsWith("var(")) {
const baseVarName = value.substring(6, value.length - 1).trim();
return extractVarFromBase(baseVarName, baseVars) || value;
}
return value;
};
export const extractVars = (css: CSSResult) => {

View File

@ -30,6 +30,7 @@ class HaCallServiceButton extends LitElement {
<ha-progress-button
.progress=${this.progress}
.disabled=${this.disabled}
appearance="plain"
@click=${this._buttonTapped}
tabindex="0"
>

View File

@ -2,7 +2,9 @@ import { mdiAlertOctagram, mdiCheckBold } from "@mdi/js";
import type { TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import "../ha-button";
import type { Appearance } from "../ha-button";
import "../ha-spinner";
import "../ha-svg-icon";
@ -12,28 +14,47 @@ export class HaProgressButton extends LitElement {
@property({ type: Boolean }) public disabled = false;
@property({ type: Boolean }) public progress = false;
@property({ type: Boolean, reflect: true }) public progress = false;
@property({ type: Boolean }) public raised = false;
@property() appearance: Appearance = "accent";
@property({ type: Boolean }) public unelevated = false;
@property({ attribute: false }) public iconPath?: string;
@property() variant: "brand" | "danger" | "neutral" | "warning" | "success" =
"brand";
@state() private _result?: "success" | "error";
public render(): TemplateResult {
const overlay = this._result || this.progress;
const appearance =
this.progress || this._result ? "accent" : this.appearance;
return html`
<ha-button
.raised=${this.raised}
.label=${this.label}
.unelevated=${this.unelevated}
.disabled=${this.disabled || this.progress}
class=${this._result || ""}
.appearance=${appearance}
.disabled=${this.disabled}
.loading=${this.progress}
.variant=${this._result === "success"
? "success"
: this._result === "error"
? "danger"
: this.variant}
class=${classMap({
result: !!this._result,
success: this._result === "success",
error: this._result === "error",
})}
>
<slot name="icon" slot="icon"></slot>
<slot></slot>
${this.iconPath
? html`<ha-svg-icon
.path=${this.iconPath}
slot="start"
></ha-svg-icon>`
: nothing}
<slot>${this.label}</slot>
</ha-button>
${!overlay
${!this._result
? nothing
: html`
<div class="progress">
@ -41,9 +62,7 @@ export class HaProgressButton extends LitElement {
? html`<ha-svg-icon .path=${mdiCheckBold}></ha-svg-icon>`
: this._result === "error"
? html`<ha-svg-icon .path=${mdiAlertOctagram}></ha-svg-icon>`
: this.progress
? html`<ha-spinner size="small"></ha-spinner>`
: nothing}
: nothing}
</div>
`}
`;
@ -69,60 +88,36 @@ export class HaProgressButton extends LitElement {
outline: none;
display: inline-block;
position: relative;
}
:host([progress]) {
pointer-events: none;
}
ha-button {
transition: all 1s;
pointer-events: initial;
}
ha-button.success {
--mdc-theme-primary: white;
background-color: var(--success-color);
transition: none;
border-radius: 4px;
pointer-events: none;
}
ha-button[unelevated].success,
ha-button[raised].success {
--mdc-theme-primary: var(--success-color);
--mdc-theme-on-primary: white;
}
ha-button.error {
--mdc-theme-primary: white;
background-color: var(--error-color);
transition: none;
border-radius: 4px;
pointer-events: none;
}
ha-button[unelevated].error,
ha-button[raised].error {
--mdc-theme-primary: var(--error-color);
--mdc-theme-on-primary: white;
}
.progress {
bottom: 4px;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
text-align: center;
top: 4px;
top: 0;
width: 100%;
}
ha-svg-icon {
color: white;
ha-button {
width: 100%;
}
ha-button.success slot,
ha-button.error slot {
ha-button.result::part(start),
ha-button.result::part(end),
ha-button.result::part(label),
ha-button.result::part(caret),
ha-button.result::part(spinner) {
visibility: hidden;
}
:host([destructive]) {
--mdc-theme-primary: var(--error-color);
ha-svg-icon {
color: var(--white);
}
`;
}

View File

@ -9,6 +9,7 @@ import type {
LegendComponentOption,
XAXisOption,
YAXisOption,
LineSeriesOption,
} from "echarts/types/dist/shared";
import type { PropertyValues } from "lit";
import { css, html, LitElement, nothing } from "lit";
@ -28,12 +29,22 @@ import { formatTimeLabel } from "./axis-label";
import { ensureArray } from "../../common/array/ensure-array";
import "../chips/ha-assist-chip";
import { downSampleLineData } from "./down-sample";
import { colorVariables } from "../../resources/theme/color/color.globals";
export const MIN_TIME_BETWEEN_UPDATES = 60 * 5 * 1000;
const LEGEND_OVERFLOW_LIMIT = 10;
const LEGEND_OVERFLOW_LIMIT_MOBILE = 6;
const DOUBLE_TAP_TIME = 300;
export type CustomLegendOption = ECOption["legend"] & {
type: "custom";
data?: {
id?: string;
name: string;
itemStyle?: Record<string, any>;
}[];
};
@customElement("ha-chart-base")
export class HaChartBase extends LitElement {
public chart?: EChartsType;
@ -49,6 +60,9 @@ export class HaChartBase extends LitElement {
@property({ attribute: "expand-legend", type: Boolean })
public expandLegend?: boolean;
@property({ attribute: "small-controls", type: Boolean })
public smallControls?: boolean;
// extraComponents is not reactive and should not trigger updates
public extraComponents?: any[];
@ -194,7 +208,7 @@ export class HaChartBase extends LitElement {
<div class="chart"></div>
</div>
${this._renderLegend()}
<div class="chart-controls">
<div class="chart-controls ${classMap({ small: this.smallControls })}">
${this._isZoomed
? html`<ha-icon-button
class="zoom-reset"
@ -215,16 +229,18 @@ export class HaChartBase extends LitElement {
if (!this.options?.legend || !this.data) {
return nothing;
}
const legend = ensureArray(this.options.legend)[0] as LegendComponentOption;
if (!legend.show || legend.type !== "custom") {
const legend = ensureArray(this.options.legend).find(
(l) => l.show && l.type === "custom"
) as CustomLegendOption | undefined;
if (!legend) {
return nothing;
}
const datasets = ensureArray(this.data);
const items: LegendComponentOption["data"] =
const items =
legend.data ||
((datasets
datasets
.filter((d) => (d.data as any[])?.length && (d.id || d.name))
.map((d) => d.name ?? d.id) || []) as string[]);
.map((d) => ({ id: d.id, name: d.name }));
const isMobile = window.matchMedia(
"all and (max-width: 450px), all and (max-height: 500px)"
@ -245,25 +261,29 @@ export class HaChartBase extends LitElement {
}
let itemStyle: Record<string, any> = {};
let name = "";
let id = "";
if (typeof item === "string") {
name = item;
const dataset = datasets.find(
(d) => d.id === item || d.name === item
);
itemStyle = {
color: dataset?.color as string,
...(dataset?.itemStyle as { borderColor?: string }),
};
id = item;
} else {
name = item.name ?? "";
id = item.id ?? name;
itemStyle = item.itemStyle ?? {};
}
const dataset =
datasets.find((d) => d.id === id) ??
datasets.find((d) => d.name === id);
itemStyle = {
color: dataset?.color as string,
...(dataset?.itemStyle as { borderColor?: string }),
itemStyle,
};
const color = itemStyle?.color as string;
const borderColor = itemStyle?.borderColor as string;
return html`<li
.name=${name}
.id=${id}
@click=${this._legendClick}
class=${classMap({ hidden: this._hiddenDatasets.has(name) })}
class=${classMap({ hidden: this._hiddenDatasets.has(id) })}
.title=${name}
>
<div
@ -329,6 +349,13 @@ export class HaChartBase extends LitElement {
const { start, end } = e.batch?.[0] ?? e;
this._isZoomed = start !== 0 || end !== 100;
this._zoomRatio = (end - start) / 100;
if (this._isTouchDevice) {
// zooming changes the axis pointer so we need to hide it
this.chart?.dispatchAction({
type: "hideTip",
from: "datazoom",
});
}
});
this.chart.on("click", (e: ECElementEvent) => {
fireEvent(this, "chart-click", e);
@ -350,6 +377,74 @@ export class HaChartBase extends LitElement {
this._lastTapTime = Date.now();
}
});
// show axis pointer handle on touch devices
let dragJustEnded = false;
let lastTipX: number | undefined;
let lastTipY: number | undefined;
this.chart.on("showTip", (e: any) => {
lastTipX = e.x;
lastTipY = e.y;
this.chart?.setOption({
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
(axis: XAXisOption) =>
axis.show
? {
...axis,
axisPointer: {
...axis.axisPointer,
status: "show",
handle: {
color: colorVariables["primary-color"],
margin: 0,
size: 20,
...axis.axisPointer?.handle,
show: true,
},
},
}
: axis
),
});
});
this.chart.on("hideTip", (e: any) => {
// the drag end event doesn't have a `from` property
if (e.from) {
if (dragJustEnded) {
// hideTip is fired twice when the drag ends, so we need to ignore the second one
dragJustEnded = false;
return;
}
this.chart?.setOption({
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
(axis: XAXisOption) =>
axis.show
? {
...axis,
axisPointer: {
...axis.axisPointer,
handle: {
...axis.axisPointer?.handle,
show: false,
},
status: "hide",
},
}
: axis
),
});
this.chart?.dispatchAction({
type: "downplay",
});
} else if (lastTipX != null && lastTipY != null) {
// echarts hides the tip as soon as the drag ends, so we need to show it again
dragJustEnded = true;
this.chart?.dispatchAction({
type: "showTip",
x: lastTipX,
y: lastTipY,
});
}
});
}
const legend = ensureArray(this.options?.legend || [])[0] as
@ -386,6 +481,7 @@ export class HaChartBase extends LitElement {
type: "inside",
orient: "horizontal",
filterMode: "none",
xAxisIndex: 0,
moveOnMouseMove: !this._isTouchDevice || this._isZoomed,
preventDefaultMouseMove: !this._isTouchDevice || this._isZoomed,
zoomLock: !this._isTouchDevice && !this._modifierPressed,
@ -639,44 +735,46 @@ export class HaChartBase extends LitElement {
const yAxis = (this.options?.yAxis?.[0] ?? this.options?.yAxis) as
| YAXisOption
| undefined;
const series = ensureArray(this.data)
.filter((d) => !this._hiddenDatasets.has(String(d.name ?? d.id)))
.map((s) => {
if (s.type === "line") {
if (yAxis?.type === "log") {
// set <=0 values to null so they render as gaps on a log graph
return {
...s,
data: s.data?.map((v) =>
Array.isArray(v)
? [
v[0],
typeof v[1] !== "number" || v[1] > 0 ? v[1] : null,
...v.slice(2),
]
: v
),
};
}
if (s.sampling === "minmax") {
const minX =
xAxis?.min && typeof xAxis.min === "number"
? xAxis.min
: undefined;
const maxX =
xAxis?.max && typeof xAxis.max === "number"
? xAxis.max
: undefined;
return {
...s,
sampling: undefined,
data: downSampleLineData(s.data, this.clientWidth, minX, maxX),
};
}
const series = ensureArray(this.data).map((s) => {
const data = this._hiddenDatasets.has(String(s.id ?? s.name))
? undefined
: s.data;
if (data && s.type === "line") {
if (yAxis?.type === "log") {
// set <=0 values to null so they render as gaps on a log graph
return {
...s,
data: (data as LineSeriesOption["data"])!.map((v) =>
Array.isArray(v)
? [
v[0],
typeof v[1] !== "number" || v[1] > 0 ? v[1] : null,
...v.slice(2),
]
: v
),
};
}
return s;
});
return series;
if (s.sampling === "minmax") {
const minX =
xAxis?.min && typeof xAxis.min === "number" ? xAxis.min : undefined;
const maxX =
xAxis?.max && typeof xAxis.max === "number" ? xAxis.max : undefined;
return {
...s,
sampling: undefined,
data: downSampleLineData(
data as LineSeriesOption["data"],
this.clientWidth,
minX,
maxX
),
};
}
}
return { ...s, data };
});
return series as ECOption["series"];
}
private _getDefaultHeight() {
@ -733,13 +831,13 @@ export class HaChartBase extends LitElement {
if (!this.chart) {
return;
}
const name = ev.currentTarget?.name;
if (this._hiddenDatasets.has(name)) {
this._hiddenDatasets.delete(name);
fireEvent(this, "dataset-unhidden", { name });
const id = ev.currentTarget?.id;
if (this._hiddenDatasets.has(id)) {
this._hiddenDatasets.delete(id);
fireEvent(this, "dataset-unhidden", { id });
} else {
this._hiddenDatasets.add(name);
fireEvent(this, "dataset-hidden", { name });
this._hiddenDatasets.add(id);
fireEvent(this, "dataset-hidden", { id });
}
this.requestUpdate("_hiddenDatasets");
}
@ -784,6 +882,10 @@ export class HaChartBase extends LitElement {
flex-direction: column;
gap: 4px;
}
.chart-controls.small {
top: 0;
flex-direction: row;
}
.chart-controls ha-icon-button,
.chart-controls ::slotted(ha-icon-button) {
background: var(--card-background-color);
@ -792,6 +894,11 @@ export class HaChartBase extends LitElement {
color: var(--primary-color);
border: 1px solid var(--divider-color);
}
.chart-controls.small ha-icon-button,
.chart-controls.small ::slotted(ha-icon-button) {
--mdc-icon-button-size: 22px;
--mdc-icon-size: 16px;
}
.chart-controls ha-icon-button.inactive,
.chart-controls ::slotted(ha-icon-button.inactive) {
color: var(--state-inactive-color);
@ -865,8 +972,8 @@ declare global {
"ha-chart-base": HaChartBase;
}
interface HASSDomEvents {
"dataset-hidden": { name: string };
"dataset-unhidden": { name: string };
"dataset-hidden": { id: string };
"dataset-unhidden": { id: string };
"chart-click": ECElementEvent;
}
}

View File

@ -10,12 +10,13 @@ import type { ECOption } from "../../resources/echarts";
import "./ha-chart-base";
import type { HaChartBase } from "./ha-chart-base";
import type { HomeAssistant } from "../../types";
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
import { deepEqual } from "../../common/util/deep-equal";
export interface NetworkNode {
id: string;
name?: string;
category?: number;
label?: string;
value?: number;
symbolSize?: number;
symbol?: string;
@ -29,6 +30,8 @@ export interface NetworkNode {
* Distance from the center, where 0 is the center and 1 is the edge
*/
polarDistance?: number;
x?: number;
y?: number;
}
export interface NetworkLink {
@ -60,7 +63,7 @@ export interface NetworkData {
let GraphChart: typeof import("echarts/lib/chart/graph/install");
@customElement("ha-network-graph")
export class HaNetworkGraph extends LitElement {
export class HaNetworkGraph extends SubscribeMixin(LitElement) {
public chart?: EChartsType;
@property({ attribute: false }) public data!: NetworkData;
@ -77,8 +80,6 @@ export class HaNetworkGraph extends LitElement {
@state() private _showLabels = true;
private _listeners: (() => void)[] = [];
private _nodePositions: Record<string, { x: number; y: number }> = {};
@query("ha-chart-base") private _baseChart?: HaChartBase;
@ -93,35 +94,31 @@ export class HaNetworkGraph extends LitElement {
}
}
public async connectedCallback() {
super.connectedCallback();
this._listeners.push(
protected hassSubscribe() {
return [
listenMediaQuery("(prefers-reduced-motion)", (matches) => {
if (this._reducedMotion !== matches) {
this._reducedMotion = matches;
}
})
);
}
public disconnectedCallback() {
super.disconnectedCallback();
while (this._listeners.length) {
this._listeners.pop()!();
}
}),
];
}
protected render() {
if (!GraphChart) {
return nothing;
}
const isMobile = window.matchMedia(
"all and (max-width: 450px), all and (max-height: 500px)"
).matches;
return html`<ha-chart-base
.hass=${this.hass}
.data=${this._getSeries(
this.data,
this._physicsEnabled,
this._reducedMotion,
this._showLabels
this._showLabels,
isMobile
)}
.options=${this._createOptions(this.data?.categories)}
height="100%"
@ -168,7 +165,8 @@ export class HaNetworkGraph extends LitElement {
type: "inside",
filterMode: "none",
},
})
}),
deepEqual
);
private _getSeries = memoizeOne(
@ -176,79 +174,177 @@ export class HaNetworkGraph extends LitElement {
data: NetworkData,
physicsEnabled: boolean,
reducedMotion: boolean,
showLabels: boolean
) => {
const containerWidth = this.clientWidth;
const containerHeight = this.clientHeight;
return [
{
id: "network",
type: "graph",
layout: physicsEnabled ? "force" : "none",
draggable: true,
roam: true,
selectedMode: "single",
label: {
show: showLabels,
position: "right",
},
emphasis: {
focus: "adjacency",
},
force: {
repulsion: [400, 600],
edgeLength: [200, 300],
gravity: 0.1,
layoutAnimation: !reducedMotion && data.nodes.length < 100,
},
edgeSymbol: ["none", "arrow"],
edgeSymbolSize: 10,
data: data.nodes.map((node) => {
const echartsNode: NonNullable<GraphSeriesOption["data"]>[number] =
{
id: node.id,
name: node.name,
category: node.category,
value: node.value,
symbolSize: node.symbolSize || 30,
symbol: node.symbol || "circle",
itemStyle: node.itemStyle || {},
fixed: node.fixed,
};
if (this._nodePositions[node.id]) {
echartsNode.x = this._nodePositions[node.id].x;
echartsNode.y = this._nodePositions[node.id].y;
} else if (typeof node.polarDistance === "number") {
// set the position of the node at polarDistance from the center in a random direction
const angle = Math.random() * 2 * Math.PI;
echartsNode.x =
containerWidth / 2 +
((Math.cos(angle) * containerWidth) / 2) * node.polarDistance;
echartsNode.y =
containerHeight / 2 +
((Math.sin(angle) * containerHeight) / 2) * node.polarDistance;
this._nodePositions[node.id] = {
x: echartsNode.x,
y: echartsNode.y,
};
}
return echartsNode;
}),
links: data.links.map((link) => ({
...link,
value: link.reverseValue
? Math.max(link.value ?? 0, link.reverseValue)
: link.value,
// remove arrow for bidirectional links
symbolSize: link.reverseValue ? 1 : link.symbolSize, // 0 doesn't work
})),
categories: data.categories || [],
},
] as any;
}
showLabels: boolean,
isMobile: boolean
) => ({
id: "network",
type: "graph",
layout: physicsEnabled ? "force" : "none",
draggable: true,
roam: true,
selectedMode: "single",
label: {
show: showLabels,
position: "right",
},
emphasis: {
focus: isMobile ? "none" : "adjacency",
},
force: {
repulsion: [400, 600],
edgeLength: [200, 350],
gravity: 0.05,
layoutAnimation: !reducedMotion && data.nodes.length < 100,
},
edgeSymbol: ["none", "arrow"],
edgeSymbolSize: 10,
data: this._getSeriesData(data.nodes, data.links, this._nodePositions),
links: data.links.map((link) => ({
...link,
value: link.reverseValue
? Math.max(link.value ?? 0, link.reverseValue)
: link.value,
// remove arrow for bidirectional links
symbolSize: link.reverseValue ? 1 : link.symbolSize, // 0 doesn't work
})),
categories: data.categories || [],
}),
deepEqual
);
private _getSeriesData = memoizeOne(
(
nodes: NetworkNode[],
links: NetworkLink[],
nodePositions: Record<string, { x: number; y: number }>
) =>
this._getPositionedNodes(nodes, links, nodePositions).map(
(node) =>
({
id: node.id,
name: node.name,
category: node.category,
value: node.value,
symbolSize: node.symbolSize || 30,
symbol: node.symbol || "circle",
itemStyle: node.itemStyle || {},
fixed: node.fixed,
x: node.x,
y: node.y,
}) as NonNullable<GraphSeriesOption["data"]>[number]
),
deepEqual
);
private _getPositionedNodes(
nodes: NetworkNode[],
links: NetworkLink[],
nodePositions: Record<string, { x: number; y: number }>
) {
const containerWidth = this.clientWidth;
const containerHeight = this.clientHeight;
const positionedNodes: NetworkNode[] = nodes.map((node) => ({ ...node }));
positionedNodes.forEach((node) => {
if (nodePositions[node.id]) {
node.x = nodePositions[node.id].x;
node.y = nodePositions[node.id].y;
}
if (node.polarDistance === 0) {
if (node.x == null && node.y == null) {
node.x = containerWidth / 2;
node.y = containerHeight / 2;
}
this._positionNodeNeighbors(
node,
positionedNodes,
links,
nodePositions
);
}
});
positionedNodes.forEach((node) => {
// set positions for unconnected nodes
if (node.polarDistance && node.x == null && node.y == null) {
// set the position of the node at polarDistance from the center in a random direction
const angle = Math.random() * 2 * Math.PI;
node.x =
((Math.cos(angle) * containerWidth) / 2) * node.polarDistance +
containerWidth / 2;
node.y =
((Math.sin(angle) * containerHeight) / 2) * node.polarDistance +
containerHeight / 2;
// save the random position
this._nodePositions[node.id] = {
x: node.x,
y: node.y,
};
}
});
return positionedNodes;
}
private _positionNodeNeighbors(
node: NetworkNode,
nodes: NetworkNode[],
links: NetworkLink[],
nodePositions: Record<string, { x: number; y: number }>,
parentId?: string,
minAngle = 0,
maxAngle = Math.PI * 2
) {
const neighbors = links
.map((l) =>
l.source === node.id && l.target !== parentId && !l.ignoreForceLayout
? nodes.find((n) => n.id === l.target)
: l.target === node.id &&
l.source !== parentId &&
!l.ignoreForceLayout
? nodes.find((n) => n.id === l.source)
: null
)
.filter(Boolean) as NetworkNode[];
if (!neighbors.length) {
return;
}
const angle = Math.abs(maxAngle - minAngle) / neighbors.length;
const toContinue: { neighbor: NetworkNode; angle: number }[] = [];
neighbors.forEach((neighbor, i) => {
if (neighbor.x == null && neighbor.y == null) {
const nodeAngle = minAngle + angle * i + angle / 2;
toContinue.push({ neighbor, angle: nodeAngle });
if (nodePositions[neighbor.id]) {
neighbor.x = nodePositions[neighbor.id].x;
neighbor.y = nodePositions[neighbor.id].y;
} else {
neighbor.x = node.x! + (Math.cos(nodeAngle) * this.clientWidth) / 4;
neighbor.y = node.y! + (Math.sin(nodeAngle) * this.clientHeight) / 4;
}
}
});
toContinue.forEach(({ neighbor, angle: neighborAngle }) => {
this._positionNodeNeighbors(
neighbor,
nodes,
links,
nodePositions,
node.id,
neighborAngle - Math.PI / 2,
neighborAngle + Math.PI / 2
);
});
}
private _togglePhysics() {
this._saveNodePositions();
this._physicsEnabled = !this._physicsEnabled;
}
private _toggleLabels() {
this._showLabels = !this._showLabels;
}
private _saveNodePositions() {
const positions = {};
if (this._baseChart?.chart) {
this._baseChart.chart
// @ts-ignore private method but no other way to get the graph positions
@ -258,18 +354,14 @@ export class HaNetworkGraph extends LitElement {
.eachNode((node: any) => {
const layout = node.getLayout();
if (layout) {
this._nodePositions[node.id] = {
positions[node.id] = {
x: layout[0],
y: layout[1],
};
}
});
}
this._physicsEnabled = !this._physicsEnabled;
}
private _toggleLabels() {
this._showLabels = !this._showLabels;
this._nodePositions = positions;
}
static styles = css`

View File

@ -111,7 +111,7 @@ export class StateHistoryChartLine extends LitElement {
this._chartData.forEach((dataset, index) => {
if (
dataset.tooltip?.show === false ||
this._hiddenStats.has(dataset.name as string)
this._hiddenStats.has(dataset.id as string)
)
return;
const param = params.find(
@ -185,11 +185,11 @@ export class StateHistoryChartLine extends LitElement {
};
private _datasetHidden(ev: CustomEvent) {
this._hiddenStats.add(ev.detail.name);
this._hiddenStats.add(ev.detail.id);
}
private _datasetUnhidden(ev: CustomEvent) {
this._hiddenStats.delete(ev.detail.name);
this._hiddenStats.delete(ev.detail.id);
}
public willUpdate(changedProps: PropertyValues) {
@ -226,22 +226,24 @@ export class StateHistoryChartLine extends LitElement {
this.maxYAxis;
if (typeof minYAxis === "number") {
if (this.fitYData) {
minYAxis = ({ min }) => Math.min(min, this.minYAxis!);
minYAxis = ({ min }) =>
Math.min(this._roundYAxis(min, Math.floor), this.minYAxis!);
}
} else if (this.logarithmicScale) {
minYAxis = ({ min }) => {
const value = min > 0 ? min * 0.95 : min * 1.05;
return Math.abs(value) < 1 ? value : Math.floor(value);
return this._roundYAxis(value, Math.floor);
};
}
if (typeof maxYAxis === "number") {
if (this.fitYData) {
maxYAxis = ({ max }) => Math.max(max, this.maxYAxis!);
maxYAxis = ({ max }) =>
Math.max(this._roundYAxis(max, Math.ceil), this.maxYAxis!);
}
} else if (this.logarithmicScale) {
maxYAxis = ({ max }) => {
const value = max > 0 ? max * 1.05 : max * 0.95;
return Math.abs(value) < 1 ? value : Math.ceil(value);
return this._roundYAxis(value, Math.ceil);
};
}
this._chartOptions = {
@ -729,20 +731,17 @@ export class StateHistoryChartLine extends LitElement {
}
private _formatYAxisLabel = (value: number) => {
const formatOptions =
value >= 1 || value <= -1
? undefined
: {
// show the first significant digit for tiny values
maximumFractionDigits: Math.max(
2,
// use the difference to the previous value to determine the number of significant digits #25526
-Math.floor(
Math.log10(Math.abs(value - this._previousYAxisLabelValue || 1))
)
),
};
const label = formatNumber(value, this.hass.locale, formatOptions);
// show the first significant digit for tiny values
const maximumFractionDigits = Math.max(
1,
// use the difference to the previous value to determine the number of significant digits #25526
-Math.floor(
Math.log10(Math.abs(value - this._previousYAxisLabelValue || 1))
)
);
const label = formatNumber(value, this.hass.locale, {
maximumFractionDigits,
});
const width = measureTextWidth(label, 12) + 5;
if (width > this._yWidth) {
this._yWidth = width;
@ -767,6 +766,10 @@ export class StateHistoryChartLine extends LitElement {
}
return value;
}
private _roundYAxis(value: number, roundingFn: (value: number) => number) {
return Math.abs(value) < 1 ? value : roundingFn(value);
}
}
customElements.define("state-history-chart-line", StateHistoryChartLine);

View File

@ -66,6 +66,7 @@ export class StateHistoryChartTimeline extends LitElement {
.options=${this._chartOptions}
.height=${`${this.data.length * 30 + 30}px`}
.data=${this._chartData as ECOption["series"]}
small-controls
@chart-click=${this._handleChartClick}
></ha-chart-base>
`;

View File

@ -31,6 +31,7 @@ import {
} from "../../data/recorder";
import type { ECOption } from "../../resources/echarts";
import type { HomeAssistant } from "../../types";
import type { CustomLegendOption } from "./ha-chart-base";
import "./ha-chart-base";
export const supportedStatTypeMap: Record<StatisticType, StatisticType> = {
@ -96,7 +97,7 @@ export class StatisticsChart extends LitElement {
@state() private _chartData: (LineSeriesOption | BarSeriesOption)[] = [];
@state() private _legendData: string[] = [];
@state() private _legendData: CustomLegendOption["data"];
@state() private _statisticIds: string[] = [];
@ -106,6 +107,8 @@ export class StatisticsChart extends LitElement {
private _computedStyle?: CSSStyleDeclaration;
private _previousYAxisLabelValue = 0;
protected shouldUpdate(changedProps: PropertyValues): boolean {
return changedProps.size > 1 || !changedProps.has("hass");
}
@ -181,12 +184,18 @@ export class StatisticsChart extends LitElement {
}
private _datasetHidden(ev: CustomEvent) {
this._hiddenStats.add(ev.detail.name);
if (!this._legendData) {
return;
}
this._hiddenStats.add(ev.detail.id);
this.requestUpdate("_hiddenStats");
}
private _datasetUnhidden(ev: CustomEvent) {
this._hiddenStats.delete(ev.detail.name);
if (!this._legendData) {
return;
}
this._hiddenStats.delete(ev.detail.id);
this.requestUpdate("_hiddenStats");
}
@ -197,8 +206,8 @@ export class StatisticsChart extends LitElement {
: "";
return params
.map((param, index: number) => {
if (rendered[param.seriesName]) return "";
rendered[param.seriesName] = true;
if (rendered[param.seriesIndex]) return "";
rendered[param.seriesIndex] = true;
const statisticId = this._statisticIds[param.seriesIndex];
const stateObj = this.hass.states[statisticId];
@ -238,22 +247,24 @@ export class StatisticsChart extends LitElement {
this.maxYAxis;
if (typeof minYAxis === "number") {
if (this.fitYData) {
minYAxis = ({ min }) => Math.min(min, this.minYAxis!);
minYAxis = ({ min }) =>
Math.min(this._roundYAxis(min, Math.floor), this.minYAxis!);
}
} else if (this.logarithmicScale) {
minYAxis = ({ min }) => {
const value = min > 0 ? min * 0.95 : min * 1.05;
return Math.abs(value) < 1 ? value : Math.floor(value);
return this._roundYAxis(value, Math.floor);
};
}
if (typeof maxYAxis === "number") {
if (this.fitYData) {
maxYAxis = ({ max }) => Math.max(max, this.maxYAxis!);
maxYAxis = ({ max }) =>
Math.max(this._roundYAxis(max, Math.ceil), this.maxYAxis!);
}
} else if (this.logarithmicScale) {
maxYAxis = ({ max }) => {
const value = max > 0 ? max * 1.05 : max * 0.95;
return Math.abs(value) < 1 ? value : Math.ceil(value);
return this._roundYAxis(value, Math.ceil);
};
}
const endTime = this.endTime ?? new Date();
@ -312,6 +323,9 @@ export class StatisticsChart extends LitElement {
splitLine: {
show: true,
},
axisLabel: {
formatter: this._formatYAxisLabel,
} as any,
},
legend: {
type: "custom",
@ -360,6 +374,7 @@ export class StatisticsChart extends LitElement {
const statisticsData = Object.entries(this.statisticsData);
const totalDataSets: typeof this._chartData = [];
const legendData: {
id: string;
name: string;
color?: ZRColor;
borderColor?: ZRColor;
@ -463,6 +478,8 @@ export class StatisticsChart extends LitElement {
this.statTypes.includes("min") && statisticsHaveType(stats, "min");
const drawBands = [hasMean, hasMax, hasMin].filter(Boolean).length > 1;
const hasState = this.statTypes.includes("state");
const bandTop = hasMax ? "max" : "mean";
const bandBottom = hasMin ? "min" : "mean";
@ -484,7 +501,8 @@ export class StatisticsChart extends LitElement {
const band = drawBands && (type === bandTop || type === bandBottom);
statTypes.push(type);
const borderColor =
band && hasMin && hasMax && hasMean
(band && hasMin && hasMax && hasMean) ||
(hasState && ["change", "sum"].includes(type))
? color + (this.hideLegend ? "00" : "7F")
: color;
const backgroundColor = band ? color + "3F" : color + "7F";
@ -533,6 +551,7 @@ export class StatisticsChart extends LitElement {
: displayedLegend === false;
if (showLegend) {
statLegendData.push({
id: statistic_id,
name,
color: series.color as ZRColor,
borderColor: series.itemStyle?.borderColor,
@ -577,7 +596,7 @@ export class StatisticsChart extends LitElement {
}
dataValues.push(val);
});
if (!this._hiddenStats.has(name)) {
if (!this._hiddenStats.has(statistic_id)) {
pushData(startDate, new Date(stat.end), dataValues);
}
});
@ -591,10 +610,10 @@ export class StatisticsChart extends LitElement {
this.unit = unit;
}
legendData.forEach(({ name, color, borderColor }) => {
legendData.forEach(({ id, name, color, borderColor }) => {
// Add an empty series for the legend
totalDataSets.push({
id: name + "-legend",
id: id,
name: name,
color,
itemStyle: {
@ -607,9 +626,13 @@ export class StatisticsChart extends LitElement {
});
this._chartData = totalDataSets;
if (legendData.length !== this._legendData.length) {
if (legendData.length !== this._legendData?.length) {
// only update the legend if it has changed or it will trigger options update
this._legendData = legendData.map(({ name }) => name);
this._legendData =
legendData.length > 1
? legendData.map(({ id, name }) => ({ id, name }))
: // if there is only one entity, let the base chart handle the legend
undefined;
}
this._statisticIds = statisticIds;
}
@ -634,6 +657,26 @@ export class StatisticsChart extends LitElement {
return value;
}
private _roundYAxis(value: number, roundingFn: (value: number) => number) {
return Math.abs(value) < 1 ? value : roundingFn(value);
}
private _formatYAxisLabel = (value: number) => {
// show the first significant digit for tiny values
const maximumFractionDigits = Math.max(
1,
// use the difference to the previous value to determine the number of significant digits #25526
-Math.floor(
Math.log10(Math.abs(value - this._previousYAxisLabelValue || 1))
)
);
const label = formatNumber(value, this.hass.locale, {
maximumFractionDigits,
});
this._previousYAxisLabelValue = value;
return label;
};
static styles = css`
:host {
display: block;

View File

@ -152,7 +152,10 @@ export class DialogDataTableSettings extends LitElement {
)}
</ha-list>
</ha-sortable>
<ha-button slot="secondaryAction" @click=${this._reset}
<ha-button
appearance="plain"
slot="secondaryAction"
@click=${this._reset}
>${localize("ui.components.data-table.settings.restore")}</ha-button
>
<ha-button slot="primaryAction" @click=${this.closeDialog}>

View File

@ -72,6 +72,7 @@ export interface DataTableColumnData<T = any> extends DataTableSortColumnData {
label?: TemplateResult | string;
type?:
| "numeric"
| "ip"
| "icon"
| "icon-button"
| "overflow"
@ -506,7 +507,9 @@ export class HaDataTable extends LitElement {
this.hasFab,
this.groupColumn,
this.groupOrder,
this._collapsedGroups
this._collapsedGroups,
this.sortColumn,
this.sortDirection
)}
.keyFunction=${this._keyFunction}
.renderItem=${renderRow}
@ -701,22 +704,37 @@ export class HaDataTable extends LitElement {
hasFab: boolean,
groupColumn: string | undefined,
groupOrder: string[] | undefined,
collapsedGroups: string[]
collapsedGroups: string[],
sortColumn: string | undefined,
sortDirection: SortingDirection
) => {
if (appendRow || hasFab || groupColumn) {
let items = [...data];
if (groupColumn) {
const isGroupSortColumn = sortColumn === groupColumn;
const grouped = groupBy(items, (item) => item[groupColumn]);
if (grouped.undefined) {
// make sure ungrouped items are at the bottom
grouped[UNDEFINED_GROUP_KEY] = grouped.undefined;
delete grouped.undefined;
}
const sorted: Record<string, DataTableRowData[]> = Object.keys(
const sortedEntries: [string, DataTableRowData[]][] = Object.keys(
grouped
)
.sort((a, b) => {
if (!groupOrder && isGroupSortColumn) {
const comparison = stringCompare(
a,
b,
this.hass.locale.language
);
if (sortDirection === "asc") {
return comparison;
}
return comparison * -1;
}
const orderA = groupOrder?.indexOf(a) ?? -1;
const orderB = groupOrder?.indexOf(b) ?? -1;
if (orderA !== orderB) {
@ -734,12 +752,18 @@ export class HaDataTable extends LitElement {
this.hass.locale.language
);
})
.reduce((obj, key) => {
obj[key] = grouped[key];
return obj;
}, {});
.reduce(
(entries, key) => {
const entry: [string, DataTableRowData[]] = [key, grouped[key]];
entries.push(entry);
return entries;
},
[] as [string, DataTableRowData[]][]
);
const groupedItems: DataTableRowData[] = [];
Object.entries(sorted).forEach(([groupName, rows]) => {
sortedEntries.forEach(([groupName, rows]) => {
const collapsed = collapsedGroups.includes(groupName);
groupedItems.push({
append: true,
@ -835,7 +859,9 @@ export class HaDataTable extends LitElement {
this.hasFab,
this.groupColumn,
this.groupOrder,
this._collapsedGroups
this._collapsedGroups,
this.sortColumn,
this.sortDirection
);
if (
@ -906,7 +932,7 @@ export class HaDataTable extends LitElement {
.find((el) =>
[
"ha-checkbox",
"mwc-button",
"ha-button",
"ha-button",
"ha-icon-button",
"ha-assist-chip",

View File

@ -1,5 +1,5 @@
import { expose } from "comlink";
import { stringCompare } from "../../common/string/compare";
import { stringCompare, ipCompare } from "../../common/string/compare";
import { stripDiacritics } from "../../common/string/strip-diacritics";
import type {
ClonedDataTableColumnData,
@ -57,6 +57,8 @@ const sortData = (
if (column.type === "numeric") {
valA = isNaN(valA) ? undefined : Number(valA);
valB = isNaN(valB) ? undefined : Number(valB);
} else if (column.type === "ip") {
return sort * ipCompare(valA, valB);
} else if (typeof valA === "string" && typeof valB === "string") {
return sort * stringCompare(valA, valB, language);
}

View File

@ -1,9 +1,11 @@
import { mdiDrag } from "@mdi/js";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../common/dom/fire_event";
import { isValidEntityId } from "../../common/entity/valid_entity_id";
import type { HomeAssistant, ValueChangedEvent } from "../../types";
import "../ha-sortable";
import "./ha-entity-picker";
import type { HaEntityPickerEntityFilterFunc } from "./ha-entity-picker";
@ -76,6 +78,9 @@ class HaEntitiesPicker extends LitElement {
@property({ attribute: false, type: Array }) public createDomains?: string[];
@property({ type: Boolean })
public reorder = false;
protected render() {
if (!this.hass) {
return nothing;
@ -84,28 +89,44 @@ class HaEntitiesPicker extends LitElement {
const currentEntities = this._currentEntities;
return html`
${this.label ? html`<label>${this.label}</label>` : nothing}
${currentEntities.map(
(entityId) => html`
<div>
<ha-entity-picker
allow-custom-entity
.curValue=${entityId}
.hass=${this.hass}
.includeDomains=${this.includeDomains}
.excludeDomains=${this.excludeDomains}
.includeEntities=${this.includeEntities}
.excludeEntities=${this.excludeEntities}
.includeDeviceClasses=${this.includeDeviceClasses}
.includeUnitOfMeasurement=${this.includeUnitOfMeasurement}
.entityFilter=${this.entityFilter}
.value=${entityId}
.disabled=${this.disabled}
.createDomains=${this.createDomains}
@value-changed=${this._entityChanged}
></ha-entity-picker>
</div>
`
)}
<ha-sortable
.disabled=${!this.reorder || this.disabled}
handle-selector=".entity-handle"
@item-moved=${this._entityMoved}
>
<div class="list">
${currentEntities.map(
(entityId) => html`
<div class="entity">
<ha-entity-picker
allow-custom-entity
.curValue=${entityId}
.hass=${this.hass}
.includeDomains=${this.includeDomains}
.excludeDomains=${this.excludeDomains}
.includeEntities=${this.includeEntities}
.excludeEntities=${this.excludeEntities}
.includeDeviceClasses=${this.includeDeviceClasses}
.includeUnitOfMeasurement=${this.includeUnitOfMeasurement}
.entityFilter=${this.entityFilter}
.value=${entityId}
.disabled=${this.disabled}
.createDomains=${this.createDomains}
@value-changed=${this._entityChanged}
></ha-entity-picker>
${this.reorder
? html`
<ha-svg-icon
class="entity-handle"
.path=${mdiDrag}
></ha-svg-icon>
`
: nothing}
</div>
`
)}
</div>
</ha-sortable>
<div>
<ha-entity-picker
allow-custom-entity
@ -131,6 +152,17 @@ class HaEntitiesPicker extends LitElement {
`;
}
private _entityMoved(e: CustomEvent) {
e.stopPropagation();
const { oldIndex, newIndex } = e.detail;
const currentEntities = this._currentEntities;
const movedEntity = currentEntities[oldIndex];
const newEntities = [...currentEntities];
newEntities.splice(oldIndex, 1);
newEntities.splice(newIndex, 0, movedEntity);
this._updateEntities(newEntities);
}
private _excludeEntities = memoizeOne(
(
value: string[] | undefined,
@ -201,6 +233,19 @@ class HaEntitiesPicker extends LitElement {
display: block;
margin: 0 0 8px;
}
.entity {
display: flex;
flex-direction: row;
align-items: center;
}
.entity ha-entity-picker {
flex: 1;
}
.entity-handle {
padding: 8px;
cursor: move; /* fallback if grab cursor is unsupported */
cursor: grab;
}
`;
}

View File

@ -2,18 +2,24 @@ import type { HassEntity } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { LitElement, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { computeAttributeNameDisplay } from "../../common/entity/compute_attribute_display";
import { ensureArray } from "../../common/array/ensure-array";
import { fireEvent } from "../../common/dom/fire_event";
import type { HomeAssistant, ValueChangedEvent } from "../../types";
import "../ha-combo-box";
import type { HaComboBox } from "../ha-combo-box";
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
interface AttributeOption {
value: string;
label: string;
}
@customElement("ha-entity-attribute-picker")
class HaEntityAttributePicker extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public entityId?: string;
@property({ attribute: false }) public entityId?: string | string[];
/**
* List of attributes to be hidden.
@ -48,23 +54,40 @@ class HaEntityAttributePicker extends LitElement {
}
protected updated(changedProps: PropertyValues) {
if (changedProps.has("_opened") && this._opened) {
const entityState = this.entityId
? this.hass.states[this.entityId]
: undefined;
(this._comboBox as any).items = entityState
? Object.keys(entityState.attributes)
.filter((key) => !this.hideAttributes?.includes(key))
.map((key) => ({
value: key,
label: computeAttributeNameDisplay(
this.hass.localize,
entityState,
this.hass.entities,
key
),
}))
: [];
if (
(changedProps.has("_opened") && this._opened) ||
changedProps.has("entityId") ||
changedProps.has("attribute")
) {
const entityIds = this.entityId ? ensureArray(this.entityId) : [];
const entitiesOptions = entityIds.map<AttributeOption[]>((entityId) => {
const stateObj = this.hass.states[entityId];
if (!stateObj) {
return [];
}
const attributes = Object.keys(stateObj.attributes).filter(
(a) => !this.hideAttributes?.includes(a)
);
return attributes.map((a) => ({
value: a,
label: this.hass.formatEntityAttributeName(stateObj, a),
}));
});
const options: AttributeOption[] = [];
const optionsSet = new Set<string>();
for (const entityOptions of entitiesOptions) {
for (const option of entityOptions) {
if (!optionsSet.has(option.value)) {
optionsSet.add(option.value);
options.push(option);
}
}
}
(this._comboBox as any).filteredItems = options;
}
}
@ -73,21 +96,10 @@ class HaEntityAttributePicker extends LitElement {
return nothing;
}
const stateObj = this.hass.states[this.entityId!] as HassEntity | undefined;
return html`
<ha-combo-box
.hass=${this.hass}
.value=${this.value
? stateObj
? computeAttributeNameDisplay(
this.hass.localize,
stateObj,
this.hass.entities,
this.value
)
: this.value
: ""}
.value=${this.value}
.autofocus=${this.autofocus}
.label=${this.label ??
this.hass.localize(
@ -97,6 +109,7 @@ class HaEntityAttributePicker extends LitElement {
.required=${this.required}
.helper=${this.helper}
.allowCustomValue=${this.allowCustomValue}
item-id-path="value"
item-value-path="value"
item-label-path="label"
@opened-changed=${this._openedChanged}
@ -106,12 +119,28 @@ class HaEntityAttributePicker extends LitElement {
`;
}
private get _value() {
return this.value || "";
}
private _openedChanged(ev: ValueChangedEvent<boolean>) {
this._opened = ev.detail.value;
}
private _valueChanged(ev: ValueChangedEvent<string>) {
this.value = ev.detail.value;
ev.stopPropagation();
const newValue = ev.detail.value;
if (newValue !== this._value) {
this._setValue(newValue);
}
}
private _setValue(value: string) {
this.value = value;
setTimeout(() => {
fireEvent(this, "value-changed", { value });
fireEvent(this, "change");
}, 0);
}
}

View File

@ -2,6 +2,7 @@ import type { HassEntity } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { LitElement, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { ensureArray } from "../../common/array/ensure-array";
import { fireEvent } from "../../common/dom/fire_event";
import { getStates } from "../../common/entity/get_states";
import type { HomeAssistant, ValueChangedEvent } from "../../types";
@ -10,11 +11,16 @@ import type { HaComboBox } from "../ha-combo-box";
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
interface StateOption {
value: string;
label: string;
}
@customElement("ha-entity-state-picker")
class HaEntityStatePicker extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public entityId?: string;
@property({ attribute: false }) public entityId?: string | string[];
@property() public attribute?: string;
@ -30,6 +36,9 @@ class HaEntityStatePicker extends LitElement {
@property({ type: Boolean, attribute: "allow-custom-value" })
public allowCustomValue;
@property({ attribute: false })
public hideStates?: string[];
@property() public label?: string;
@property() public value?: string;
@ -51,24 +60,42 @@ class HaEntityStatePicker extends LitElement {
changedProps.has("attribute") ||
changedProps.has("extraOptions")
) {
const stateObj = this.entityId
? this.hass.states[this.entityId]
: undefined;
(this._comboBox as any).items = [
...(this.extraOptions ?? []),
...(this.entityId && stateObj
? getStates(this.hass, stateObj, this.attribute).map((key) => ({
value: key,
label: !this.attribute
? this.hass.formatEntityState(stateObj, key)
: this.hass.formatEntityAttributeValue(
stateObj,
this.attribute,
key
),
}))
: []),
];
const entityIds = this.entityId ? ensureArray(this.entityId) : [];
const entitiesOptions = entityIds.map<StateOption[]>((entityId) => {
const stateObj = this.hass.states[entityId];
if (!stateObj) {
return [];
}
const states = getStates(this.hass, stateObj, this.attribute).filter(
(s) => !this.hideStates?.includes(s)
);
return states.map((s) => ({
value: s,
label: this.attribute
? this.hass.formatEntityAttributeValue(stateObj, this.attribute, s)
: this.hass.formatEntityState(stateObj, s),
}));
});
const options: StateOption[] = [];
const optionsSet = new Set<string>();
for (const entityOptions of entitiesOptions) {
for (const option of entityOptions) {
if (!optionsSet.has(option.value)) {
optionsSet.add(option.value);
options.push(option);
}
}
}
if (this.extraOptions) {
options.unshift(...this.extraOptions);
}
(this._comboBox as any).filteredItems = options;
}
}
@ -88,6 +115,7 @@ class HaEntityStatePicker extends LitElement {
.required=${this.required}
.helper=${this.helper}
.allowCustomValue=${this.allowCustomValue}
item-id-path="value"
item-value-path="value"
item-label-path="label"
@opened-changed=${this._openedChanged}

View File

@ -438,10 +438,8 @@ export class HaStatisticPicker extends LitElement {
`
: nothing}
<span slot="headline">${item.primary} </span>
${item.secondary || item.type
? html`<span slot="supporting-text"
>${item.secondary} - ${item.type}</span
>`
${item.secondary
? html`<span slot="supporting-text">${item.secondary}</span>`
: nothing}
${item.statistic_id && showEntityId
? html`<span slot="supporting-text" class="code">

View File

@ -173,7 +173,6 @@ class HaStatisticsPicker extends LitElement {
static styles = css`
:host {
width: 200px;
display: block;
}
ha-statistic-picker {

View File

@ -131,7 +131,6 @@ class HaAlert extends LitElement {
margin-top: 2px;
font-weight: var(--ha-font-weight-bold);
}
.action mwc-button,
.action ha-icon-button {
--mdc-theme-primary: var(--primary-text-color);
--mdc-icon-button-size: 36px;

View File

@ -366,6 +366,7 @@ export class HaAreaPicker extends LitElement {
.hass=${this.hass}
.autofocus=${this.autofocus}
.label=${this.label}
.helper=${this.helper}
.notFoundLabel=${this.hass.localize(
"ui.components.area-picker.no_match"
)}
@ -410,6 +411,7 @@ export class HaAreaPicker extends LitElement {
}
},
});
return;
}
this._setValue(value);

View File

@ -0,0 +1,287 @@
import { mdiDrag, mdiTextureBox } from "@mdi/js";
import type { TemplateResult } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
import memoizeOne from "memoize-one";
import { fireEvent } from "../common/dom/fire_event";
import { computeFloorName } from "../common/entity/compute_floor_name";
import { getAreaContext } from "../common/entity/context/get_area_context";
import { areaCompare } from "../data/area_registry";
import type { FloorRegistryEntry } from "../data/floor_registry";
import { getFloors } from "../panels/lovelace/strategies/areas/helpers/areas-strategy-helper";
import type { HomeAssistant } from "../types";
import "./ha-expansion-panel";
import "./ha-floor-icon";
import "./ha-items-display-editor";
import type { DisplayItem, DisplayValue } from "./ha-items-display-editor";
import "./ha-svg-icon";
import "./ha-textfield";
export interface AreasFloorsDisplayValue {
areas_display?: {
hidden?: string[];
order?: string[];
};
floors_display?: {
order?: string[];
};
}
const UNASSIGNED_FLOOR = "__unassigned__";
@customElement("ha-areas-floors-display-editor")
export class HaAreasFloorsDisplayEditor extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public label?: string;
@property({ attribute: false }) public value?: AreasFloorsDisplayValue;
@property() public helper?: string;
@property({ type: Boolean }) public disabled = false;
@property({ type: Boolean }) public required = false;
@property({ attribute: false }) public actionsRenderer?: () =>
| TemplateResult<1>
| typeof nothing;
@property({ type: Boolean, attribute: "show-navigation-button" })
public showNavigationButton = false;
protected render(): TemplateResult {
const groupedAreasItems = this._groupedAreasItems(
this.hass.areas,
this.hass.floors
);
const filteredFloors = this._sortedFloors(
this.hass.floors,
this.value?.floors_display?.order
).filter(
(floor) =>
// Only include floors that have areas assigned to them
groupedAreasItems[floor.floor_id]?.length > 0
);
const value: DisplayValue = {
order: this.value?.areas_display?.order ?? [],
hidden: this.value?.areas_display?.hidden ?? [],
};
const canReorderFloors =
filteredFloors.filter((floor) => floor.floor_id !== UNASSIGNED_FLOOR)
.length > 1;
return html`
${this.label ? html`<label>${this.label}</label>` : nothing}
<ha-sortable
draggable-selector=".draggable"
handle-selector=".handle"
@item-moved=${this._floorMoved}
.disabled=${this.disabled || !canReorderFloors}
invert-swap
>
<div>
${repeat(
filteredFloors,
(floor) => floor.floor_id,
(floor: FloorRegistryEntry) => html`
<ha-expansion-panel
outlined
.header=${computeFloorName(floor)}
left-chevron
class=${floor.floor_id === UNASSIGNED_FLOOR ? "" : "draggable"}
>
<ha-floor-icon
slot="leading-icon"
.floor=${floor}
></ha-floor-icon>
${floor.floor_id === UNASSIGNED_FLOOR || !canReorderFloors
? nothing
: html`
<ha-svg-icon
class="handle"
slot="icons"
.path=${mdiDrag}
></ha-svg-icon>
`}
<ha-items-display-editor
.hass=${this.hass}
.items=${groupedAreasItems[floor.floor_id]}
.value=${value}
.floorId=${floor.floor_id}
.actionsRenderer=${this.actionsRenderer}
@value-changed=${this._areaDisplayChanged}
.showNavigationButton=${this.showNavigationButton}
></ha-items-display-editor>
</ha-expansion-panel>
`
)}
</div>
</ha-sortable>
`;
}
private _groupedAreasItems = memoizeOne(
(
hassAreas: HomeAssistant["areas"],
// update items if floors change
_hassFloors: HomeAssistant["floors"]
): Record<string, DisplayItem[]> => {
const compare = areaCompare(hassAreas);
const areas = Object.values(hassAreas).sort((areaA, areaB) =>
compare(areaA.area_id, areaB.area_id)
);
const groupedItems: Record<string, DisplayItem[]> = areas.reduce(
(acc, area) => {
const { floor } = getAreaContext(area, this.hass!);
const floorId = floor?.floor_id ?? UNASSIGNED_FLOOR;
if (!acc[floorId]) {
acc[floorId] = [];
}
acc[floorId].push({
value: area.area_id,
label: area.name,
icon: area.icon ?? undefined,
iconPath: mdiTextureBox,
});
return acc;
},
{} as Record<string, DisplayItem[]>
);
return groupedItems;
}
);
private _sortedFloors = memoizeOne(
(
hassFloors: HomeAssistant["floors"],
order: string[] | undefined
): FloorRegistryEntry[] => {
const floors = getFloors(hassFloors, order);
const noFloors = floors.length === 0;
floors.push({
floor_id: UNASSIGNED_FLOOR,
name: noFloors
? this.hass.localize("ui.panel.lovelace.strategy.areas.areas")
: this.hass.localize("ui.panel.lovelace.strategy.areas.other_areas"),
icon: null,
level: null,
aliases: [],
created_at: 0,
modified_at: 0,
});
return floors;
}
);
private _floorMoved(ev: CustomEvent<HASSDomEvents["item-moved"]>) {
ev.stopPropagation();
const newIndex = ev.detail.newIndex;
const oldIndex = ev.detail.oldIndex;
const floorIds = this._sortedFloors(
this.hass.floors,
this.value?.floors_display?.order
).map((floor) => floor.floor_id);
const newOrder = [...floorIds];
const movedFloorId = newOrder.splice(oldIndex, 1)[0];
newOrder.splice(newIndex, 0, movedFloorId);
const newValue: AreasFloorsDisplayValue = {
areas_display: this.value?.areas_display,
floors_display: {
order: newOrder,
},
};
if (newValue.floors_display?.order?.length === 0) {
delete newValue.floors_display.order;
}
fireEvent(this, "value-changed", { value: newValue });
}
private async _areaDisplayChanged(ev: CustomEvent<{ value: DisplayValue }>) {
ev.stopPropagation();
const value = ev.detail.value;
const currentFloorId = (ev.currentTarget as any).floorId;
const floorIds = this._sortedFloors(
this.hass.floors,
this.value?.floors_display?.order
).map((floor) => floor.floor_id);
const oldAreaDisplay = this.value?.areas_display ?? {};
const oldHidden = oldAreaDisplay?.hidden ?? [];
const oldOrder = oldAreaDisplay?.order ?? [];
const newHidden: string[] = [];
const newOrder: string[] = [];
for (const floorId of floorIds) {
if ((currentFloorId ?? UNASSIGNED_FLOOR) === floorId) {
newHidden.push(...(value.hidden ?? []));
newOrder.push(...(value.order ?? []));
continue;
}
const hidden = oldHidden.filter((areaId) => {
const id = this.hass.areas[areaId]?.floor_id ?? UNASSIGNED_FLOOR;
return id === floorId;
});
if (hidden?.length) {
newHidden.push(...hidden);
}
const order = oldOrder.filter((areaId) => {
const id = this.hass.areas[areaId]?.floor_id ?? UNASSIGNED_FLOOR;
return id === floorId;
});
if (order?.length) {
newOrder.push(...order);
}
}
const newValue: AreasFloorsDisplayValue = {
areas_display: {
hidden: newHidden,
order: newOrder,
},
floors_display: this.value?.floors_display,
};
if (newValue.areas_display?.hidden?.length === 0) {
delete newValue.areas_display.hidden;
}
if (newValue.areas_display?.order?.length === 0) {
delete newValue.areas_display.order;
}
if (newValue.floors_display?.order?.length === 0) {
delete newValue.floors_display.order;
}
fireEvent(this, "value-changed", { value: newValue });
}
static styles = css`
ha-expansion-panel {
margin-bottom: 8px;
--expansion-panel-summary-padding: 0 16px;
}
ha-expansion-panel [slot="leading-icon"] {
margin-inline-end: 16px;
}
label {
display: block;
font-weight: var(--ha-font-weight-bold);
margin-bottom: 8px;
}
`;
}
declare global {
interface HTMLElementTagNameMap {
"ha-areas-floors-display-editor": HaAreasFloorsDisplayEditor;
}
}

View File

@ -0,0 +1,61 @@
import { css, html, LitElement, type PropertyValues } from "lit";
import { customElement, property } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
import parseAspectRatio from "../common/util/parse-aspect-ratio";
const DEFAULT_ASPECT_RATIO = "16:9";
@customElement("ha-aspect-ratio")
export class HaAspectRatio extends LitElement {
@property({ type: String, attribute: "aspect-ratio" })
public aspectRatio?: string;
private _ratio: {
w: number;
h: number;
} | null = null;
public willUpdate(changedProps: PropertyValues) {
if (changedProps.has("aspect_ratio") || this._ratio === null) {
this._ratio = this.aspectRatio
? parseAspectRatio(this.aspectRatio)
: null;
if (this._ratio === null || this._ratio.w <= 0 || this._ratio.h <= 0) {
this._ratio = parseAspectRatio(DEFAULT_ASPECT_RATIO);
}
}
}
protected render(): unknown {
if (!this.aspectRatio) {
return html`<slot></slot>`;
}
return html`
<div
class="ratio"
style=${styleMap({
paddingBottom: `${((100 * this._ratio!.h) / this._ratio!.w).toFixed(2)}%`,
})}
>
<slot></slot>
</div>
`;
}
static styles = css`
.ratio ::slotted(*) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
`;
}
declare global {
interface HTMLElementTagNameMap {
"ha-aspect-ratio": HaAspectRatio;
}
}

View File

@ -509,7 +509,7 @@ export class HaAssistChat extends LitElement {
this.requestUpdate("_conversation");
},
processEvent: (event: PipelineRunEvent) => {
if (event.type === "intent-progress") {
if (event.type === "intent-progress" && event.data.chat_log_delta) {
const delta = event.data.chat_log_delta;
// new message

View File

@ -271,7 +271,9 @@ export class HaBaseTimeInput extends LitElement {
</ha-select>`}
</div>
${this.helper
? html`<ha-input-helper-text>${this.helper}</ha-input-helper-text>`
? html`<ha-input-helper-text .disabled=${this.disabled}
>${this.helper}</ha-input-helper-text
>`
: nothing}
`;
}

View File

@ -1,4 +1,3 @@
import type { Button } from "@material/mwc-button";
import type { Corner, Menu, MenuCorner } from "@material/mwc-menu";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
@ -6,6 +5,7 @@ import { customElement, property, query } from "lit/decorators";
import { mainWindow } from "../common/dom/get_main_window";
import { FOCUS_TARGET } from "../dialogs/make-dialog-manager";
import type { HaIconButton } from "./ha-icon-button";
import type { HaButton } from "./ha-button";
import "./ha-menu";
@customElement("ha-button-menu")
@ -93,8 +93,8 @@ export class HaButtonMenu extends LitElement {
private get _triggerButton() {
return this.querySelector(
'ha-icon-button[slot="trigger"], ha-button[slot="trigger"], mwc-button[slot="trigger"]'
) as HaIconButton | Button | null;
'ha-icon-button[slot="trigger"], ha-button[slot="trigger"]'
) as HaIconButton | HaButton | null;
}
private _setTriggerAria() {

View File

@ -1,33 +1,177 @@
import { Button } from "@material/mwc-button";
import { css } from "lit";
import Button from "@awesome.me/webawesome/dist/components/button/button";
import { css, type CSSResultGroup } from "lit";
import { customElement } from "lit/decorators";
import { styles } from "@material/mwc-button/styles.css";
import { StateSet } from "../resources/polyfills/stateset";
export type Appearance = "accent" | "filled" | "outlined" | "plain";
/**
* Home Assistant button component
*
* @element ha-button
* @extends {Button}
*
* @summary
* A stylable button component supporting Home Assistant theming, variants, and appearances based on webawesome button.
*
* @slot - Label of the button
* @slot start - The prefix container (usually for icons).
* @slot end - The suffix container (usually for icons).
*
* @csspart base - The component's base wrapper.
* @csspart start - The container that wraps the prefix.
* @csspart label - The button's label.
* @csspart end - The container that wraps the suffix.
* @csspart caret - The button's caret icon, an `<sl-icon>` element.
* @csspart spinner - The spinner that shows when the button is in the loading state.
*
* @cssprop --ha-button-height - The height of the button.
* @cssprop --ha-button-radius - The border radius of the button. defaults to `var(--wa-border-radius-pill)`.
*
* @attr {("small"|"medium")} size - Sets the button size.
* @attr {("brand"|"neutral"|"danger"|"warning"|"success")} variant - Sets the button color variant. "primary" is default.
* @attr {("accent"|"filled"|"plain")} appearance - Sets the button appearance.
* @attr {boolean} hideContent - Hides the button content (for overlays).
*/
@customElement("ha-button")
export class HaButton extends Button {
static override styles = [
styles,
css`
::slotted([slot="icon"]) {
margin-inline-start: 0px;
margin-inline-end: 8px;
direction: var(--direction);
display: block;
}
.mdc-button {
height: var(--button-height, 36px);
}
.trailing-icon {
display: flex;
}
.slot-container {
overflow: var(--button-slot-container-overflow, visible);
}
:host([destructive]) {
--mdc-theme-primary: var(--error-color);
}
`,
];
variant: "brand" | "neutral" | "success" | "warning" | "danger" = "brand";
attachInternals() {
const internals = super.attachInternals();
Object.defineProperty(internals, "states", {
value: new StateSet(this, internals.states),
});
return internals;
}
static get styles(): CSSResultGroup {
return [
Button.styles,
css`
.button {
/* set theme vars */
--wa-form-control-padding-inline: 16px;
--wa-font-weight-action: var(--ha-font-weight-medium);
--wa-border-radius-pill: 9999px;
--wa-form-control-border-radius: var(
--ha-button-radius,
var(--wa-border-radius-pill)
);
--wa-form-control-height: var(
--ha-button-height,
var(--button-height, 40px)
);
font-size: var(--ha-font-size-m);
}
:host([size="small"]) .button {
--wa-form-control-height: var(
--ha-button-height,
var(--button-height, 32px)
);
font-size: var(--wa-font-size-s, var(--ha-font-size-m));
}
:host([variant="brand"]) {
--color-fill-normal-active: var(--color-fill-primary-normal-active);
--color-fill-normal-hover: var(--color-fill-primary-normal-hover);
--color-fill-loud-active: var(--color-fill-primary-loud-active);
--color-fill-loud-hover: var(--color-fill-primary-loud-hover);
}
:host([variant="neutral"]) {
--color-fill-normal-active: var(--color-fill-neutral-normal-active);
--color-fill-normal-hover: var(--color-fill-neutral-normal-hover);
--color-fill-loud-active: var(--color-fill-neutral-loud-active);
--color-fill-loud-hover: var(--color-fill-neutral-loud-hover);
}
:host([variant="success"]) {
--color-fill-normal-active: var(--color-fill-success-normal-active);
--color-fill-normal-hover: var(--color-fill-success-normal-hover);
--color-fill-loud-active: var(--color-fill-success-loud-active);
--color-fill-loud-hover: var(--color-fill-success-loud-hover);
}
:host([variant="warning"]) {
--color-fill-normal-active: var(--color-fill-warning-normal-active);
--color-fill-normal-hover: var(--color-fill-warning-normal-hover);
--color-fill-loud-active: var(--color-fill-warning-loud-active);
--color-fill-loud-hover: var(--color-fill-warning-loud-hover);
}
:host([variant="danger"]) {
--color-fill-normal-active: var(--color-fill-danger-normal-active);
--color-fill-normal-hover: var(--color-fill-danger-normal-hover);
--color-fill-loud-active: var(--color-fill-danger-loud-active);
--color-fill-loud-hover: var(--color-fill-danger-loud-hover);
}
:host([appearance~="plain"]) .button {
color: var(--wa-color-on-normal);
}
:host([appearance~="plain"]) .button.disabled {
background-color: var(--transparent-none);
color: var(--color-on-disabled-quiet);
}
:host([appearance~="outlined"]) .button.disabled {
background-color: var(--transparent-none);
color: var(--color-on-disabled-quiet);
}
@media (hover: hover) {
:host([appearance~="filled"])
.button:not(.disabled):not(.loading):hover {
background-color: var(--color-fill-normal-hover);
}
:host([appearance~="accent"])
.button:not(.disabled):not(.loading):hover {
background-color: var(--color-fill-loud-hover);
}
:host([appearance~="plain"])
.button:not(.disabled):not(.loading):hover {
color: var(--wa-color-on-normal);
}
}
:host([appearance~="filled"])
.button:not(.disabled):not(.loading):active {
background-color: var(--color-fill-normal-active);
}
:host([appearance~="filled"]) .button.disabled {
background-color: var(--color-fill-disabled-normal-resting);
color: var(--color-on-disabled-normal);
}
:host([appearance~="accent"]) .button {
background-color: var(
--wa-color-fill-loud,
var(--wa-color-neutral-fill-loud)
);
}
:host([appearance~="accent"])
.button:not(.disabled):not(.loading):active {
background-color: var(--color-fill-loud-active);
}
:host([appearance~="accent"]) .button.disabled {
background-color: var(--color-fill-disabled-loud-resting);
color: var(--color-on-disabled-loud);
}
:host([loading]) {
pointer-events: none;
}
.button.disabled {
opacity: 1;
}
`,
];
}
}
declare global {

View File

@ -63,7 +63,7 @@ export class HaCard extends LitElement {
:host ::slotted(.card-actions) {
border-top: 1px solid var(--divider-color, #e8e8e8);
padding: 5px 16px;
padding: 8px;
}
`;

View File

@ -6,6 +6,7 @@ import type {
} from "@codemirror/autocomplete";
import type { Extension, TransactionSpec } from "@codemirror/state";
import type { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view";
import { mdiArrowExpand, mdiArrowCollapse } from "@mdi/js";
import type { HassEntities } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { css, ReactiveElement } from "lit";
@ -15,6 +16,7 @@ import { fireEvent } from "../common/dom/fire_event";
import { stopPropagation } from "../common/dom/stop_propagation";
import type { HomeAssistant } from "../types";
import "./ha-icon";
import "./ha-icon-button";
declare global {
interface HASSDomEvents {
@ -59,8 +61,13 @@ export class HaCodeEditor extends ReactiveElement {
@property({ type: Boolean }) public error = false;
@property({ type: Boolean, attribute: "disable-fullscreen" })
public disableFullscreen = false;
@state() private _value = "";
@state() private _isFullscreen = false;
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
private _loadedCodeMirror?: typeof import("../resources/codemirror");
@ -92,6 +99,7 @@ export class HaCodeEditor extends ReactiveElement {
this.requestUpdate();
}
this.addEventListener("keydown", stopPropagation);
this.addEventListener("keydown", this._handleKeyDown);
// This is unreachable as editor will not exist yet,
// but focus should not behave like this for good a11y.
// (@steverep to fix in autofocus PR)
@ -106,6 +114,10 @@ export class HaCodeEditor extends ReactiveElement {
public disconnectedCallback() {
super.disconnectedCallback();
this.removeEventListener("keydown", stopPropagation);
this.removeEventListener("keydown", this._handleKeyDown);
if (this._isFullscreen) {
this._toggleFullscreen();
}
this.updateComplete.then(() => {
this.codemirror!.destroy();
delete this.codemirror;
@ -164,6 +176,12 @@ export class HaCodeEditor extends ReactiveElement {
if (changedProps.has("error")) {
this.classList.toggle("error-state", this.error);
}
if (changedProps.has("_isFullscreen")) {
this.classList.toggle("fullscreen", this._isFullscreen);
}
if (changedProps.has("disableFullscreen")) {
this._updateFullscreenButton();
}
}
private get _mode() {
@ -238,8 +256,74 @@ export class HaCodeEditor extends ReactiveElement {
}),
parent: this.renderRoot,
});
this._updateFullscreenButton();
}
private _updateFullscreenButton() {
const existingButton = this.renderRoot.querySelector(".fullscreen-button");
if (this.disableFullscreen) {
// Remove button if it exists and fullscreen is disabled
if (existingButton) {
existingButton.remove();
}
// Exit fullscreen if currently in fullscreen mode
if (this._isFullscreen) {
this._isFullscreen = false;
}
return;
}
// Create button if it doesn't exist
if (!existingButton) {
const button = document.createElement("ha-icon-button");
(button as any).path = this._isFullscreen
? mdiArrowCollapse
: mdiArrowExpand;
button.setAttribute(
"label",
this._isFullscreen ? "Exit fullscreen" : "Enter fullscreen"
);
button.classList.add("fullscreen-button");
// Use bound method to ensure proper this context
button.addEventListener("click", this._handleFullscreenClick);
this.renderRoot.appendChild(button);
} else {
// Update existing button
(existingButton as any).path = this._isFullscreen
? mdiArrowCollapse
: mdiArrowExpand;
existingButton.setAttribute(
"label",
this._isFullscreen ? "Exit fullscreen" : "Enter fullscreen"
);
}
}
private _handleFullscreenClick = (e: Event) => {
e.preventDefault();
e.stopPropagation();
this._toggleFullscreen();
};
private _toggleFullscreen() {
this._isFullscreen = !this._isFullscreen;
this._updateFullscreenButton();
}
private _handleKeyDown = (e: KeyboardEvent) => {
if (this._isFullscreen && e.key === "Escape") {
e.preventDefault();
e.stopPropagation();
this._toggleFullscreen();
} else if (e.key === "F11" && !this.disableFullscreen) {
e.preventDefault();
e.stopPropagation();
this._toggleFullscreen();
}
};
private _getStates = memoizeOne((states: HassEntities): Completion[] => {
if (!states) {
return [];
@ -257,6 +341,126 @@ export class HaCodeEditor extends ReactiveElement {
private _entityCompletions(
context: CompletionContext
): CompletionResult | null | Promise<CompletionResult | null> {
// Check for YAML mode and entity-related fields
if (this.mode === "yaml") {
const currentLine = context.state.doc.lineAt(context.pos);
const lineText = currentLine.text;
// Properties that commonly contain entity IDs
const entityProperties = [
"entity_id",
"entity",
"entities",
"badges",
"devices",
"lights",
"light",
"group_members",
"scene",
"zone",
"zones",
];
// Create regex pattern for all entity properties
const propertyPattern = entityProperties.join("|");
const entityFieldRegex = new RegExp(
`^\\s*(-\\s+)?(${propertyPattern}):\\s*`
);
// Check if we're in an entity field (single entity or list item)
const entityFieldMatch = lineText.match(entityFieldRegex);
const listItemMatch = lineText.match(/^\s*-\s+/);
if (entityFieldMatch) {
// Calculate the position after the entity field
const afterField = currentLine.from + entityFieldMatch[0].length;
// If cursor is after the entity field, show all entities
if (context.pos >= afterField) {
const states = this._getStates(this.hass!.states);
if (!states || !states.length) {
return null;
}
// Find what's already typed after the field
const typedText = context.state.sliceDoc(afterField, context.pos);
// Filter states based on what's typed
const filteredStates = typedText
? states.filter((entityState) =>
entityState.label
.toLowerCase()
.startsWith(typedText.toLowerCase())
)
: states;
return {
from: afterField,
options: filteredStates,
validFor: /^[a-z_]*\.?\w*$/,
};
}
} else if (listItemMatch) {
// Check if this is a list item under an entity_id field
const lineNumber = currentLine.number;
// Look at previous lines to check if we're under an entity_id field
for (let i = lineNumber - 1; i > 0 && i >= lineNumber - 10; i--) {
const prevLine = context.state.doc.line(i);
const prevText = prevLine.text;
// Stop if we hit a non-indented line (new field)
if (
prevText.trim() &&
!prevText.startsWith(" ") &&
!prevText.startsWith("\t")
) {
break;
}
// Check if we found an entity property field
const entityListFieldRegex = new RegExp(
`^\\s*(${propertyPattern}):\\s*$`
);
if (prevText.match(entityListFieldRegex)) {
// We're in a list under an entity field
const afterListMarker = currentLine.from + listItemMatch[0].length;
if (context.pos >= afterListMarker) {
const states = this._getStates(this.hass!.states);
if (!states || !states.length) {
return null;
}
// Find what's already typed after the list marker
const typedText = context.state.sliceDoc(
afterListMarker,
context.pos
);
// Filter states based on what's typed
const filteredStates = typedText
? states.filter((entityState) =>
entityState.label
.toLowerCase()
.startsWith(typedText.toLowerCase())
)
: states;
return {
from: afterListMarker,
options: filteredStates,
validFor: /^[a-z_]*\.?\w*$/,
};
}
}
}
}
}
// Original entity completion logic for non-YAML or when not in entity_id field
const entityWord = context.matchBefore(/[a-z_]{3,}\.\w*/);
if (
@ -340,9 +544,77 @@ export class HaCodeEditor extends ReactiveElement {
};
static styles = css`
:host {
position: relative;
display: block;
}
:host(.error-state) .cm-gutters {
border-color: var(--error-state-color, red);
}
.fullscreen-button {
position: absolute;
top: 8px;
right: 8px;
z-index: 1;
color: var(--secondary-text-color);
background-color: var(--secondary-background-color);
border-radius: 50%;
opacity: 0.9;
transition: opacity 0.2s;
--mdc-icon-button-size: 32px;
--mdc-icon-size: 18px;
/* Ensure button is clickable on iOS */
cursor: pointer;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.fullscreen-button:hover,
.fullscreen-button:active {
opacity: 1;
}
@media (hover: none) {
.fullscreen-button {
opacity: 0.8;
}
}
:host(.fullscreen) {
position: fixed !important;
top: calc(var(--header-height, 56px) + 8px) !important;
left: 8px !important;
right: 8px !important;
bottom: 8px !important;
z-index: 9999 !important;
border-radius: 12px !important;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
overflow: hidden !important;
background-color: var(
--code-editor-background-color,
var(--card-background-color)
) !important;
margin: 0 !important;
padding-top: var(--safe-area-inset-top) !important;
padding-left: var(--safe-area-inset-left) !important;
padding-right: var(--safe-area-inset-right) !important;
padding-bottom: var(--safe-area-inset-bottom) !important;
box-sizing: border-box !important;
display: block !important;
}
:host(.fullscreen) .cm-editor {
height: 100% !important;
max-height: 100% !important;
border-radius: 0 !important;
}
:host(.fullscreen) .fullscreen-button {
top: calc(var(--safe-area-inset-top, 0px) + 8px);
right: calc(var(--safe-area-inset-right, 0px) + 8px);
}
`;
}

View File

@ -19,6 +19,7 @@ import type { HomeAssistant } from "../types";
import "./ha-combo-box-item";
import "./ha-combo-box-textfield";
import "./ha-icon-button";
import "./ha-input-helper-text";
import "./ha-textfield";
import type { HaTextField } from "./ha-textfield";
@ -195,8 +196,6 @@ export class HaComboBox extends LitElement {
></div>`}
.icon=${this.icon}
.invalid=${this.invalid}
.helper=${this.helper}
helperPersistent
.disableSetValue=${this._disableSetValue}
>
<slot name="icon" slot="leadingIcon"></slot>
@ -206,7 +205,7 @@ export class HaComboBox extends LitElement {
role="button"
tabindex="-1"
aria-label=${ifDefined(this.hass?.localize("ui.common.clear"))}
class="clear-button"
class=${`clear-button ${this.label ? "" : "no-label"}`}
.path=${mdiClose}
@click=${this._clearValue}
></ha-svg-icon>`
@ -216,15 +215,24 @@ export class HaComboBox extends LitElement {
tabindex="-1"
aria-label=${ifDefined(this.label)}
aria-expanded=${this.opened ? "true" : "false"}
class="toggle-button"
class=${`toggle-button ${this.label ? "" : "no-label"}`}
.path=${this.opened ? mdiMenuUp : mdiMenuDown}
?disabled=${this.disabled}
@click=${this._toggleOpen}
></ha-svg-icon>
</vaadin-combo-box-light>
${this._renderHelper()}
`;
}
private _renderHelper() {
return this.helper
? html`<ha-input-helper-text .disabled=${this.disabled}
>${this.helper}</ha-input-helper-text
>`
: "";
}
private _defaultRowRenderer: ComboBoxLitRenderer<
string | Record<string, any>
> = (item) => html`
@ -361,7 +369,6 @@ export class HaComboBox extends LitElement {
}
vaadin-combo-box-light {
position: relative;
--vaadin-combo-box-overlay-max-height: calc(45vh - 56px);
}
ha-combo-box-textfield {
width: 100%;
@ -390,6 +397,9 @@ export class HaComboBox extends LitElement {
color: var(--disabled-text-color);
pointer-events: none;
}
.toggle-button.no-label {
top: -3px;
}
.clear-button {
--mdc-icon-size: 20px;
top: -7px;
@ -398,6 +408,12 @@ export class HaComboBox extends LitElement {
inset-inline-end: 36px;
direction: var(--direction);
}
.clear-button.no-label {
top: 0;
}
ha-input-helper-text {
margin-top: 4px;
}
`;
}

View File

@ -1,4 +1,4 @@
import type { PropertyValues, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
@ -17,7 +17,7 @@ export interface ControlSelectOption {
@customElement("ha-control-select")
export class HaControlSelect extends LitElement {
@property({ type: Boolean, reflect: true }) disabled = false;
@property({ type: Boolean }) disabled = false;
@property({ attribute: false }) public options?: ControlSelectOption[];
@ -26,94 +26,70 @@ export class HaControlSelect extends LitElement {
@property({ type: Boolean, reflect: true })
public vertical = false;
@property({ type: Boolean, attribute: "hide-label" })
public hideLabel = false;
@property({ type: Boolean, attribute: "hide-option-label" })
public hideOptionLabel = false;
@property({ type: String })
public label?: string;
@state() private _activeIndex?: number;
protected firstUpdated(changedProperties: PropertyValues): void {
super.firstUpdated(changedProperties);
this.setAttribute("role", "listbox");
if (!this.hasAttribute("tabindex")) {
this.setAttribute("tabindex", "0");
private _handleFocus(ev: FocusEvent) {
if (this.disabled || !this.options) return;
// Only handle focus if coming to the container
if (ev.target === ev.currentTarget) {
// Focus the selected radio or the first one
const selectedIndex =
this.value != null
? this.options.findIndex((option) => option.value === this.value)
: -1;
const focusIndex = selectedIndex !== -1 ? selectedIndex : 0;
this._focusOption(focusIndex);
}
}
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (changedProps.has("_activeIndex")) {
const activeValue =
this._activeIndex != null
? this.options?.[this._activeIndex]?.value
: undefined;
const activedescendant =
activeValue != null ? `option-${activeValue}` : undefined;
this.setAttribute("aria-activedescendant", activedescendant ?? "");
private _focusOption(index: number) {
this._activeIndex = index;
this.requestUpdate();
this.updateComplete.then(() => {
const option = this.shadowRoot?.querySelector(
`#option-${this.options![index].value}`
) as HTMLElement;
option?.focus();
});
}
private _handleBlur(ev: FocusEvent) {
// Only reset if focus is leaving the entire component
if (!this.contains(ev.relatedTarget as Node)) {
this._activeIndex = undefined;
}
if (changedProps.has("vertical")) {
const orientation = this.vertical ? "vertical" : "horizontal";
this.setAttribute("aria-orientation", orientation);
}
}
public connectedCallback(): void {
super.connectedCallback();
this._setupListeners();
}
public disconnectedCallback(): void {
super.disconnectedCallback();
this._destroyListeners();
}
private _setupListeners() {
this.addEventListener("focus", this._handleFocus);
this.addEventListener("blur", this._handleBlur);
this.addEventListener("keydown", this._handleKeydown);
}
private _destroyListeners() {
this.removeEventListener("focus", this._handleFocus);
this.removeEventListener("blur", this._handleBlur);
this.removeEventListener("keydown", this._handleKeydown);
}
private _handleFocus() {
if (this.disabled) return;
this._activeIndex =
(this.value != null
? this.options?.findIndex((option) => option.value === this.value)
: undefined) ?? 0;
}
private _handleBlur() {
this._activeIndex = undefined;
}
private _handleKeydown(ev: KeyboardEvent) {
if (!this.options || this._activeIndex == null || this.disabled) return;
const value = this.options[this._activeIndex].value;
if (!this.options || this.disabled) return;
let newIndex = this._activeIndex ?? 0;
switch (ev.key) {
case " ":
this.value = value;
fireEvent(this, "value-changed", { value });
case "Enter":
if (this._activeIndex != null) {
const value = this.options[this._activeIndex].value;
this.value = value;
fireEvent(this, "value-changed", { value });
}
break;
case "ArrowUp":
case "ArrowLeft":
this._activeIndex =
this._activeIndex <= 0
? this.options.length - 1
: this._activeIndex - 1;
newIndex = newIndex <= 0 ? this.options.length - 1 : newIndex - 1;
this._focusOption(newIndex);
break;
case "ArrowDown":
case "ArrowRight":
this._activeIndex = (this._activeIndex + 1) % this.options.length;
break;
case "Home":
this._activeIndex = 0;
break;
case "End":
this._activeIndex = this.options.length - 1;
newIndex = (newIndex + 1) % this.options.length;
this._focusOption(newIndex);
break;
default:
return;
@ -139,38 +115,56 @@ export class HaControlSelect extends LitElement {
private _handleOptionMouseUp(ev: MouseEvent) {
ev.preventDefault();
this._activeIndex = undefined;
}
private _handleOptionFocus(ev: FocusEvent) {
if (this.disabled) return;
const value = (ev.target as any).value;
this._activeIndex = this.options?.findIndex(
(option) => option.value === value
);
}
protected render() {
return html`
<div class="container">
<div
class="container"
role="radiogroup"
aria-label=${ifDefined(this.label)}
@focus=${this._handleFocus}
@blur=${this._handleBlur}
@keydown=${this._handleKeydown}
?disabled=${this.disabled}
>
${this.options
? repeat(
this.options,
(option) => option.value,
(option, idx) => this._renderOption(option, idx)
(option) => this._renderOption(option)
)
: nothing}
</div>
`;
}
private _renderOption(option: ControlSelectOption, index: number) {
private _renderOption(option: ControlSelectOption) {
const isSelected = this.value === option.value;
return html`
<div
id=${`option-${option.value}`}
class=${classMap({
option: true,
selected: this.value === option.value,
focused: this._activeIndex === index,
selected: isSelected,
})}
role="option"
role="radio"
tabindex=${isSelected ? "0" : "-1"}
.value=${option.value}
aria-selected=${this.value === option.value}
aria-checked=${isSelected ? "true" : "false"}
aria-label=${ifDefined(option.label)}
title=${ifDefined(option.label)}
@click=${this._handleOptionClick}
@focus=${this._handleOptionFocus}
@mousedown=${this._handleOptionMouseDown}
@mouseup=${this._handleOptionMouseUp}
>
@ -178,7 +172,7 @@ export class HaControlSelect extends LitElement {
${option.path
? html`<ha-svg-icon .path=${option.path}></ha-svg-icon>`
: option.icon || nothing}
${option.label && !this.hideLabel
${option.label && !this.hideOptionLabel
? html`<span>${option.label}</span>`
: nothing}
</div>
@ -203,18 +197,12 @@ export class HaControlSelect extends LitElement {
--mdc-icon-size: 20px;
height: var(--control-select-thickness);
width: 100%;
border-radius: var(--control-select-border-radius);
outline: none;
transition: box-shadow 180ms ease-in-out;
font-style: normal;
font-weight: var(--ha-font-weight-medium);
color: var(--primary-text-color);
user-select: none;
-webkit-tap-highlight-color: transparent;
}
:host(:focus-visible) {
box-shadow: 0 0 0 2px var(--control-select-color);
}
:host([vertical]) {
width: var(--control-select-thickness);
height: 100%;
@ -225,11 +213,12 @@ export class HaControlSelect extends LitElement {
width: 100%;
border-radius: var(--control-select-border-radius);
transform: translateZ(0);
overflow: hidden;
display: flex;
flex-direction: row;
padding: var(--control-select-padding);
box-sizing: border-box;
outline: none;
transition: box-shadow 180ms ease-in-out;
}
.container::before {
position: absolute;
@ -240,6 +229,7 @@ export class HaControlSelect extends LitElement {
width: 100%;
background: var(--control-select-background);
opacity: var(--control-select-background-opacity);
border-radius: var(--control-select-border-radius);
}
.container > *:not(:last-child) {
@ -248,6 +238,16 @@ export class HaControlSelect extends LitElement {
margin-inline-start: initial;
direction: var(--direction);
}
.container[disabled] {
--control-select-color: var(--disabled-color);
--control-select-focused-opacity: 0;
color: var(--disabled-color);
}
.container[disabled] .option {
cursor: not-allowed;
}
.option {
cursor: pointer;
position: relative;
@ -258,9 +258,13 @@ export class HaControlSelect extends LitElement {
align-items: center;
justify-content: center;
border-radius: var(--control-select-button-border-radius);
overflow: hidden;
/* For safari border-radius overflow */
z-index: 0;
outline: none;
transition: box-shadow 180ms ease-in-out;
}
.option:focus-visible {
box-shadow: 0 0 0 2px var(--control-select-color);
}
.content > *:not(:last-child) {
margin-bottom: 4px;
@ -274,11 +278,11 @@ export class HaControlSelect extends LitElement {
width: 100%;
background-color: var(--control-select-color);
opacity: 0;
border-radius: var(--control-select-button-border-radius);
transition:
background-color ease-in-out 180ms,
opacity ease-in-out 80ms;
}
.option.focused::before,
.option:hover::before {
opacity: var(--control-select-focused-opacity);
}
@ -319,14 +323,6 @@ export class HaControlSelect extends LitElement {
margin-inline-end: initial;
margin-bottom: var(--control-select-padding);
}
:host([disabled]) {
--control-select-color: var(--disabled-color);
--control-select-focused-opacity: 0;
color: var(--disabled-color);
}
:host([disabled]) .option {
cursor: not-allowed;
}
`;
}

View File

@ -3,11 +3,12 @@ import type { PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { ifDefined } from "lit/directives/if-defined";
import { styleMap } from "lit/directives/style-map";
import { fireEvent } from "../common/dom/fire_event";
import type { FrontendLocaleData } from "../data/translation";
import { formatNumber } from "../common/number/format_number";
import { blankBeforeUnit } from "../common/translations/blank_before_unit";
import type { FrontendLocaleData } from "../data/translation";
declare global {
interface HASSDomEvents {
@ -75,6 +76,9 @@ export class HaControlSlider extends LitElement {
@property({ type: Number })
public max = 100;
@property({ type: String })
public label?: string;
@state()
public pressed = false;
@ -107,10 +111,6 @@ export class HaControlSlider extends LitElement {
protected firstUpdated(changedProperties: PropertyValues): void {
super.firstUpdated(changedProperties);
this.setupListeners();
this.setAttribute("role", "slider");
if (!this.hasAttribute("tabindex")) {
this.setAttribute("tabindex", "0");
}
}
protected updated(changedProps: PropertyValues) {
@ -197,9 +197,6 @@ export class HaControlSlider extends LitElement {
this.value = this.steppedValue(this.percentageToValue(percentage));
fireEvent(this, "value-changed", { value: this.value });
});
this.addEventListener("keydown", this._handleKeyDown);
this.addEventListener("keyup", this._handleKeyUp);
}
}
@ -208,8 +205,6 @@ export class HaControlSlider extends LitElement {
this._mc.destroy();
this._mc = undefined;
}
this.removeEventListener("keydown", this._handleKeyDown);
this.removeEventListener("keyup", this._handleKeyUp);
}
private get _tenPercentStep() {
@ -323,6 +318,7 @@ export class HaControlSlider extends LitElement {
}
protected render(): TemplateResult {
const valuenow = this.steppedValue(this.value ?? 0);
return html`
<div
class="container${classMap({
@ -332,7 +328,24 @@ export class HaControlSlider extends LitElement {
"--value": `${this.valueToPercentage(this.value ?? 0)}`,
})}
>
<div id="slider" class="slider">
<div
id="slider"
class="slider"
role="slider"
tabindex="0"
aria-label=${ifDefined(this.label)}
aria-valuenow=${valuenow.toString()}
aria-valuetext=${this._formatValue(valuenow)}
aria-valuemin=${ifDefined(
this.min != null ? this.min.toString() : undefined
)}
aria-valuemax=${ifDefined(
this.max != null ? this.max.toString() : undefined
)}
aria-orientation=${this.vertical ? "vertical" : "horizontal"}
@keydown=${this._handleKeyDown}
@keyup=${this._handleKeyUp}
>
<div class="slider-track-background"></div>
<slot name="background"></slot>
${this.mode === "cursor"
@ -371,12 +384,6 @@ export class HaControlSlider extends LitElement {
--control-slider-tooltip-font-size: var(--ha-font-size-m);
height: var(--control-slider-thickness);
width: 100%;
border-radius: var(--control-slider-border-radius);
outline: none;
transition: box-shadow 180ms ease-in-out;
}
:host(:focus-visible) {
box-shadow: 0 0 0 2px var(--control-slider-color);
}
:host([vertical]) {
width: var(--control-slider-thickness);
@ -471,9 +478,14 @@ export class HaControlSlider extends LitElement {
width: 100%;
border-radius: var(--control-slider-border-radius);
transform: translateZ(0);
transition: box-shadow 180ms ease-in-out;
outline: none;
overflow: hidden;
cursor: pointer;
}
.slider:focus-visible {
box-shadow: 0 0 0 2px var(--control-slider-color);
}
.slider * {
pointer-events: none;
}

View File

@ -9,18 +9,19 @@ import {
import type { PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, query } from "lit/decorators";
import { ifDefined } from "lit/directives/if-defined";
import { fireEvent } from "../common/dom/fire_event";
import "./ha-svg-icon";
@customElement("ha-control-switch")
export class HaControlSwitch extends LitElement {
@property({ type: Boolean, reflect: true }) public disabled = false;
@property({ type: Boolean }) public disabled = false;
@property({ type: Boolean }) public vertical = false;
@property({ type: Boolean }) public reversed = false;
@property({ type: Boolean, reflect: true }) public checked = false;
@property({ type: Boolean }) public checked = false;
// SVG icon path (if you need a non SVG icon instead, use the provided on icon slot to pass an <ha-icon slot="icon-on"> in)
@property({ attribute: false, type: String }) pathOn?: string;
@ -28,6 +29,9 @@ export class HaControlSwitch extends LitElement {
// SVG icon path (if you need a non SVG icon instead, use the provided off icon slot to pass an <ha-icon slot="icon-off"> in)
@property({ attribute: false, type: String }) pathOff?: string;
@property({ type: String })
public label?: string;
@property({ attribute: "touch-action" })
public touchAction?: string;
@ -36,17 +40,6 @@ export class HaControlSwitch extends LitElement {
protected firstUpdated(changedProperties: PropertyValues): void {
super.firstUpdated(changedProperties);
this.setupListeners();
this.setAttribute("role", "switch");
if (!this.hasAttribute("tabindex")) {
this.setAttribute("tabindex", "0");
}
}
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (changedProps.has("checked")) {
this.setAttribute("aria-checked", this.checked ? "true" : "false");
}
}
private _toggle() {
@ -112,8 +105,6 @@ export class HaControlSwitch extends LitElement {
if (this.disabled) return;
this._toggle();
});
this.addEventListener("keydown", this._keydown);
}
}
@ -122,7 +113,6 @@ export class HaControlSwitch extends LitElement {
this._mc.destroy();
this._mc = undefined;
}
this.removeEventListener("keydown", this._keydown);
}
private _keydown(ev: any) {
@ -135,7 +125,17 @@ export class HaControlSwitch extends LitElement {
protected render(): TemplateResult {
return html`
<div id="switch" class="switch">
<div
id="switch"
class="switch"
@keydown=${this._keydown}
aria-checked=${this.checked ? "true" : "false"}
aria-label=${ifDefined(this.label)}
role="switch"
tabindex="0"
?checked=${this.checked}
?disabled=${this.disabled}
>
<div class="background"></div>
<div class="button" aria-hidden="true">
${this.checked
@ -164,16 +164,13 @@ export class HaControlSwitch extends LitElement {
width: 100%;
box-sizing: border-box;
user-select: none;
cursor: pointer;
border-radius: var(--control-switch-border-radius);
outline: none;
transition: box-shadow 180ms ease-in-out;
-webkit-tap-highlight-color: transparent;
}
:host(:focus-visible) {
.switch:focus-visible {
box-shadow: 0 0 0 2px var(--control-switch-off-color);
}
:host([checked]:focus-visible) {
.switch[checked]:focus-visible {
box-shadow: 0 0 0 2px var(--control-switch-on-color);
}
.switch {
@ -182,9 +179,15 @@ export class HaControlSwitch extends LitElement {
height: 100%;
width: 100%;
border-radius: var(--control-switch-border-radius);
outline: none;
overflow: hidden;
padding: var(--control-switch-padding);
display: flex;
cursor: pointer;
}
.switch[disabled] {
opacity: 0.5;
cursor: not-allowed;
}
.switch .background {
position: absolute;
@ -212,24 +215,24 @@ export class HaControlSwitch extends LitElement {
align-items: center;
justify-content: center;
}
:host([checked]) .switch .background {
.switch[checked] .background {
background-color: var(--control-switch-on-color);
}
:host([checked]) .switch .button {
.switch[checked] .button {
transform: translateX(100%);
background-color: var(--control-switch-on-color);
}
:host([reversed]) .switch {
flex-direction: row-reverse;
}
:host([reversed][checked]) .switch .button {
:host([reversed]) .switch[checked] .button {
transform: translateX(-100%);
}
:host([vertical]) {
width: var(--control-switch-thickness);
height: 100%;
}
:host([vertical][checked]) .switch .button {
:host([vertical]) .switch[checked] .button {
transform: translateY(100%);
}
:host([vertical]) .switch .button {
@ -239,13 +242,9 @@ export class HaControlSwitch extends LitElement {
:host([vertical][reversed]) .switch {
flex-direction: column-reverse;
}
:host([vertical][reversed][checked]) .switch .button {
:host([vertical][reversed]) .switch[checked] .button {
transform: translateY(-100%);
}
:host([disabled]) {
opacity: 0.5;
cursor: not-allowed;
}
`;
}

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