Compare commits

...

1159 Commits

Author SHA1 Message Date
Paulus Schoutsen 368973b668 Add app alias 2020-06-21 12:37:12 -07:00
Paulus Schoutsen b3b42b741d Upgrade to latest terser webpack plugin (#6199) 2020-06-20 22:51:29 -07:00
HomeAssistant Azure 020f115d7c [ci skip] Translation update 2020-06-21 00:32:58 +00:00
Bram Kragten 6891f1df1c Bumped version to 20200620.0 2020-06-20 15:56:19 +02:00
Bram Kragten 497494620d Log cast config fetch errors (#6197) 2020-06-20 15:40:29 +02:00
Bram Kragten 7a13242077 Logbook + History allow date/time filter (#6192)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-20 15:39:52 +02:00
Bram Kragten b9d6973a79 ZHA: Bring back clusters UI (#6191) 2020-06-20 15:38:27 +02:00
Bram Kragten ed0e8c5e8d Move MQTT dev tools to integrations (#6189) 2020-06-20 14:52:56 +02:00
HomeAssistant Azure d8f530f8ac [ci skip] Translation update 2020-06-20 00:32:36 +00:00
HomeAssistant Azure a46874b7ff [ci skip] Translation update 2020-06-19 00:32:29 +00:00
Bram Kragten cf68f25a03 Don't throw errors in card picker (#6188) 2020-06-18 16:26:31 -07:00
Joakim Sørensen 16c604937e Display docker version (#5989) 2020-06-18 11:54:21 +02:00
Paulus Schoutsen 5cbffb23fd Remove check if config is loaded (#6123) 2020-06-18 11:18:33 +02:00
HomeAssistant Azure 6de38d3b85 [ci skip] Translation update 2020-06-18 00:32:18 +00:00
rajlaud b34ce577d9 Add discovery to list of configuration flow sources whose entries can be ignored (#6185)
Add "discovery" to the list of configuration flow sources whose config flow entries can be ignored. For example, https://github.com/home-assistant/core/pull/35669. I've tested it on the squeezebox integration and it works.
2020-06-17 16:08:26 -07:00
Paulus Schoutsen 4b9fcd7de7 Bumped version to 20200617.0 2020-06-17 10:33:16 -07:00
Paulus Schoutsen cc71ccaafa Keep auth params when onboarding (#6182) 2020-06-17 10:32:27 -07:00
marawan31 9ff2eece3a Added precipitation probability to forcast (#6131) 2020-06-17 09:02:44 +02:00
HomeAssistant Azure 2bc97cc9c8 [ci skip] Translation update 2020-06-17 00:32:22 +00:00
Bram Kragten a87570cf5a Add link to integrations page if zha or zwave are loaded. (#6159) 2020-06-16 13:58:05 -07:00
Bram Kragten 9ffd25e3a0 Fix enter behavior of card editor (#6179) 2020-06-16 13:30:27 -07:00
Bram Kragten 61fdab294a Fix ha-card outline box shadow in firefox (#6174)
* Fix ha-card outline box shadow in firefox

* Add fallback for markdown code background
2020-06-16 13:29:38 -07:00
Bram Kragten d4e137bb58 Keep add integration dialog same size while searching (#6158) 2020-06-16 13:29:11 -07:00
Bram Kragten c251e4f241 Prevent add card dialog to jump on search (#6180) 2020-06-16 13:20:10 -07:00
Bram Kragten a55d0f347b Fix reload script (#6181) 2020-06-16 13:19:07 -07:00
J. Nick Koston f15cc0b424 Show the user that made the change in logbook (#6173)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-06-16 16:00:55 +02:00
HomeAssistant Azure 4e17875011 [ci skip] Translation update 2020-06-16 00:32:24 +00:00
Bram Kragten 256b64b6b3 Remove filtering for attribute hidden (#6171) 2020-06-15 15:41:21 -07:00
Paulus Schoutsen 8c0c0592e2 Move Jinja directives to own script block (#6166) 2020-06-15 16:18:58 +02:00
Thomas Lovén f53f81dbc4 Fix translation in device options (#6172) 2020-06-15 16:17:07 +02:00
Paulus Schoutsen d6c85719c9 Fix preload Roboto on older devices (#6165) 2020-06-14 21:08:10 -07:00
HomeAssistant Azure c51c80bf47 [ci skip] Translation update 2020-06-15 00:32:32 +00:00
HomeAssistant Azure 544832756d [ci skip] Translation update 2020-06-14 00:32:29 +00:00
Bram Kragten 1afc2b3518 Merge branch 'master' into dev 2020-06-13 11:42:53 +02:00
Bram Kragten 17352ea5bd Bumped version to 20200613.0 2020-06-13 11:41:18 +02:00
Bram Kragten 6f5e3c2711 Close websocket connection after being hidden for 5 minutes (#6149)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-13 11:00:22 +02:00
Bram Kragten bee21cd3fe Bumped version to 20200603.3 2020-06-13 10:56:44 +02:00
Bram Kragten c4340e05d2 Disable pointer events when disabled (#6155) 2020-06-13 10:56:30 +02:00
Bram Kragten 6d6eef4e97 Disable pointer events when disabled (#6155) 2020-06-13 08:58:21 +02:00
Paulus Schoutsen 71137032df Custom Panel to allow passing two builds (#6104) 2020-06-12 21:01:09 -07:00
Bram Kragten ffff4dc03d Add z index to dialog (#6145) 2020-06-12 21:00:37 -07:00
HomeAssistant Azure 65b16c763e [ci skip] Translation update 2020-06-13 00:32:26 +00:00
Bram Kragten 33af3de4a3 Disconnect panel after 5 minutes hidden (#6152) 2020-06-12 20:44:22 +02:00
marawan31 a822c1eb2f Reduce HLS buffer length to 1 minute instead of the default infinity (#6134)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-06-12 14:01:48 +02:00
Bram Kragten 4eb46bc275 Move integration config panels to integrations (#6122) 2020-06-12 11:51:00 +02:00
HomeAssistant Azure ccc9b73f9b [ci skip] Translation update 2020-06-12 00:32:44 +00:00
HomeAssistant Azure f5f8ad0e02 [ci skip] Translation update 2020-06-11 00:32:27 +00:00
Bram Kragten 0864aeb9c6 Convert config server control to Lit (#6141) 2020-06-10 21:21:04 +02:00
Bram Kragten cda6310373 Migrate dialog-box to ha-dialog (#6140) 2020-06-10 21:19:42 +02:00
Bram Kragten 26a87e9280 Changes ha-card to new material design rules (#6137) 2020-06-10 12:01:37 +02:00
Bram Kragten 0b16a4880a Move info and log panels (#6127) 2020-06-10 11:59:05 +02:00
HomeAssistant Azure db68c5852c [ci skip] Translation update 2020-06-10 00:32:12 +00:00
Bram Kragten 256aec5308 Remove slot from ha-switch (#6133) 2020-06-09 22:37:43 +02:00
Bram Kragten 20dd3ca21c data-entry-flow: replace paper-dialog with mwc-dialog (#6129) 2020-06-09 22:31:27 +02:00
Bram Kragten 25cc76e022 Replace paper-menu-button (#6132) 2020-06-09 22:30:36 +02:00
Bram Kragten 168cc607aa Move lovelace card edit dialog to mwc-dialog (#6130) 2020-06-09 22:30:18 +02:00
Bram Kragten edc4601f8e Run prettier (#6128) 2020-06-09 14:06:42 +02:00
Robert 8f86a7ad8c Removed docker build method. (#6126)
The docker build method doesn't work anymore. Removed all
scripts/references related to it.
2020-06-09 11:52:43 +02:00
HomeAssistant Azure 4d7ad0dc51 [ci skip] Translation update 2020-06-09 00:32:32 +00:00
dependabot[bot] 34ac80567e Bump websocket-extensions from 0.1.3 to 0.1.4 (#6117)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 09:56:45 +02:00
HomeAssistant Azure 23bdc03f29 [ci skip] Translation update 2020-06-08 00:32:36 +00:00
HomeAssistant Azure 3099748a6d [ci skip] Translation update 2020-06-07 00:32:42 +00:00
Paulus Schoutsen e384f76ac1 Make two builds of hassio (#6105) 2020-06-05 21:56:56 -07:00
HomeAssistant Azure 7050d19be7 [ci skip] Translation update 2020-06-06 00:32:28 +00:00
Bram Kragten ca678330d3 Bumped version to 20200603.2 2020-06-05 23:46:48 +02:00
Bram Kragten 10a5b3f9c3 Glance height fix (Again): A row could be zero height (#6110) 2020-06-05 23:46:41 +02:00
Bram Kragten 0fcedc5046 Glance height fix (Again): A row could be zero height (#6110) 2020-06-05 23:46:16 +02:00
Bram Kragten f558f7fb8c Set min width to dev states columns (#6108) 2020-06-05 23:28:25 +02:00
Bram Kragten 06207defe7 Correct glance card size (#6109) 2020-06-05 23:03:15 +02:00
Bram Kragten 986f9d7633 Fix for config undefined (#6102) 2020-06-05 23:02:54 +02:00
Bram Kragten 81277fd12e Set min width to dev states columns (#6108) 2020-06-05 22:15:06 +02:00
Bram Kragten 30442b25c0 Correct glance card size (#6109) 2020-06-05 22:14:39 +02:00
Paulus Schoutsen 67ac3b4ba3 Drop Custom Elements ES5 adapter (#6107) 2020-06-05 11:04:19 +02:00
Paulus Schoutsen f819e2cf8d Cleanup of builds (#6106) 2020-06-05 11:03:11 +02:00
Bram Kragten a376f4525b Fix alarm card animation (#6096)
fixes #5074
2020-06-04 21:52:14 -07:00
Bram Kragten 5c1553286a Fix for config undefined (#6102) 2020-06-04 21:51:31 -07:00
HomeAssistant Azure 2c5d3f7492 [ci skip] Translation update 2020-06-05 00:32:27 +00:00
Paulus Schoutsen 58f01ba11a Fix webpack dev server (#6100) 2020-06-04 10:25:12 +02:00
HomeAssistant Azure 3fdf9a2e28 [ci skip] Translation update 2020-06-04 00:32:29 +00:00
Paulus Schoutsen 4cbd8e7673 Include compatibility in Hass.io (#6098) 2020-06-03 17:18:04 -07:00
Bram Kragten 0d4c51f26e Merge pull request #6095 from home-assistant/dev 2020-06-03 18:19:54 +02:00
Bram Kragten 2c1b25b00b Bumped version to 20200603.1 2020-06-03 18:18:30 +02:00
Bram Kragten 407f305d21 Fix for earlier loading the frontend (#6094) 2020-06-03 18:16:49 +02:00
Bram Kragten 5d5d6b247f Merge pull request #6093 from home-assistant/dev 2020-06-03 13:28:05 +02:00
Bram Kragten 77bd7c37c1 Merge branch 'master' into dev 2020-06-03 11:37:20 +02:00
Bram Kragten 783ea0f5c8 Bumped version to 20200603.0 2020-06-03 10:20:37 +02:00
HomeAssistant Azure 33f1b45f30 [ci skip] Translation update 2020-06-03 00:32:35 +00:00
Bram Kragten e1df50ad3b Fix refresh when starting with generated on cast (#6072) 2020-06-02 22:25:11 +02:00
Maciej Bieniek 6a9a4cf65f Add missing translation in the customize (#6074) 2020-06-02 17:26:01 +02:00
Maciej Bieniek 443634ecf0 Add missing translations in the users panel (#6082)
* Add missing translations in the users panel

* Suggested change

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

* Suggested change

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

* Suggested change

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

* Move error_required to ui.common

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-06-02 17:25:30 +02:00
HomeAssistant Azure 2a17870d6d [ci skip] Translation update 2020-06-02 00:32:40 +00:00
Bram Kragten 486ed7dcaa More card size tweaking (#6073) 2020-06-01 16:08:27 +02:00
Bram Kragten 19c13096dc Fix map history (#6075) 2020-06-01 16:07:06 +02:00
HomeAssistant Azure 49b4271a47 [ci skip] Translation update 2020-06-01 00:32:39 +00:00
HomeAssistant Azure 7461d8f806 [ci skip] Translation update 2020-05-31 00:32:37 +00:00
HomeAssistant Azure 362236d7df [ci skip] Translation update 2020-05-30 00:32:30 +00:00
Zack Arnett ba384b9eee Weather Card: Show 5 element Forecast Longer (#5885) 2020-05-29 15:09:35 +02:00
Maciej Bieniek d94df728e5 Add missing translations on Z-Wave management page (#5932) 2020-05-29 15:08:23 +02:00
Bram Kragten d0a53d1760 Handle starting the frontend before finished loading integrations (#6068)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-28 21:09:26 -07:00
HomeAssistant Azure 2e5ec1f0c1 [ci skip] Translation update 2020-05-29 00:32:33 +00:00
Paulus Schoutsen 6c8aedfb8b Fix feature detection for module browsers that do not support dynamic… (#6069) 2020-05-28 12:28:58 -07:00
Robert Chmielowiec f354e1eb0f Invert whitelist logic in deviceAutomationsEqual (#6032) 2020-05-28 16:24:22 +02:00
HomeAssistant Azure 49b1e5897e [ci skip] Translation update 2020-05-28 00:32:21 +00:00
Paulus Schoutsen 1a58c17180 Fix hassio dev under rollup (#6063) 2020-05-27 14:18:38 -07:00
Bram Kragten 7fb852893c Fix get card size for lazy elements (#6023) 2020-05-27 22:18:13 +02:00
Paulus Schoutsen aa9a354746 Preload (#6062) 2020-05-27 12:54:52 -07:00
Bram Kragten 78f5429c92 break word in dev states table (#6060) 2020-05-27 09:34:51 -07:00
J. Nick Koston 79de8e0f32 Request less data when making history api calls where possible (#5934) 2020-05-27 16:45:39 +02:00
Bram Kragten 70f59eeec6 MIgrate entity-filter-badge to updating element (#6050) 2020-05-27 15:25:28 +02:00
Paulus Schoutsen b75792a3bf Fix filtering out compatibility (#6056) 2020-05-27 00:30:23 -07:00
Paulus Schoutsen 5cb7117656 Move compatibility to the top of custom panel entrypoint (#6055) 2020-05-27 09:19:28 +02:00
HomeAssistant Azure 3a5bd7474b [ci skip] Translation update 2020-05-27 00:32:20 +00:00
Paulus Schoutsen 304fad3f49 Remove unused HTML tests (#6053) 2020-05-26 16:02:05 -07:00
Bram Kragten fb929a089c Fix aria label icon name (#5992) 2020-05-26 10:03:15 +02:00
Bram Kragten 6076a0cdc4 Bump roundslider (#6049) 2020-05-26 10:00:25 +02:00
Bram Kragten a3736683eb Bump roundslider (#6049) 2020-05-26 09:59:06 +02:00
Bram Kragten 413f1c31bb Bumped version to 20200519.5 2020-05-26 09:50:56 +02:00
Bram Kragten 20baff380b Dont recreate resize observers and replace polyfill (#6043) 2020-05-26 09:49:43 +02:00
Bram Kragten 582d159884 Remove mwc-icon-button from dev tools states (#6046) 2020-05-26 09:49:12 +02:00
Bram Kragten 9c43c5806d Fix shopping list initial data fetch (#6020) 2020-05-26 09:48:50 +02:00
Bram Kragten 8ad2bf5401 Fix shopping list initial data fetch (#6020) 2020-05-26 09:44:46 +02:00
HomeAssistant Azure 66409f0fa5 [ci skip] Translation update 2020-05-26 00:32:44 +00:00
Franck Nijhof 68172e006f Update Code of Conduct to 2.0 (#6048) 2020-05-25 16:35:57 -07:00
Bram Kragten cf5e808a96 Remove mwc-icon-button from dev tools states (#6046) 2020-05-25 21:57:04 +02:00
Maciej Bieniek 3faebaeb4b Add missing translations to actions, triggers and conditions of device automations (#6002) 2020-05-25 19:37:44 +02:00
Maciej Bieniek 6b8cfe661c Add missing translations on the area registry page (#5998) 2020-05-25 19:37:17 +02:00
Bram Kragten 2fd64af737 Dont recreate resize observers and replace polyfill (#6043) 2020-05-25 19:36:47 +02:00
Paulus Schoutsen 050cdf3783 Integrate compatibility into other entrypoints (#6029) 2020-05-25 19:36:22 +02:00
Paulus Schoutsen d73b3d77ea Split out HTML imports from entrypoint (#6030) 2020-05-25 09:55:50 -07:00
Bram Kragten acc024bcf9 Fix entity marker border color (#6041) 2020-05-25 16:47:21 +02:00
Maciej Bieniek deb179ad38 Add translation to the back button on the helpers page (#5999) 2020-05-25 14:50:58 +02:00
Maciej Bieniek bfb11790a2 Add translations for 'No area' strings (#6000) 2020-05-25 14:46:34 +02:00
Paulus Schoutsen af23110074 Move legacy styles to their own files (#6033) 2020-05-25 10:16:01 +02:00
Paulus Schoutsen b8e71609db Random Rollup tweaks (#6034) 2020-05-25 10:12:42 +02:00
HomeAssistant Azure 1876b3827f [ci skip] Translation update 2020-05-25 00:32:56 +00:00
Paulus Schoutsen 38d3b8d087 Ignore proxy-polyfill in workers (#6011) 2020-05-24 10:41:05 +02:00
Paulus Schoutsen c5ef33cc78 Upgrade Fuse (#6012) 2020-05-24 10:39:07 +02:00
Paulus Schoutsen 7427b209a7 Fix ignore plugin for ES5 builds 2020-05-23 22:08:49 -07:00
Paulus Schoutsen 71397e5199 Exclude default polymer theme (#6010) 2020-05-23 20:20:36 -07:00
HomeAssistant Azure 1bc3b3befc [ci skip] Translation update 2020-05-24 00:32:49 +00:00
Paulus Schoutsen 872e46a076 Exclude packages rollup (#6007) 2020-05-23 13:53:26 -07:00
Paulus Schoutsen ad386c0e22 Cleanups (#5997) 2020-05-23 00:06:23 -07:00
Paulus Schoutsen 7e281f66c2 Rollup (#5995) 2020-05-22 23:05:47 -07:00
Bram Kragten 7daafcbe1b Fix aria label icon name (#5992) 2020-05-22 22:24:37 +02:00
Paulus Schoutsen c5b223988a Split generic bundle config from webpack config (#5917) 2020-05-22 10:02:05 -07:00
Bram Kragten 6cc9ce573b Bumped version to 20200519.4 2020-05-22 18:21:00 +02:00
Bram Kragten 23192226dd Missed paper icon button (#5987) 2020-05-22 18:20:52 +02:00
Bram Kragten 736444201b Fix for icons with firefox private mode (#5985) 2020-05-22 18:20:33 +02:00
Bram Kragten 785f49b005 Picture glance: Use icon button instead of icon with button styles. (#5977) 2020-05-22 18:20:08 +02:00
Bram Kragten 55dd1f4aa1 Fix device entities not updating (#5983) 2020-05-22 18:19:47 +02:00
Bram Kragten 6d0490d7d9 Fix show password toggle (#5979) 2020-05-22 18:19:14 +02:00
Bram Kragten 06667455ae Missed paper icon button (#5987) 2020-05-22 18:16:45 +02:00
Bram Kragten 3640960486 Fix for icons with firefox private mode (#5985) 2020-05-22 17:55:28 +02:00
Bram Kragten 4ad3dbf3e2 Update release-drafter.yaml 2020-05-22 16:36:00 +02:00
Bram Kragten 10957deb1f Add release drafter action (#5984) 2020-05-22 16:33:54 +02:00
Bram Kragten 0a128db269 Picture glance: Use icon button instead of icon with button styles. (#5977) 2020-05-22 15:36:43 +02:00
Bram Kragten 6bb3b84377 Fix device entities not updating (#5983) 2020-05-22 15:36:30 +02:00
Bram Kragten b8d2c551e0 Fix show password toggle (#5979) 2020-05-22 14:44:17 +02:00
Maciej Bieniek 34e06351fb Add translations for buttons and error string on the auth page (#5933) 2020-05-22 14:44:06 +02:00
HomeAssistant Azure e179404a9e [ci skip] Translation update 2020-05-22 00:32:48 +00:00
Bram Kragten 9c574995ac Bumped version to 20200519.3 2020-05-21 15:15:37 +02:00
Bram Kragten 3f35c603d2 Don't set hass when not defined (#5967) 2020-05-21 15:14:48 +02:00
Bram Kragten 8e0688140e Fix weather card (#5966) 2020-05-21 15:14:21 +02:00
Bram Kragten 5f81a204f2 Don't set hass when not defined (#5967) 2020-05-21 15:10:32 +02:00
Bram Kragten df3b70a533 Fix weather card (#5966) 2020-05-21 14:54:10 +02:00
Bram Kragten 0c57c05a22 Bumped version to 20200519.2 2020-05-21 13:02:07 +02:00
Bram Kragten c6be3be45a Fix markdown card crashing the demo (#5962) 2020-05-21 13:01:57 +02:00
Bram Kragten 9689db9605 Upgrade lazy error card (#5955) 2020-05-21 13:01:36 +02:00
Bram Kragten e4607735ff Fix markdown card crashing the demo (#5962) 2020-05-21 13:00:33 +02:00
HomeAssistant Azure 389b7def0b [ci skip] Translation update 2020-05-21 00:32:27 +00:00
Bram Kragten e35bd30ed3 Upgrade lazy error card (#5955) 2020-05-20 23:08:49 +02:00
Zack Arnett 4b8f7e1fe9 Weather Card: Fix Forecast Image Spacing (#5952) 2020-05-20 21:39:45 +02:00
Zack Arnett 5cc4e2bb16 Weather Card: Fix Forecast Image Spacing (#5952) 2020-05-20 21:39:29 +02:00
Bram Kragten e165a96689 Bumped version to 20200519.1 2020-05-20 21:36:11 +02:00
Bram Kragten 91a655a81e Fix resize observers and update gauge styling (#5949) 2020-05-20 21:35:52 +02:00
Bram Kragten 612811e2c2 Fix disabled styling zone panel (#5950) 2020-05-20 21:35:32 +02:00
Bram Kragten 11bd72915c Fix picture header footer upgrade (#5945) 2020-05-20 21:35:12 +02:00
Bram Kragten 339221e793 Upgrade lazy loaded elements before setting config (#5944) 2020-05-20 21:34:49 +02:00
Bram Kragten 9be864b45e Fix search for data-tables using the builtin search bar (#5937) 2020-05-20 21:34:24 +02:00
Bram Kragten 3a453f5843 Fix resize observers and update gauge styling (#5949) 2020-05-20 21:27:08 +02:00
Bram Kragten 28e0384b55 Fix disabled styling zone panel (#5950) 2020-05-20 19:31:45 +02:00
Bram Kragten dcd6c6f06f Fix picture header footer upgrade (#5945) 2020-05-20 17:34:15 +02:00
Bram Kragten 28d26065e4 Upgrade lazy loaded elements before setting config (#5944) 2020-05-20 16:23:50 +02:00
Bram Kragten 300c8d06c4 Fix search for data-tables using the builtin search bar (#5937) 2020-05-20 10:01:33 +02:00
Paulus Schoutsen d2a1d11d16 limit manifest to entrypoints (#5936) 2020-05-19 23:55:17 -07:00
HomeAssistant Azure 6ae717bbfe [ci skip] Translation update 2020-05-20 00:32:38 +00:00
Joakim Sørensen 21296b4224 Adds more styling to markdown elements (#5904) 2020-05-19 22:20:29 +02:00
Bram Kragten fafad302ba Merge pull request #5931 from home-assistant/dev 2020-05-19 16:05:55 +02:00
Bram Kragten 0c94ad46b2 Bumped version to 20200519.0 2020-05-19 14:29:35 +02:00
Bram Kragten d9bb40f934 Fix data table worker (#5921) 2020-05-19 13:59:16 +02:00
Bram Kragten bbc16b6bc8 Cache used icons in memory, use inline icon for dev-tools (#5927) 2020-05-19 13:58:08 +02:00
Bram Kragten 16154e9d8b Change disabled icon to pencil-off (#5930) 2020-05-19 13:57:53 +02:00
Jeff Rescignano 61bd536d7b Update invalid links in README.md (#5926) 2020-05-19 09:54:39 +02:00
HomeAssistant Azure 02c798a8bc [ci skip] Translation update 2020-05-19 00:33:05 +00:00
Paulus Schoutsen c37a691b9b Remove unused deps (#5916) 2020-05-18 23:09:59 +02:00
Maciej Bieniek 23c68d17e8 Add missing translations to ha-device-entities-card (#5908) 2020-05-18 21:54:58 +02:00
Bram Kragten 0a7f610ad3 Merge pull request #5920 from home-assistant/dev 2020-05-18 20:05:22 +02:00
Bram Kragten c9e8bd2e5d Fix picture card (#5922) 2020-05-18 20:05:00 +02:00
Paulus Schoutsen a66d2ca1b9 Use comlink in workers (#5915) 2020-05-18 16:51:46 +02:00
Bram Kragten d38a0f0366 Bumped version to 20200518.0 2020-05-18 16:14:12 +02:00
Bram Kragten 29759de021 Update ha-entity-picker.ts 2020-05-18 16:14:04 +02:00
Bram Kragten 264759ddf0 Fix entity-filter-card (#5919) 2020-05-18 15:16:56 +02:00
Bram Kragten 91b0bd5b5e Check if attached on rebuild (#5918) 2020-05-18 13:27:58 +02:00
Bram Kragten a0e2cc7a3a Fix ignored config entries (#5914) 2020-05-18 11:26:32 +02:00
Mat Strange 9e1eb41cbe Added theme to events documentation (#5903) 2020-05-18 11:26:10 +02:00
Maciej Bieniek c37eb023b0 Add missing translation on developer tool page (#5886) 2020-05-18 11:07:00 +02:00
HomeAssistant Azure 840948ba4a [ci skip] Translation update 2020-05-18 00:33:03 +00:00
J. Nick Koston 8fbdd88b24 Cleanup new ha-config (#5906)
Remove changedProps check as its always true.
2020-05-17 11:59:50 +02:00
HomeAssistant Azure 512d35d2e0 [ci skip] Translation update 2020-05-17 00:33:05 +00:00
Zack Arnett 0321e55a42 EZ (#5901) 2020-05-16 11:15:04 +02:00
Zack Arnett a1ee9ad48b Card Editor: Documentation per Card (#5888)
* Doc-links

* Comments

* Fix

* Remove unneeded code

* undo the change

* better
2020-05-15 21:50:28 -04:00
HomeAssistant Azure 1ad1fd28f1 [ci skip] Translation update 2020-05-16 00:32:54 +00:00
Bram Kragten 007f8b50b9 Merge pull request #5900 from home-assistant/dev 2020-05-15 22:01:34 +02:00
Bram Kragten 6fe8a87cca Bumped version to 20200515.0 2020-05-15 21:45:59 +02:00
Bram Kragten 5f46679d94 Fix mdc checkbox styling (#5897) 2020-05-15 17:56:47 +02:00
Zack Arnett 18a3f212f3 Calendar Panel: Popup Style (#5895) 2020-05-15 17:22:38 +02:00
Zack Arnett 67a3f5d87b Gauge Card: Fix if value is greater than max (#5887) 2020-05-15 17:21:53 +02:00
Bram Kragten c88439ba2f Polyfill Intl.PluralRules (#5893) 2020-05-15 14:54:42 +02:00
Bram Kragten 67e17d4016 Fix conditional and custom panel updated > update (#5891) 2020-05-15 14:54:23 +02:00
Bram Kragten b61cf60faf Migrate card preview to UpdatingElement (#5884) 2020-05-15 09:19:24 +02:00
HomeAssistant Azure 5503853445 [ci skip] Translation update 2020-05-15 00:32:48 +00:00
Bram Kragten 259726f5be Merge pull request #5883 from home-assistant/dev 2020-05-14 20:05:34 +02:00
Bram Kragten bec42d941b Bumped version to 20200514.1 2020-05-14 18:46:20 +02:00
Bram Kragten dcbbaf08f9 Set lovelace when restoring view from cache, optimise picture element and thermostat (#5880) 2020-05-14 18:44:38 +02:00
Zack Arnett 349355584a Media Player Row: Fix State Translation (#5881)
* Fix for state display translation

* Comments
2020-05-14 12:38:43 -04:00
Zack Arnett 7ce0b34774 Resizer fix (#5882) 2020-05-14 12:37:38 -04:00
Zack Arnett dd894758a4 Card Editor: Preview Card Margin fix (#5879) 2020-05-14 18:13:26 +02:00
Zack Arnett 2aa1eb97fd Markdown Card: Fix not rendering on initial load (#5864) 2020-05-14 18:13:06 +02:00
Bram Kragten 4c43ae7b2f Beta fixes (#5878) 2020-05-14 16:03:52 +02:00
Zack Arnett 34e516e0be oops (#5866) 2020-05-14 09:26:06 +02:00
HomeAssistant Azure 7bd3427e76 [ci skip] Translation update 2020-05-14 00:32:37 +00:00
Bram Kragten 6853db693a Merge pull request #5862 from home-assistant/dev 2020-05-14 01:44:59 +02:00
Bram Kragten 252ce1e467 Show loading screen for integration config (#5863) 2020-05-14 01:44:39 +02:00
Bram Kragten 221c12bd61 Bumped version to 20200514.0 2020-05-14 01:12:57 +02:00
Paulus Schoutsen 12edd68874 Remove unused ES5 service worker (#5860) 2020-05-14 01:11:32 +02:00
Bram Kragten f469753fb1 Dont add all childs at once to view (#5856) 2020-05-14 00:09:52 +02:00
Bram Kragten c894ecd0e6 Optimise sourcemaps (#5859) 2020-05-14 00:06:39 +02:00
Paulus Schoutsen 2153bc536c Clean up service worker code and fix 404 (#5855) 2020-05-13 13:17:47 -07:00
Bram Kragten 86bbac430c Fix translations for integration config panel (#5854) 2020-05-13 20:49:01 +02:00
Bram Kragten 16ad8a3c01 Open newly added view after adding (#5851) 2020-05-13 19:49:03 +02:00
Bram Kragten b2af91c83e Fixes for problems caused by not rebuilding (#5850) 2020-05-13 18:51:26 +02:00
Bram Kragten 4c0810f530 Fix typo in property method (#5852) 2020-05-13 18:51:16 +02:00
Paulus Schoutsen f70130e21f Remove reference to Google Fonts (#5849) 2020-05-13 18:22:53 +02:00
Paulus Schoutsen 6bb7b01d00 Fix demo size_stats 2020-05-13 08:41:35 -07:00
Bram Kragten 51e7aaa805 Merge pull request #5848 from home-assistant/dev 2020-05-13 13:14:23 +02:00
Bram Kragten 54704e53b3 Bumped version to 20200513.0 2020-05-13 12:47:37 +02:00
Bram Kragten cc46797576 Some fixes in focus and click handling (#5847) 2020-05-13 12:47:09 +02:00
Bram Kragten 7f1fb6f75f Set edit mode to false on card when disabling edit mode. (#5845) 2020-05-13 12:05:29 +02:00
Bram Kragten 2c2a1d204b Graph history fix (#5846) 2020-05-13 12:05:03 +02:00
Paulus Schoutsen 581fafdcc9 Workbox 5 in gulp (#5843) 2020-05-13 11:12:01 +02:00
HomeAssistant Azure 10358abbec [ci skip] Translation update 2020-05-13 00:32:49 +00:00
Bram Kragten de1ffe67b1 Merge pull request #5840 from home-assistant/dev 2020-05-12 22:24:40 +02:00
Zack Arnett eb2b24d57c Weather Card: Fix overwritten changes (#5841) 2020-05-12 22:24:20 +02:00
Bram Kragten 825db8a56a Bumped version to 20200512.0 2020-05-12 21:59:06 +02:00
David F. Mulcahey 577a21fc5c Rework ZHA group adds and removes (#5602) 2020-05-12 21:42:29 +02:00
Bram Kragten 1b2841eef9 Recreate cards only on config change (#5839) 2020-05-12 11:09:30 -07:00
Ian Richardson 845511e322 Add 'brightness' as a secondary_info option (#5731) 2020-05-12 12:29:43 -04:00
Bram Kragten 96ab057853 Ignore ResizeObserver loop limit exceeded error (#5838) 2020-05-12 12:17:41 +02:00
HomeAssistant Azure f85cf0a238 [ci skip] Translation update 2020-05-12 00:33:00 +00:00
Bram Kragten 84a2676a9c compress icons (#5836) 2020-05-11 23:59:29 +02:00
Zack Arnett 466a1af902 Weather Card/Row: Weather Icons as SVG, Themeable, user definable (#5736)
* SVG

* no-unneeded-ternary

* declared ubnused

* moving stuff around

* Few updates

* All svgs in | update row

* No slots

* Remove public/static/images/weather

* style for user defined

* few updates to missing fils

* classes

* wind color
2020-05-11 23:58:17 +02:00
Zack Arnett ebbe7e805f Gauge Card: Convert to Round Slider (#5510)
* Use round slider for gauge

* Update guage to slider

* Add severity back

* Remove Base Unit

* fix merge

* resize observer

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

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

* Update Install Resize Observer to be a helper

* Type import

* Reviews

* Updates to other cards

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-05-11 17:14:02 -04:00
Zack Arnett c861ee025e Weather Card: Ability to choose Secondary Attribute (#5820) 2020-05-11 22:11:48 +02:00
Paulus Schoutsen 6d0823328d Fix generated Lovelace translating domain names (#5803) 2020-05-11 10:28:05 -07:00
Joakim Sørensen 60be14dc77 Use manifest.issue_tracker for issues URL if not built_in (#5818) 2020-05-11 13:45:00 +02:00
Mat Strange 2d627819d9 Added translation to dev-tools-info-integrations (#5834) 2020-05-11 13:44:32 +02:00
Zack Arnett cf575f83f5 Weather Card: Switch State and Name (#5795) 2020-05-11 13:44:15 +02:00
HomeAssistant Azure 79935b2d4c [ci skip] Translation update 2020-05-11 00:32:59 +00:00
HomeAssistant Azure d1cceb2013 [ci skip] Translation update 2020-05-10 00:33:23 +00:00
Bram Kragten f5da130d51 Merge pull request #5823 from matstrange/dev 2020-05-09 22:18:37 +02:00
Mat Strange 8768304ec5 Returned to no label on disarm/trigger as before 2020-05-09 20:30:44 +01:00
Bram Kragten f10a5dcdbe Unused import 2020-05-09 21:22:46 +02:00
Bram Kragten a27428ebcd Simplify enter handling 2020-05-09 21:17:55 +02:00
Bram Kragten d19acf17c2 Merge pull request #5826 from home-assistant/dev 2020-05-09 21:17:30 +02:00
Bram Kragten 1a0bf861ee Bumped version to 20200509.0 2020-05-09 21:01:00 +02:00
Bram Kragten db906ad4d0 Bump material (#5812) 2020-05-09 20:59:53 +02:00
Bram Kragten 75ed0f2f99 Fix translation download and add empty languages (#5824) 2020-05-09 20:59:34 +02:00
Bram Kragten 29ed1144d5 Simplify custom icon set, return only 1 icon per call (#5822) 2020-05-09 20:59:02 +02:00
Mat Strange fa445d4066 Added translation to bade on alarm panel 2020-05-09 12:00:26 +01:00
Erik Montnemery d10be4ef2d Show cover position slider if cover supports it (#5815) 2020-05-08 22:59:20 +02:00
Joakim Sørensen 7f66d5b8e9 Change target to currentTarget for the click event (#5816) 2020-05-08 16:31:07 -04:00
Bram Kragten 0c8cd680c2 Allow custom icon sets (#5794) 2020-05-08 21:56:25 +02:00
Maciej Bieniek a7ba1977b4 Add translation for and word on the integration card (#5811)
* Add translation for and word on tje integration card

* Move and to ui.common
2020-05-08 17:43:21 +02:00
Bram Kragten a960b39235 Bump lit-element and lit-html (#5810) 2020-05-08 14:00:09 +02:00
Bram Kragten 3febf059ec Codesplit Supervisor panel icons (#5809) 2020-05-08 13:10:24 +02:00
Paulus Schoutsen 20203f7bdb Bump home-assistant-js-websocket to 5.1.2 2020-05-07 18:35:14 -07:00
Franck Nijhof a399d76d06 Add new core configuration UI for external_url & internal_url (#5755) 2020-05-07 18:32:03 -07:00
Franck Nijhof 1ca097c5a0 Add issue_tracker integration manifest property (#5744) 2020-05-07 20:51:46 -04:00
optama e83ede245d #5761 fix weather forecast card showing hours instead of weekdays (#5799) 2020-05-07 23:19:50 +02:00
Paulus Schoutsen 05ac275780 Fix Leaflet import (#5802) 2020-05-07 13:04:29 -07:00
Paulus Schoutsen 966c0bc06c Remove HTML loader (#5800) 2020-05-07 12:39:19 -07:00
Paulus Schoutsen abf136dd63 Upgrade web animations (#5801) 2020-05-07 12:31:25 -07:00
Paulus Schoutsen b6309cfd16 Extract the version extract from webpack config (#5798) 2020-05-07 10:26:02 -07:00
Paulus Schoutsen b69d5e0fa3 Revert "Use gulp-terser instead of webpack-terser (#5788)" (#5796) 2020-05-07 18:28:51 +02:00
Paulus Schoutsen 5084cde6b9 Split babel config from babel loader config (#5797) 2020-05-07 09:25:02 -07:00
Bram Kragten ca1cc7ed0d Some little hassio tweaks (#5793) 2020-05-07 16:07:58 +02:00
Joakim Sørensen 808a31db2b Hide auto-update for non advanced users (#5745) 2020-05-07 15:21:52 +02:00
Joakim Sørensen 44ad75aead Implement add-on changelog (#5727) 2020-05-07 15:21:12 +02:00
Joakim Sørensen 0961c9d05e Cleanup and new repository management for add-on store (#5750) 2020-05-07 15:20:51 +02:00
Joakim Sørensen 56754b4d43 New dialogs for the profile (#5780) 2020-05-07 14:42:34 +02:00
Joakim Sørensen 661779ad4e Add localize string for Device info (#5781) 2020-05-07 14:36:45 +02:00
Paulus Schoutsen cf37ebb652 Use gulp-terser instead of webpack-terser (#5788) 2020-05-07 14:36:17 +02:00
Paulus Schoutsen 82741e490b Optimize icon fetching (#5791) 2020-05-07 13:07:50 +02:00
Paulus Schoutsen 5fed28808e Rename env var TRAVIS to IS_TEST (#5789) 2020-05-07 12:39:18 +02:00
Paulus Schoutsen 321c0cfc84 Minor cleanup (#5787) 2020-05-07 12:38:26 +02:00
Paulus Schoutsen eba7cedaa6 Reset path on icon change (#5790) 2020-05-07 12:37:14 +02:00
Zack Arnett 71492d0467 Calendar Panel: FullCalendar (#5742)
* WIP

* remove big calendar

* remove file

* Convert to lit

* More

* Ready for the public to see? prob not

* Fix types and imports

* Remove dependencies

* ignore the typing that hasnt been finished in Beta

* Convert paper to MWC

* Styling

* View list as name of view | MWC components version

* Updates action directive for ripple. MWC 14.1.0

* Update

* Updates

* Update height styling

* Toggle Button Group

* Adds Toggle group transition

* style updates

* Few fixes

* Fix Yarn lock from merge | height of celndar as parent

* Update package Json and yarn | remove unneeded pkg

* Remove mwc-list

* Search hass.states for calendars instead of api

* Move function to file in data | event fetch logic

* compute state name

* add ha button menu | refresh

* Remove Event ffetch logic

* copy pasta

* Types

* Fix for toggling

* Translations

* Update ha-button-toggle-group

* Update ha-button-toggle-group.ts

* Update ha-button-toggle-group.ts

* Change mobile view

* Locale in fullcalendar

* Comments

* ha-button-menu trigger slot

* Comments

* icon-x

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

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

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

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-05-06 17:22:12 -04:00
Bram Kragten 9630a58ea7 Some fixes for icons (#5758) 2020-05-06 14:18:10 -07:00
Joakim Sørensen 89f6f16ba2 Fix removal of option in select helper (#5777) 2020-05-06 19:28:59 +02:00
Bram Kragten 2d646da97f Fix cast navigation on none default dashboard (#5719) 2020-05-06 09:30:18 -07:00
Joakim Sørensen 39b5460598 Fix hassio dev/build (#5776) 2020-05-06 16:27:03 +02:00
Bram Kragten 636429ccfa Bump fecha (#5728) 2020-05-06 12:58:53 +02:00
Erik Montnemery e5abb95f5c Include QoS and retain in MQTT debug info (#5759) 2020-05-06 12:58:19 +02:00
Jason Knott c631554eb0 Added options to Lovelace evaluate filter (#5694) 2020-05-06 12:57:11 +02:00
Paulus Schoutsen db07eeb916 Add step_id to flow in progress type (#5769) 2020-05-06 12:54:32 +02:00
Mat Strange 3216a46e76 Fix Lovelace view config icon preview (#5770) 2020-05-06 12:30:41 +02:00
Bram Kragten ae6243b7bf Merge pull request #5757 from home-assistant/dev 2020-05-05 17:38:14 +02:00
Bram Kragten df002d7a67 Merge branch 'master' into dev 2020-05-05 16:50:07 +02:00
Bram Kragten e8a0632108 Bumped version to 20200505.0 2020-05-05 16:45:21 +02:00
Bram Kragten 0a92c28bac Split up mdi icons (#4379) 2020-05-05 16:40:11 +02:00
Bas Nijholt d419547463 make color of update-heading in primary-text-color (#5754) 2020-05-05 16:33:06 +02:00
Mat Strange da392912b3 Grayscale Integration logos when ignored (#5748) 2020-05-05 00:19:33 +02:00
Paulus Schoutsen 9ebee02727 Update device registry type (#5735) 2020-05-04 14:36:28 +02:00
Joakim Sørensen 0bdcfcc42f Supervisor dialogs (#5740) 2020-05-04 14:35:15 +02:00
Bram Kragten 43623a30bc Add English GB, Frysk and Galego (#5730) 2020-05-02 21:56:13 +02:00
Bram Kragten 99e73054a9 Await ignoring before refreshing config flows in progress (#5722) 2020-05-02 20:34:54 +02:00
Joakim Sørensen 108233f3b8 Adds mainPage to hass-tabs-subpage (#5724) 2020-05-02 20:19:17 +02:00
Bram Kragten 8f2a7c95b3 Fix more info header color and page background color (#5716) 2020-05-02 19:51:10 +02:00
Bram Kragten 7fdd525dac Don't show error on open of dialog (#5721)
Fixes #4713
2020-05-02 19:35:11 +02:00
Joakim Sørensen 7ed24137eb Adds padding to ha-label-badge (#5725) 2020-05-02 19:20:47 +02:00
Joakim Sørensen 07cd30eaca Place addon documentation in a card (#5726) 2020-05-02 19:20:20 +02:00
Joakim Sørensen df8cf66e02 Adds dialog to ask user to restart add-on on configuration changes (#5707)
* Adds dialog to ask user to restart addon on configuration changes

* Apply review suggestions

* Show error in dialog

* Remove unused import

* Update hassio/src/dialogs/suggestRestart.ts

* Rename

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-05-02 19:19:45 +02:00
Bram Kragten f067bcd877 Bumped version to 20200427.2 2020-05-02 17:28:45 +02:00
Bram Kragten e11ef55dd8 Update nb.json 2020-05-02 17:25:52 +02:00
Bram Kragten fa8bd30e83 Don't disable controls when state is unknown (#5687) 2020-05-02 17:23:54 +02:00
Bram Kragten 04a2ff7506 Don't disable thermostat when state is unknown (#5720) 2020-05-02 17:23:20 +02:00
Bram Kragten bc68e20041 Don't disable thermostat when state is unknown (#5720) 2020-05-02 17:23:00 +02:00
Franck Nijhof 786da25b9f Fix typo and remove Hass.io references (#5717) 2020-05-02 17:02:10 +02:00
Franck Nijhof c3832d56c3 Don't break Markdown from external sources (#5713) 2020-05-02 15:19:26 +02:00
Joakim Sørensen 79d1a2f458 Add reload buttons to store and snapshot (#5714) 2020-05-02 15:18:57 +02:00
Joakim Sørensen f16a674a39 Supervisor style changes (#5706) 2020-05-02 14:42:12 +02:00
matstrange 6e38a80efc Optimized some common images with zopflipng (#5697) 2020-05-02 13:57:39 +02:00
Zack Arnett 6a3a1297ad Update Weather images array to hold variants (#5692) 2020-05-01 22:50:49 +02:00
Joakim Sørensen 5ca63a8052 Convert the rest of the panel (#5689) 2020-05-01 16:52:03 +02:00
On Freund 8b04df093c Handle unchanged suggested values (#5688) 2020-05-01 14:10:12 +02:00
Joakim Sørensen d2a5494335 Adds stage badge (#5685) 2020-05-01 13:24:10 +02:00
Joakim Sørensen de545e90e2 Adds documentation tab (#5684) 2020-05-01 13:19:24 +02:00
Bram Kragten 57ab7e829b Don't disable controls when state is unknown (#5687) 2020-05-01 13:18:58 +02:00
Joakim Sørensen 6847830575 Use hass-tabs-subpage in add-on view (#5483) 2020-05-01 11:34:52 +02:00
Franck Nijhof 2084ecc4c6 Add NOT condition helper (#5616) 2020-05-01 11:06:35 +02:00
Aidan Timson b0c27e587e Align discovered integrations to avavliable space (#5672) 2020-05-01 11:04:18 +02:00
On Freund 1687d90d02 Allow passing the current value to config flow input fields (#5603)
* Allow passing the current value to config flow input fields

* Fix lint errors

* Apply suggestions from code review

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Rename current_value to suggested_value to open up more use cases

* Update ha-form-integer.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-05-01 10:36:51 +02:00
Paulus Schoutsen dfd9bf3c64 Create advanced flow if user in advanced mode (#5612) 2020-05-01 10:23:02 +02:00
Bram Kragten 5a25b9c2f1 Update BUG_REPORT.md 2020-04-30 23:22:09 +02:00
Bram Kragten bf68101754 Add request for state to issue template 2020-04-30 23:21:43 +02:00
Bram Kragten 487bd8d3fc remove console 2020-04-30 21:41:48 +02:00
Bram Kragten 3ba9c931b9 Optimize scenes config (#5652) 2020-04-30 20:40:43 +02:00
Bram Kragten 8484f7595a Optimize script editor (#5650) 2020-04-30 20:40:23 +02:00
Bram Kragten ee889d59d4 Don't add disabled entities to lovelace from device page (#5648) 2020-04-30 20:40:10 +02:00
Bram Kragten ae10330844 Hide scenes from device info page when no entities (#5647) 2020-04-30 20:39:58 +02:00
Bram Kragten f3e88f6f2e Exclude esprima and drop js-yaml from lovelace chunk (#5649) 2020-04-30 20:39:36 +02:00
Bram Kragten 2abfd0392d Group config entries by integration (#5646) 2020-04-30 20:38:02 +02:00
Bram Kragten 462c1f94d6 Update intl-messageformat (and remove @polymer/app-localize-behavior) (#5671) 2020-04-30 11:20:54 -07:00
Pedro Lamas f4710891d0 Improved spacing balance for weather forecast (#5673)
* Improved spacing balance for weather forecast

* Removes obsolete styling
2020-04-30 19:43:54 +02:00
Bram Kragten 1fdb6b8034 Prevent recreation of entities row on every update of hass (#5657) 2020-04-29 13:29:53 -07:00
Joakim Sørensen 8029c3d672 Adds more log types to the system tab (#5496)
* Add more log types to the system tab

* Fix lint issues

* Fix more lint issues

* Add loading screen while waiting for logs.

* Only show log selector if advenced user.

* Update hassio/src/system/hassio-supervisor-log.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Log adjustments

* Remove the need for exported ANSI_HTML_STYLE

* Add core as a log provider

* Removed unneeded hints

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-29 21:57:31 +02:00
Bram Kragten 61fdee14c6 Fix demo themes (#5643) 2020-04-28 23:13:37 +02:00
Zack Arnett 117e4e468f Weather Card: Switch Importance of Name and State (#5624)
* Improvements to the name and state importance

* Bram Suggestions
2020-04-28 23:12:15 +02:00
Sean Mooney 869ec113f4 Updated repo links on Dev Tools Info panel (#5644)
These were still using the old names of the repos.

home-assistant is now "core" and home-assistant-polymer is now "frontend".
2020-04-28 23:11:53 +02:00
Erik Montnemery 00e7b93011 Improve styling of MQTT debug info (#5626) 2020-04-28 23:11:34 +02:00
Bram Kragten 03e581870a Bumped version to 20200427.1 2020-04-28 23:11:01 +02:00
Erik Montnemery b04fe141ac Improve styling of MQTT debug info (#5626) 2020-04-28 23:09:20 +02:00
Sean Mooney b0168fbb85 Updated repo links on Dev Tools Info panel (#5644)
These were still using the old names of the repos.

home-assistant is now "core" and home-assistant-polymer is now "frontend".
2020-04-28 10:03:54 +02:00
Zack Arnett 75ba343b5e Weather Card: Switch Importance of Name and State (#5624)
* Improvements to the name and state importance

* Bram Suggestions
2020-04-27 14:43:23 -04:00
Aidan Timson 88217473f7 Add search to integrations 🔍 (#5593)
Co-Authored-By: Bram Kragten <mail@bramkragten.nl>
2020-04-27 20:42:37 +02:00
Bram Kragten 01e5dfc9b3 Fix demo themes (#5643) 2020-04-27 20:40:30 +02:00
Bram Kragten 58869677bd Merge pull request #5641 from home-assistant/dev 2020-04-27 12:31:02 +02:00
Bram Kragten 032b01aec1 Bumped version to 20200427.0 2020-04-27 11:47:33 +02:00
Bram Kragten a47c3fa854 Fix entity card state display (#5631) 2020-04-26 23:48:02 -07:00
Paulus Schoutsen 7c6ba1a782 Translation fixes (#5634) 2020-04-26 21:09:05 +02:00
HomeAssistant Azure 0d08f5413b [ci skip] Translation update 2020-04-26 00:32:54 +00:00
Bram Kragten 949cc17a9e Fix alarm panel translations (#5629) 2020-04-25 15:25:33 -07:00
HomeAssistant Azure 607c1a1ef0 [ci skip] Translation update 2020-04-25 00:32:51 +00:00
Zack Arnett db2dab8227 Slugify title for url (#5621) 2020-04-24 10:59:38 -04:00
Bram Kragten eb4ba4fc78 Merge pull request #5620 from home-assistant/dev 2020-04-24 16:14:09 +02:00
Bram Kragten bf888b1547 Bumped version to 20200424.0 2020-04-24 15:57:10 +02:00
Bram Kragten c468aab9b2 Fix some imports (#5619) 2020-04-24 15:49:25 +02:00
Bram Kragten a0dae802f2 Optimize automation editor (#5591) 2020-04-24 13:36:51 +02:00
Bram Kragten 14330fbd93 Fix include domains on entity picker (#5615) 2020-04-24 13:36:10 +02:00
Bram Kragten bf55be7f7f Fix lit/no-invalid-html (#5617) 2020-04-24 13:29:38 +02:00
Paulus Schoutsen e10987a705 Improve Lovelace take control warning. (#5608) 2020-04-24 10:37:41 +02:00
Bram Kragten 355f40d740 Don't update entity picker items while open (#5588)
* Don't update entity picker items while open

* Update items in updated, when we open the dropdown
2020-04-24 10:36:38 +02:00
Bram Kragten 2503fabe1d Add min width to toolbar icon to prevent tabs jumping (#5590) 2020-04-24 10:36:14 +02:00
Bram Kragten 32c7c0b4f0 Hide config entry title when same as integration name (#5589) 2020-04-24 10:35:56 +02:00
Bram Kragten 301a964a65 Allow to remove config entry name (#5607)
* Allow to remove config entry name

* Add enter handling to prompt
2020-04-24 10:35:43 +02:00
Aidan Timson 49f2fd2af7 Fix integrations fab spacing (#5594)
* Fix integrations fab spacing

* Use is-wide
2020-04-24 10:35:21 +02:00
HomeAssistant Azure 4f518cac2c [ci skip] Translation update 2020-04-24 00:32:51 +00:00
Paulus Schoutsen 8420f73919 Fix translations for Z-Wave & Zigbee (#5606) 2020-04-23 15:51:56 -07:00
Bram Kragten 1ef2d3c7f2 Add max width to integration cards (#5600) 2020-04-23 09:53:27 -04:00
Paulus Schoutsen fc20fd32f1 Fix a bunch of translation strings (#5597)
* Fix a bunch of translation strings

* Fallback on default if no device class translations
2020-04-23 13:07:40 +02:00
HomeAssistant Azure 13a8bf6993 [ci skip] Translation update 2020-04-23 00:32:48 +00:00
Bram Kragten b2f424a6f8 Merge pull request #5586 from home-assistant/dev
20200422.0
2020-04-22 12:40:07 +02:00
Bram Kragten a9d927551c Bumped version to 20200422.0 2020-04-22 12:16:03 +02:00
Zack Arnett fdf7b516a0 Weather Card: Beautify (#5387)
* Weather card

* Updates

* Remove Precipitation from forecast

* Weather Card :)

* Fix no breaking changes

* Size styles

* Space

* Fix some overlap

* Unavailable

* New unavailable

* Changed to check if less than day

* Updates

* oops

* Little clean up

* styling

* Reviews

* Fix merge

* Lint

* eslint

* New images

* Update src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Reviews

* Reviews

* Comments

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-22 12:13:32 +02:00
Erik Montnemery 9a00078169 Display MQTT debug info (#5375)
* Add MQTT debug info

* Refactor

* Fix mistake

* Rewrite, improve display.

* Tweak translations

* Add mqtt-payload.ts

* Apply suggestions from code review

Co-Authored-By: Zack Arnett <arnett.zackary@gmail.com>

* Tweak after adding review comments.

* Rewrite to only render the messages when details is opened

* Adapt to core PR #33752

* Address review comments

* Lint

* Lint

* Address review comments

Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>
2020-04-22 12:01:43 +02:00
Bram Kragten 1dfb632fc4 New layout for integration config (#5580)
* WIP

* Add filter message to device and entities page

* Lokalize

* Missed 2

* Fixed in #5581

* Change to hash
2020-04-22 11:51:50 +02:00
Zack Arnett 1c1f9a6a89 Graph Footer: Cache State History (#5499)
* Cache State History for entity

* State history reset on config change

* Fetching

* reviews

* Merge fixes

* Remove file again ?
2020-04-22 11:33:49 +02:00
Bram Kragten 2b76b3887e Add device automation translations to add automation device dia… (#5573)
* Add device automation translations to add automation device dialog

* Update translations-mixin.ts
2020-04-22 11:12:27 +02:00
Paulus Schoutsen a49c84032b Mark titles in config flows optional (#5584) 2020-04-22 10:51:53 +02:00
cdce8p c72bb5b22b Add secondary option for cover entities (#5556)
* Add secondary option for cover entities

* Replace string concatenation

* Check for undefined
2020-04-22 10:50:52 +02:00
Paulus Schoutsen 24a844dddc update translations 2020-04-21 23:51:57 -07:00
HomeAssistant Azure ae903973a7 [ci skip] Translation update 2020-04-22 00:32:35 +00:00
Paulus Schoutsen 82442bb5ec Fix cast translations (#5582) 2020-04-21 15:02:00 -07:00
nagyrobi 8786302190 Add up/down movement icons to shutter (#5579)
Since window shutters are also moving up and down, add these icons for during movement.
2020-04-21 17:23:37 +02:00
Paulus Schoutsen d27a17cf8e Get state translations from backend (#5581)
* Get state translations from backend

* Fix tests
2020-04-21 17:15:13 +02:00
HomeAssistant Azure b4b90ca59d [ci skip] Translation update 2020-04-21 00:33:02 +00:00
HomeAssistant Azure ecd967a68d [ci skip] Translation update 2020-04-20 00:32:47 +00:00
Paulus Schoutsen 8812340768 Remove iba language 2020-04-18 23:03:13 -07:00
Paulus Schoutsen 659da7bf80 Update translations 2020-04-18 23:01:40 -07:00
HomeAssistant Azure 91eabf3c38 [ci skip] Translation update 2020-04-19 00:32:41 +00:00
Paulus Schoutsen e355c81e41 Bumped version to 20200418.0 2020-04-18 17:15:29 -07:00
Paulus Schoutsen d45a674652 Ask specific translations (#5560) 2020-04-18 17:14:25 -07:00
HomeAssistant Azure f91b46e88c [ci skip] Translation update 2020-04-18 00:32:56 +00:00
Aidan Timson f57754212c Add Search to Card Picker (#5497)
* Add Search to Card Picker

* Force focus

* Remove autofocus

* Fix from rebase

* Commit suggestion

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Flip autofocus

* Cache cards

* Make cards a property

* Add missing custom cards

* Set cards to render elements

* Commit suggestion

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/editor/card-editor/hui-card-picker.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Make card preview max width match columns

* Typo

* Add autofocus where wanted

* Update src/common/search/search-input.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/dialogs/config-flow/step-flow-pick-handler.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-17 23:29:49 +02:00
Paulus Schoutsen 97c454aa0d Update domain translation string (#5558) 2020-04-17 09:01:45 -07:00
dependabot[bot] b516f10a35 Bump https-proxy-agent from 2.2.1 to 2.2.4 (#5559)
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](https://github.com/TooTallNate/node-https-proxy-agent/compare/2.2.1...2.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-17 11:45:30 +02:00
HomeAssistant Azure 0ccc788148 [ci skip] Translation update 2020-04-17 00:32:42 +00:00
Bram Kragten 5c941e0afb Remove initial value explanation 2020-04-16 12:55:21 +02:00
HomeAssistant Azure 492e4d2df4 [ci skip] Translation update 2020-04-16 00:32:44 +00:00
Paulus Schoutsen 66f33ad497 Use manfiests to render doc urls (#5549)
* Use manfiests to render doc urls

* Update UI
2020-04-15 13:36:25 -07:00
Aidan Timson ff81536463 Add loading for initial state on graph (#5448)
* Fix type

* Add loading spinner for initial state

* Move to better position

* Make var not a property

* Make spinner same height as graph

* Fix size

* Make spinner centered

* Adjust spinner position

* Remove boolean and make no state history match height

* Merge

* eslint

* Fix value

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Commit suggestion

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Suggested change

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-15 20:54:01 +02:00
Paulus Schoutsen ba0cba1a2b Update where we load integration titles from (#5546) 2020-04-15 20:47:29 +02:00
Joakim Sørensen fc7771ec13 Remove npm (#5548) 2020-04-15 20:25:07 +02:00
Joakim Sørensen 4c3069e5b7 Add missing imports (#5547) 2020-04-15 20:15:34 +02:00
Paulus Schoutsen ed54a185e4 Remove srcset from brands (#5517) 2020-04-15 16:00:16 +02:00
Paulus Schoutsen 4f81085d0f Add entity row that displays static text (#5516)
* Add entity row that displays text

* Remove hass type
2020-04-15 15:59:33 +02:00
David F. Mulcahey 8383caf6a6 Add ability to see Zigbee information for a device (#5445)
* add ability to see zigbee information for a device

* cleanup

* handle resize correctly

* cleanup

* convert to ha-dialog

* Simplify

* Add close button

* Add readonly to code editor

* add class

* eslint fixes

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-15 15:36:48 +02:00
HomeAssistant Azure 1b9f224569 [ci skip] Translation update 2020-04-15 00:32:58 +00:00
Bram Kragten 05495af74f Merge pull request #5539 from home-assistant/dev
20200414.0
2020-04-15 00:10:54 +02:00
Bram Kragten d62da5e924 Merge branch 'master' into dev 2020-04-15 00:00:16 +02:00
Bram Kragten 57d72bd80f Bumped version to 20200414.0 2020-04-14 23:53:01 +02:00
Bram Kragten 681c05c323 Add Lit analyzer (#5538)
* Add lit analyzer

* Update rules
2020-04-14 11:43:56 -07:00
Bram Kragten 3d20d8b208 remove @types/chromecast-caf-sender (#5537)
To prevent a collusion with `@types/chromecast-caf-receiver` that would make `lit-analyzer` fail.
2020-04-14 20:25:03 +02:00
Bram Kragten 4f9d77b906 Remove tslint -> move ts to eslint 2020-04-14 18:09:31 +02:00
Bram Kragten 82f80db558 Update typescript, prettier, tslint -> eslint (#5536)
* Update typescript, prettier, tslint -> eslint

* Organize imports

* Use glob for eslint fix react import
2020-04-14 09:05:45 -07:00
HomeAssistant Azure b17490f0de [ci skip] Translation update 2020-04-14 00:32:37 +00:00
HomeAssistant Azure d33c0b4bd1 [ci skip] Translation update 2020-04-13 00:32:47 +00:00
HomeAssistant Azure 7f528c90c3 [ci skip] Translation update 2020-04-12 00:32:55 +00:00
Paulus Schoutsen c4c4782429 Fix hui-entities-card margin (#5518) 2020-04-11 11:07:27 +02:00
HomeAssistant Azure 5414092309 [ci skip] Translation update 2020-04-11 00:32:38 +00:00
Paulus Schoutsen b632ea6f86 Add icons to info panel (#5501)
* Add icons to info panel

* Update src/panels/developer-tools/info/integrations-card.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-10 13:13:58 +02:00
David F. Mulcahey bd98ce8c25 Make add devices button available on ZHA coordinator (#5431)
* Make add devices available on ZHA coordinator

* Update src/panels/config/zha/zha-device-card.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-device-card.ts

Co-Authored-By: Zack Arnett <arnett.zackary@gmail.com>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>
2020-04-10 11:57:23 +02:00
Paulus Schoutsen 0c1714ef78 Reload frontend if backend changes (#5489)
* Reload frontend if backend changes

* Better implementation

* Store ha version
2020-04-10 11:55:53 +02:00
Bram Kragten ee278f111f Convert script config panel to router (#5512)
* Convert script config panel to router

* Update script.ts

* Update ha-config-script.ts
2020-04-10 11:50:06 +02:00
HomeAssistant Azure 47e9eb5a0d [ci skip] Translation update 2020-04-10 00:32:45 +00:00
Bram Kragten baf5dcbd03 Migrate automations config panel to router (#5509)
* MIgrate automations config panel to router

* Correct link to create new
2020-04-09 10:34:45 -07:00
Bram Kragten 2e2915ec09 Fix first logbook item not being shown (#5491) 2020-04-09 16:06:27 +02:00
Bram Kragten 5f3a6740c1 Fix cast panel view (#5488) 2020-04-09 16:06:06 +02:00
Bram Kragten b17074d68b Fix sidebar derived style (#5493) 2020-04-09 16:05:39 +02:00
Joakim Sørensen ac4b2ea70f Import ha-fab (#5494) 2020-04-09 16:05:18 +02:00
Bram Kragten 4e2a9e3d7b fix imports (#5506) 2020-04-09 16:04:23 +02:00
Bram Kragten 75525b9866 Remove sort now that data-table does it (#5508) 2020-04-09 16:04:01 +02:00
Bram Kragten 1e39f22009 Fix map init on connected (#5505) 2020-04-09 16:03:38 +02:00
Bram Kragten 7ba55ab666 Bumped version to 20200407.2 2020-04-09 16:02:53 +02:00
Bram Kragten 0c06517dcc Remove sort now that data-table does it (#5508) 2020-04-09 15:45:18 +02:00
Bram Kragten cd1bfe1b20 Fix map init on connected (#5505) 2020-04-09 15:44:39 +02:00
Bram Kragten 35c2d8966b fix imports (#5506) 2020-04-09 15:44:20 +02:00
Paulus Schoutsen cb255ef137 Add icons when adding integration (#5500)
* Add icons when adding integration

* Remove margin from search input and put in parent
2020-04-09 14:44:08 +02:00
HomeAssistant Azure f9d78a95ad [ci skip] Translation update 2020-04-09 00:32:34 +00:00
Joakim Sørensen 14eb496b1d Import ha-fab (#5494) 2020-04-08 21:24:43 +02:00
Bram Kragten b390e7bed1 Fix sidebar derived style (#5493) 2020-04-08 20:22:01 +02:00
Bram Kragten 903f92f94a Update developer-tools-state.js 2020-04-08 15:23:22 +02:00
Bram Kragten ebb20abee0 Make unavailable elements disabled (#5386)
* Make unavailable elements disabled

* Unused

* Add checks for unknown

* Update hui-weather-entity-row.ts
2020-04-08 13:58:36 +02:00
Joakim Sørensen 2253275640 Filter add-ons in the store based on advanced mode (#5486) 2020-04-08 13:49:37 +02:00
Bram Kragten 7ddfe3c80b Fix cast panel view (#5488) 2020-04-08 12:36:52 +02:00
Bram Kragten 4388d82076 Fix gallery translation and add more demos (#5473)
* Fix gallery translation and add more demos

* Update provide_hass.ts

* Update demo-hui-alarm-panel-card.ts
2020-04-08 12:36:29 +02:00
Bram Kragten 4f70ec7dc2 Set correct lang attribute (#5479)
* Set correct lang attribute

* Update lit-localize-lite-mixin.ts

* Update translations-mixin.ts

* Remove lang=""

* Move logic out of mixin
2020-04-08 12:36:06 +02:00
Bram Kragten a71f42366a Fix first logbook item not being shown (#5491) 2020-04-08 12:23:44 +02:00
HomeAssistant Azure e9bb9fdafe [ci skip] Translation update 2020-04-08 00:32:43 +00:00
Bram Kragten dd49ea6f20 Merge pull request #5487 from home-assistant/dev
20200407.1
2020-04-07 21:18:38 +02:00
Bram Kragten 92de202e0b Bumped version to 20200407.1 2020-04-07 20:35:18 +02:00
Bram Kragten 1d02b69f52 Fix execute button on automation list (#5484) 2020-04-07 17:33:44 +02:00
Bram Kragten 1dcd913c04 Merge pull request #5481 from home-assistant/dev
20200407.0
2020-04-07 15:58:47 +02:00
Bram Kragten 471a5f8407 Bumped version to 20200407.0 2020-04-07 15:42:02 +02:00
Bram Kragten 7b97ac2f6f Add padding to no logbook message (#5477) 2020-04-07 15:18:40 +02:00
Bram Kragten e673d90b3f Allow header of mfa dialog to wrap (#5478) 2020-04-07 15:18:23 +02:00
Zack Arnett 764234f744 Icon pickers (#5453) 2020-04-07 09:03:36 -04:00
Zack Arnett 6ca944b7ef Shopping Cart: CSS HTML updates (#5463)
* Fix css

* click
2020-04-07 09:03:19 -04:00
Bram Kragten c574556deb Missing imports (#5476) 2020-04-07 13:52:45 +02:00
Bram Kragten c04e1adea2 Add import for ha-state-icon (#5474)
* Add import for ha-state-icon

* Update ha-config-device-page.ts
2020-04-07 12:18:00 +02:00
HomeAssistant Azure 5eb11349fc [ci skip] Translation update 2020-04-07 00:32:43 +00:00
Paulus Schoutsen b3beb7ef85 Fix dynamic import in gallery (#5472) 2020-04-06 22:29:52 +02:00
Bram Kragten ec95000fbc Merge pull request #5471 from home-assistant/dev
20200406.0
2020-04-06 19:51:20 +02:00
Bram Kragten 53f0c01073 Bumped version to 20200406.0 2020-04-06 17:00:16 +02:00
Bram Kragten 42d5349db7 Fix user config UI for mobile (#5469) 2020-04-06 16:42:06 +02:00
Zack Arnett f36a1bbf4a desc (#5443) 2020-04-06 10:33:57 -04:00
Xiaonan Shen e9945abf2f Add modal to hui-dialog-delete-card (#5465) 2020-04-06 16:24:30 +02:00
Bram Kragten 71ba192c38 Add error logs to safe mode card (#5452)
* Add error logs to safe mode card

* Remove actions
2020-04-06 16:08:35 +02:00
HomeAssistant Azure e8a7671c25 [ci skip] Translation update 2020-04-06 00:43:01 +00:00
HomeAssistant Azure 17138f78b8 [ci skip] Translation update 2020-04-05 00:33:00 +00:00
Paulus Schoutsen 46c6f86d6a Always load error log in safe mode (#5442) 2020-04-04 17:46:52 +02:00
Zack Arnett ae1c519d3a Entity Row: Input Number Slider (#5440) 2020-04-04 17:42:06 +02:00
David F. Mulcahey fd9299cb3d Fix another ZHA import (#5446) 2020-04-04 17:39:40 +02:00
Pascal Vizeli a9be870fd3 Update azure-pipelines-release.yml for Azure Pipelines 2020-04-04 13:03:31 +02:00
Pascal Vizeli 34f61fd6dc Update azure-pipelines-release.yml for Azure Pipelines 2020-04-04 13:03:14 +02:00
HomeAssistant Azure e568e2ae21 [ci skip] Translation update 2020-04-04 00:32:42 +00:00
Pascal Vizeli 0656343a91 Update azure-pipelines-netlify.yml for Azure Pipelines 2020-04-03 18:52:44 +02:00
Paulus Schoutsen fa2773af9b Nightly build gallery. 2020-04-03 09:48:33 -07:00
Bram Kragten a438439ce0 Merge pull request #5436 from home-assistant/dev
20200403.0
2020-04-03 18:04:07 +02:00
Bram Kragten da73c9d83d Bumped version to 20200403.0 2020-04-03 17:47:16 +02:00
Bram Kragten a8f9f7ac7a Datatable fab padding (#5432)
* Add padding for fab

* Add hasFab property

* Simplify

* Remove query

* Change to empty row
2020-04-03 17:46:19 +02:00
Zack Arnett 006d989943 Edit Options: Overflow Menu Fix (#5433)
* Adds no wrap and removes top and bottom padding

* Small updates for clean up
2020-04-03 17:22:40 +02:00
Bram Kragten 82d6909957 Add rebuild to conditional and always show in edit mode (#5429) 2020-04-03 15:26:18 +02:00
Thomas Lovén 12a7fc9337 Fix outline on mouseover in firefox (#5430) 2020-04-03 15:25:53 +02:00
Bram Kragten 0241334656 Fixes for horizontal stack optimization (#5427) 2020-04-03 13:42:37 +02:00
Bram Kragten b217291b04 Don't cache all config pages (#5428) 2020-04-03 13:42:23 +02:00
HomeAssistant Azure aa211df0ad [ci skip] Translation update 2020-04-03 00:32:55 +00:00
Zack Arnett 8eebf51447 Card Picker: Fix Clicking cards (#5425)
* fix

* reviews
2020-04-02 17:52:43 -04:00
Zack Arnett f5d834d130 fix (#5424) 2020-04-02 17:51:38 -04:00
Zack Arnett 0f2eae4091 Delete Card Action: Undo in Toast (#5405)
* Adding insert card and delete undo

* Fix Toast style

* Localize

* Optional

* Comments
2020-04-02 23:36:08 +02:00
David F. Mulcahey 81d2334f48 Fix element imports in ZHA config panel (#5419) 2020-04-02 20:37:33 +02:00
Bram Kragten 45384205eb Also fix for wide (#5417) 2020-04-02 17:47:20 +02:00
Bram Kragten 4150ac045d Gui editor fixes (#5416)
* Gui editor fixes

* Fix

* Add change mode button to conditional card editor
2020-04-02 17:47:01 +02:00
Bram Kragten 793a704871 Update hui-media-player-entity-row.ts 2020-04-02 17:46:07 +02:00
Bram Kragten 9e2606f1c8 Data table display fixes (#5415) 2020-04-02 16:39:59 +02:00
Bram Kragten 4c4549eb37 Merge pull request #5402 from zsarnett/shopping-card-fix
Shopping List Card: Padding Bottom
2020-04-02 11:37:07 +02:00
HomeAssistant Azure 96f7a4231b [ci skip] Translation update 2020-04-02 00:32:54 +00:00
Zack Arnett c4cf248a1e Has header padding 2020-04-01 20:24:52 -04:00
Zack Arnett 50717b4d19 PAdding 2020-04-01 19:21:53 -04:00
Bram Kragten da80a3896d Merge pull request #5399 from home-assistant/dev
20200401.0
2020-04-01 19:40:40 +02:00
Bram Kragten cc374e0478 Bumped version to 20200401.0 2020-04-01 19:24:44 +02:00
Ian Richardson 26d27f8be9 ♻️ change call-service row to button row (#4744)
* ♻️ change call-service row to button row

* address comments

* cleanup

* address comments

* remove unused function

* address comments

* super

* Add CallServiceConfig back in

* Update types.ts

* Update types.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-01 19:18:38 +02:00
Zack Arnett 4767fcbdfc Card Editor: Add Toggle to Dialog (#5245)
* Add Toggle to dialog

* Fix for Stack Cards

* reviews

* Reviews
2020-04-01 19:17:16 +02:00
Bram Kragten e1b48dd2a2 Always render conditional elements (#5398) 2020-04-01 19:15:48 +02:00
Zack Arnett 087492fc0b Sensor Card: Use Entity card with graph footer (#5322)
* Sensor card changes

* import move

* reviews

* Use spread Operator
2020-04-01 12:12:19 -04:00
Bram Kragten 525703d376 Add link to area on device page (#5396) 2020-04-01 17:39:07 +02:00
Bram Kragten 236bc6aefa Change user dialog (#5397)
* Change user dialog

* Update
2020-04-01 17:38:22 +02:00
Ian Richardson ec4c29c52c add attribute row (#4723)
*  add attribute row

* accidental import

* Capitalize

* cleanup after rebase

* Update create-row-element.ts

* address comments

* address comments

* Update en.json

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-04-01 11:35:47 -04:00
Bram Kragten d5ed1c4c41 Clean up theme settings (#5395) 2020-04-01 17:26:38 +02:00
Bram Kragten dfe808cfb4 Show volume slider on smaller screens (#5385)
* Show volume slider on smaller screens

* Update hui-media-player-entity-row.ts

* Beter deal with unavailable and off states
2020-04-01 17:24:22 +02:00
Zack Arnett da229d9b65 User in Markdown (#5393) 2020-04-01 11:17:52 -04:00
Zack Arnett e54d904e4c Weather Row: Generic (#5389)
* Bye lots of hours

* Merge image states into states we have

* add space
2020-04-01 16:58:05 +02:00
Bram Kragten 2e17c96866 Add icons to integration page (#5388) 2020-04-01 11:22:40 +02:00
Ian Richardson ddeb16463d allow a notification to have no title (#5392) 2020-04-01 11:07:15 +02:00
Ian Richardson 465efa460e handle brightness reporting while light off (#5391) 2020-04-01 11:06:58 +02:00
HomeAssistant Azure c351402556 [ci skip] Translation update 2020-04-01 00:32:55 +00:00
Hoytron 5f765e8b96 Add feature map history (#5331)
* add feature: show a geocode history on hui-map-card

* refactor feature to use hass cache via rest api and omit osm request

* prepare for PR

* squash duplicates of allEntities to omit duplicated layers on the map

* refactor to use device_tracker entity

* add asdf's .tool-versions file to gitignore

* add lokalize and cleanup

* ajust  logic to match backend api

* add changes to fit new backend behaviour

* fix error in history ts

* cleanup history for map card
2020-03-31 14:25:44 -07:00
Zack Arnett 6f556f69d6 Weather Entity Row: Row Addition (#4959)
* Create file

* Weather Row

* Comments

* Find high and low for hourly

* Add images

* testing

* Weather images in row

* lint

* Updated design

* css changes - dont show high unless it is the high

* Clean

* Sean Suggestion

* Update hui-weather-entity-row.ts

* Reviews

* move tab index

* reviews

* Update src/panels/lovelace/entity-rows/hui-weather-entity-row.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* pretty

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-31 16:07:05 -04:00
Bram Kragten 2439827eff Revert "Use correct suffix for elevation" (#5382)
This reverts commit b15270dfe2.
2020-03-31 21:25:48 +02:00
Ian Richardson 5f467f82e0 media-row: fix when to show power toggle (#5379) 2020-03-31 19:49:59 +02:00
Ian Richardson 6692fa439a hold/double actions for light-card (#5361)
* hold/double actions for light-card

* lint
2020-03-31 17:52:20 +02:00
imgbot[bot] 0535247bb3 [ImgBot] Optimize images (#5378)
*Total -- 1,745.75kb -> 1,539.81kb (11.8%)

/demo/public/assets/teachingbirds/meteogram.png -- 66.71kb -> 24.48kb (63.31%)
/demo/public/assets/teachingbirds/background_square.png -- 0.76kb -> 0.37kb (51.98%)
/demo/public/assets/arsaboo/icons/security_armed_red.png -- 6.38kb -> 3.67kb (42.5%)
/demo/public/assets/jimpower/background-15.jpg -- 231.78kb -> 159.68kb (31.11%)
/public/static/images/image-broken.svg -- 0.56kb -> 0.42kb (23.99%)
/demo/public/assets/arsaboo/icons/security_disarmed.png -- 4.21kb -> 3.25kb (22.7%)
/demo/public/assets/arsaboo/icons/automation_enabled.png -- 3.96kb -> 3.08kb (22.32%)
/demo/public/assets/jimpower/cardbackK.png -- 10.56kb -> 8.21kb (22.22%)
/demo/public/assets/arsaboo/icons/abode_enabled.png -- 3.98kb -> 3.16kb (20.62%)
/demo/public/assets/arsaboo/icons/ecobee_blank.png -- 2.18kb -> 1.78kb (18.22%)
/demo/public/assets/arsaboo/floorplans/ecobee_blank.png -- 2.17kb -> 1.78kb (17.87%)
/demo/public/assets/arsaboo/icons/automation_disabled.png -- 6.89kb -> 5.73kb (16.82%)
/demo/public/assets/jimpower/home/james_10.jpg -- 73.21kb -> 61.89kb (15.46%)
/demo/public/assets/arsaboo/icons/camera_patio_streaming.png -- 11.63kb -> 9.88kb (14.98%)
/demo/public/assets/arsaboo/icons/Harmony.png -- 3.83kb -> 3.25kb (14.95%)
/demo/public/assets/arsaboo/icons/light_off.png -- 9.53kb -> 8.51kb (10.77%)
/demo/public/assets/arsaboo/icons/tv_enabled.png -- 5.48kb -> 4.90kb (10.69%)
/demo/public/assets/jimpower/home/bus_10.jpg -- 36.36kb -> 32.58kb (10.4%)
/demo/public/assets/kernehed/bella.jpg -- 33.09kb -> 30.29kb (8.44%)
/demo/public/assets/arsaboo/images/camera.backyard.jpg -- 81.15kb -> 74.80kb (7.82%)
/demo/public/assets/kernehed/oscar.jpg -- 25.32kb -> 23.34kb (7.81%)
/demo/public/assets/arsaboo/images/camera.patio.jpg -- 63.13kb -> 58.52kb (7.29%)
/demo/public/assets/arsaboo/images/camera.porch.jpg -- 76.49kb -> 70.95kb (7.25%)
/demo/public/assets/arsaboo/icons/light_on.png -- 12.03kb -> 11.19kb (6.97%)
/demo/public/assets/jimpower/home/tina_4.jpg -- 59.69kb -> 55.92kb (6.31%)
/gallery/public/images/album_cover.jpg -- 26.11kb -> 24.46kb (6.31%)
/demo/public/assets/teachingbirds/clothes_drying_square.jpg -- 31.93kb -> 29.98kb (6.11%)
/demo/public/assets/arsaboo/images/camera.driveway.jpg -- 59.47kb -> 55.84kb (6.1%)
/demo/public/assets/teachingbirds/laundry_running_square.jpg -- 58.68kb -> 55.61kb (5.22%)
/demo/public/assets/kernehed/camera.entre.jpg -- 65.84kb -> 62.49kb (5.09%)
/demo/public/assets/teachingbirds/Stefan_square.jpg -- 11.25kb -> 10.68kb (5.06%)
/demo/public/assets/teachingbirds/isa_square.jpg -- 18.90kb -> 17.98kb (4.88%)
/demo/public/assets/jimpower/security/motion_3.jpg -- 87.09kb -> 82.99kb (4.71%)
/demo/public/assets/teachingbirds/roomba_square.jpg -- 32.23kb -> 30.82kb (4.39%)
/demo/public/assets/teachingbirds/laundry_clean_2_square.jpg -- 31.87kb -> 30.48kb (4.34%)
/demo/public/assets/teachingbirds/folded_clothes_square.jpg -- 28.60kb -> 27.41kb (4.16%)
/demo/public/assets/arsaboo/icons/abode_disabled.png -- 8.74kb -> 8.38kb (4.06%)
/gallery/public/images/netflix.jpg -- 20.19kb -> 19.39kb (4%)
/demo/public/assets/teachingbirds/roomba_bw_square.jpg -- 15.97kb -> 15.34kb (3.97%)
/demo/public/assets/teachingbirds/trash_square.jpg -- 29.50kb -> 28.39kb (3.76%)
/demo/public/assets/teachingbirds/cleaning_square.jpg -- 38.57kb -> 37.19kb (3.59%)
/demo/public/assets/teachingbirds/dryer_square.jpg -- 18.78kb -> 18.16kb (3.32%)
/gallery/public/images/album_cover_2.jpg -- 129.79kb -> 125.62kb (3.21%)
/demo/public/assets/teachingbirds/House_square.jpg -- 40.59kb -> 39.31kb (3.15%)
/demo/public/assets/arsaboo/icons/tv_disabled.png -- 10.24kb -> 9.93kb (3.08%)
/demo/public/assets/teachingbirds/washer_square.jpg -- 20.52kb -> 20.00kb (2.52%)
/demo/public/assets/teachingbirds/mailbox_square.jpg -- 42.97kb -> 41.98kb (2.3%)
/demo/public/assets/teachingbirds/trash_bear_bw_square.jpg -- 17.60kb -> 17.35kb (1.46%)
/demo/public/assets/teachingbirds/guests_square.jpg -- 49.05kb -> 48.38kb (1.38%)
/demo/public/assets/teachingbirds/mailbox_bw_square.jpg -- 19.44kb -> 19.25kb (0.98%)
/demo/public/assets/arsaboo/icons/tv_on2.png -- 0.79kb -> 0.78kb (0.25%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-03-31 16:50:20 +02:00
Thomas Lovén a0a4fcaf5f Allow custom cards in card picker (#5122)
* Allow custom cards in card picker

* Lint. "Custom:" prefix to card names

* Address review comments

* Simplifications. Translation fixes.

* Less magic

* Move CUSTOM_TYPE_PREFIX

* Update hui-card-picker.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-31 16:20:09 +02:00
Zack Arnett 454d81facc View Editor: Badge Preview (#5335)
* Badge Preview

* Move Badge preview

* Clean

* Error card + clean

* remove try catch
2020-03-31 13:30:52 +02:00
Bram Kragten 0bfa8260fa Merge pull request #5372 from dmulcahey/dm/zha-tables-clear-selections
Clear selections in ZHA data tables
2020-03-31 13:25:50 +02:00
Bram Kragten f2124f1c95 Merge pull request #5373 from zsarnett/entity-card-fix
Entity Card: Fix Value clipping in editor
2020-03-31 13:24:34 +02:00
HomeAssistant Azure 451bc2370a [ci skip] Translation update 2020-03-31 00:32:48 +00:00
Zack Arnett 0b17642c31 Fix editor value clipping 2020-03-30 20:19:18 -04:00
David Mulcahey 214dc25576 clear selections 2020-03-30 20:01:04 -04:00
Zack Arnett 158eddfd44 Entity Card: Card Addition (#4971)
* Review to changed Src translations

* Reviews

* side by side theme

* Allow user to specify unit

* Add unit back update for headerfooter and editor

* Clean

* Unavailable for attribute that doesn't exist

* fix merge

* Fix from rebasing

* reviews

* Localize State

* fix for localize

* css

* reviews

* Break the rules
2020-03-30 19:49:02 -04:00
Pascal Vizeli 5daa6dbd25 [skip ci] Simplify release pipeline 2020-03-30 22:52:27 +02:00
Pascal Vizeli 645ef3e61f [skip ci] Simplify release pipeline 2020-03-30 22:51:42 +02:00
Bram Kragten 3be4b9d79b Merge pull request #5369 from home-assistant/dev
20200330.0
2020-03-30 21:34:24 +02:00
Bram Kragten 5dcea51712 Fix default path for demo 2020-03-30 21:20:06 +02:00
Bram Kragten 6995968d50 Update ha-sidebar.ts 2020-03-30 20:59:12 +02:00
Bram Kragten c4cb42f3c2 Merge branch 'master' into dev 2020-03-30 20:57:24 +02:00
Bram Kragten 0d4a7a2b3e Bumped version to 20200330.0 2020-03-30 20:53:19 +02:00
Bram Kragten 20cc9c9b42 Update user config pages (#5354)
* Update user config pages

* remove user-editor

* Update

* Update dialog-add-user.ts
2020-03-30 20:52:53 +02:00
Bram Kragten 8a6bd04543 Add default dashboard selection to profile page (#5360)
* Add default dashboard selection to profile page

* Comments

* Console.bye
2020-03-30 16:08:36 +02:00
Bram Kragten 263138a388 MIgrate scripts to data table (#5352)
* MIgrate scripts to data table

* Update imports

* Update

* Lint
2020-03-30 15:38:15 +02:00
Bram Kragten e645342131 Allow to start with empty view on take control (#5357)
* Allow to start with empty view on take control

* Localize
2020-03-30 15:37:59 +02:00
Bram Kragten 6e4c707f9e Migrate scene config to data table (#5351)
* Migrate scene config to data table

* Remove unused styles

* Update ha-scene-dashboard.ts

* Lint + help

* Update ha-scene-dashboard.ts
2020-03-30 15:06:29 +02:00
Bram Kragten fca286d6c0 Change automation picker to data table (#5344)
* Change automation picker to data-table

* Update ha-automation-picker.ts

* Update ha-automation-picker.ts

* Update ha-automation-picker.ts

* Add edit button + disabled tooltip

* Fix translation key

* Remove unused

* Comments and fixes

* Update ha-automation-picker.ts
2020-03-30 14:21:55 +02:00
Bram Kragten 5a2e08647f Add area config page (#5343)
* Add area config page

* Comments

* Update ha-config-area-page.ts

* Update ha-config-area-page.ts
2020-03-30 14:21:36 +02:00
Bram Kragten f6dac98abd Update layout of device info page (#5342)
* Update layout of device info page

* Comments

* <a> and simplify layout

* Update ha-config-device-page.ts
2020-03-30 14:21:21 +02:00
Pascal Vizeli ddb525f6cd Fix hass.io panel for older version (#5365)
* Fix hass.io panel for older version

* Fix lint
2020-03-30 11:38:54 +02:00
HomeAssistant Azure f7ee712456 [ci skip] Translation update 2020-03-30 00:40:34 +00:00
Ian Richardson ff873e2f71 add name option to buttons row (#5083)
* add name option to buttons row

* explicit show_name

* Update src/panels/lovelace/components/hui-buttons-base.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/components/hui-buttons-base.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* lint

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-29 13:49:27 +02:00
Ian Richardson 54b57e6222 add volume slider to media_player row (#4743)
*  add volume slider to media_player row

* add more controls

* flex slider

* override width

* volume buttons when narrow

* address comments

* Updates for rebase

* attempt to use debounce. not working

* remove log

* fix observer

* address some review comments

* unobserve

* address comments
2020-03-29 13:30:52 +02:00
HomeAssistant Azure 375abfb95e [ci skip] Translation update 2020-03-29 00:32:56 +00:00
HomeAssistant Azure 30a38fa6d1 [ci skip] Translation update 2020-03-28 00:34:07 +00:00
Pascal Vizeli 554c0b692d Fix supervisor panel (#5348)
* Fix supervisor panel

* Lint

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-03-27 11:55:55 -07:00
HomeAssistant Azure 61ac831882 [ci skip] Translation update 2020-03-27 00:33:27 +00:00
Bram Kragten 59e89a0daf Sandbox iframe 2020-03-26 11:39:01 +01:00
Zack Arnett 1e3950cd1d Add shopping list (#5339) 2020-03-26 11:32:40 +01:00
Zack Arnett f514ea453c Delete Card: Add Card Preview to Dialog (#5325)
* Delete Card Dialog

* Update with to be the max for a column

* Comments

* remove open and wait for render to resize I think

* Review

* fire event from dialog
2020-03-26 11:13:13 +01:00
Paulus Schoutsen cc046478e5 Catch LL config not found exception in preload (#5340) 2020-03-26 10:47:12 +01:00
HomeAssistant Azure a17c1052cd [ci skip] Translation update 2020-03-26 00:32:45 +00:00
HomeAssistant Azure 2408f9b8fa [ci skip] Translation update 2020-03-25 00:32:35 +00:00
Aidan Timson 6aae1b3378 Fix Default Lovelace Panel Title (#5301)
* Fix lovelace panel title

* Fix types error

* Revert and workaround null type

* Update src/data/panel.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update panel.ts

* Update panel.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-24 15:08:51 +01:00
Pascal Vizeli ed51223226 Update azure-pipelines-release.yml for Azure Pipelines 2020-03-24 14:16:21 +01:00
sdotter 013808b7f5 Fixed iframe panel unnecessary scrollbar (on 100vh -64px) (#5326)
* Fixed iframe panel unnecessary scrollbar (on 100vh -64px)

* Fixed iframe panel unnecessary scrollbar (removed margin-top)

No need for margin-top
2020-03-24 13:18:45 +01:00
HomeAssistant Azure af584e1d12 [ci skip] Translation update 2020-03-24 00:57:08 +00:00
J. Nick Koston 3763d7a1d0 Use horizontal control icons for devices that commonly move horizontally (#5309)
* Use horizontal control icons for devices that
commonly move horizontally including:

awning
curtain
gate

* no need to check

* remove debug

* reduce - js is so permissive

* remove curtain
2020-03-23 20:33:45 +01:00
Zack Arnett ce92add096 Footer/Header: Graph (#5273)
* Add Graph as a footerheader option

* Move get Coordinates to a new file

* await

* Comments
2020-03-23 09:46:56 -04:00
HomeAssistant Azure 40c94b6596 [ci skip] Translation update 2020-03-23 00:32:58 +00:00
Aidan Timson c894bc2e40 Fix icon button padding (#5312) 2020-03-23 00:18:13 +01:00
HomeAssistant Azure 415a4fa1af [ci skip] Translation update 2020-03-22 00:32:46 +00:00
Bram Kragten b9367a33a8 Invalidate theme cache when switching demo's (#5305)
* Invalidate theme cache when switching demo's

* Move to mock hass
2020-03-21 20:19:13 +01:00
Bram Kragten 7170f06c08 Add checks for arrays in compute unused entities (#5307) 2020-03-21 20:18:40 +01:00
J. Nick Koston f2578a58b4 Add "gate" device class for DEVICE_CLASS_GATE (#5299)
* Add "gate" device class for DEVICE_CLASS_GATE

Gates are found outside of a structure and are typically part of a fence.

When opening or closing a garage door, it was impossible to tell
if you had hit the button or not even though the underlying state
was reported as "opening". This lead to confusion and multiple
clicks to open a garage door which can cause the door to stop
opening and result in frustration.

Add icons for gate and garage opening and closing states.

* Add "gate" device class for DEVICE_CLASS_GATE

Gates are found outside of a structure and are typically part of a fence.

When opening or closing a garage door, it was impossible to tell
if you had hit the button or not even though the underlying state
was reported as "opening". This lead to confusion and multiple
clicks to open a garage door which can cause the door to stop
opening and result in frustration.

Add icons for gate and garage opening and closing states.

* de-bold
2020-03-21 11:20:06 -07:00
Bram Kragten 1950656bd5 Add ability to edit panel view cards (#5257)
* Add ability to edit panel view cards

* Localize and fix some styling
2020-03-21 16:51:44 +01:00
Bram Kragten eed3263c70 Optimize cards for horizontal stack (#5254) 2020-03-21 15:59:30 +01:00
Robert Resch 02e01626f5 fix #5300: always show attribute step (#5302) 2020-03-21 15:15:20 +01:00
HomeAssistant Azure 41a2d9604e [ci skip] Translation update 2020-03-21 00:32:47 +00:00
Bram Kragten 7d6f188bfc Change themes logic (#5232)
* Fix themes

* Update hui-view.ts

* Comments and bail out

* Update apply_themes_on_element.ts

* refactor, move meta to theme mixin, adapt lovelace theme picker

* console.bye

* Comments

* Optimizations

* Bail out early is no hex value

* Cache processed themes

* Remove hex-rgb cache
2020-03-20 21:30:20 +01:00
Bram Kragten 15a144f17a Add iframe panel mode and align aspect ratio option with map card (#5289)
* Add iframe panel mode and align aspect ratio option with map card

* lint
2020-03-20 17:53:30 +01:00
Erik Montnemery c54f2b66da Add delete button to MQTT devices' config page (#5117)
* Add delete button to MQTT devices' config page

* Move delete button to its own card

* Fix review comments

* Fix review comments

* Fix review comments

* Use haStyle instead of haStyleDialog
2020-03-20 15:53:36 +01:00
Bram Kragten 685a0807d8 Fix alarm panel (#5291)
Fixes https://github.com/home-assistant/frontend/issues/5073
2020-03-20 15:21:25 +01:00
Zack Arnett 0d404e0e37 Stub Configs: Add Type (#5206)
* Add Type

* Add return type

* Lint

* Fix map

* map fix

* Comments
2020-03-20 12:41:28 +01:00
Zack Arnett 39bb859f57 Fix tooltip overflow (#5282) 2020-03-20 12:01:18 +01:00
Zack Arnett 90e32b7e45 Hui Unavailable: Fix Opacity (#5283)
* Fix unavailable

* opacity
2020-03-20 11:49:46 +01:00
Zack Arnett 63a2d9dd18 alphabet english (#5284) 2020-03-20 11:48:02 +01:00
HomeAssistant Azure 4982693883 [ci skip] Translation update 2020-03-20 00:32:48 +00:00
Zack Arnett f4211e3fa3 Find Entites: Filter Unavailable - Used and unused entities required (#5208)
* Update Find Entities

* lint

* Filter until max - entitiesFill-> entitiesFallback

* Comment - Move unav - unk filter to picker

* lint

* Var name update

* remove unnessary check

* add it back and fix logic

* use typescript ? in condition

* comments

* lint

* Compute used once

* pass in hass

* Return set

* fix merge

* Optimize unused entities in find
2020-03-19 14:39:14 -04:00
Paulus Schoutsen eacf58b5a5 Update color count in color extraction (#5270)
* Update color count in color extraction

* add the images
2020-03-18 23:12:27 -04:00
HomeAssistant Azure f9349bc731 [ci skip] Translation update 2020-03-19 00:32:53 +00:00
Bram Kragten 3840671764 Remove app-route from hui-root (#5267)
* Remove app-route from hui-root

* Update hui-root.ts
2020-03-18 15:37:44 -07:00
Bram Kragten fd62cf02d6 Fix button card not showing visual editor on add (#5256) 2020-03-18 23:32:03 +01:00
Bram Kragten 254744cd7d Bumped version to 20200318.1 2020-03-18 23:29:00 +01:00
Zack Arnett 595d04c922 Fix theme update (#5246) 2020-03-18 23:28:50 +01:00
Bram Kragten a3969fe2c8 Fix stack editor in stack editor (#5255) 2020-03-18 23:28:42 +01:00
Paulus Schoutsen 220e4134b7 Fix calculating title if panels not loaded yet (#5262) 2020-03-18 23:28:35 +01:00
Bram Kragten 56e176a6f1 Fix stack editor in conditional card (#5265) 2020-03-18 23:28:30 +01:00
Bram Kragten 780c15d6b3 Fix stack editor in conditional card (#5265) 2020-03-18 21:29:09 +01:00
Bram Kragten 55ff848b78 Fix stack editor in stack editor (#5255) 2020-03-18 20:51:00 +01:00
Zack Arnett dbe829bc7d Card Editor: Copy Card (#5249)
* Copy Card Feature

* dUplicate
2020-03-18 20:33:59 +01:00
Zack Arnett 8d0508f320 Unused Entities: Only Show Fab when selection is made (#5248)
* Only Show Fab when selection is made

* reviews
2020-03-18 20:33:36 +01:00
Paulus Schoutsen 2741bb8b38 Fix calculating title if panels not loaded yet (#5262) 2020-03-18 20:32:35 +01:00
Paulus Schoutsen 16cadd53cf Set data as property. (#5263) 2020-03-18 20:27:44 +01:00
Olivér Falvai a8d21c6112 Add loading text for long-running integration install step (#4378)
* Added optional label for dialog-data-entry-flow

* Use correct loading element

* Update src/translations/en.json

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Minor template adjustment

* Revert accidental change of PR templates

* Revert accidental change of PR templates

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-18 17:00:08 +01:00
Bram Kragten 6b2e707653 Update en.json 2020-03-18 12:49:32 +01:00
Bram Kragten 205b7451fa Update hui-gauge-card.ts (#5241) 2020-03-18 12:48:16 +01:00
Zack Arnett 1d3aeec0de more info (#5247) 2020-03-18 12:47:59 +01:00
Zack Arnett ac911dcd31 Fix theme update (#5246) 2020-03-18 12:47:20 +01:00
Bram Kragten 89a94b3efc Merge pull request #5252 from home-assistant/dev
20200318.0
2020-03-18 12:33:12 +01:00
Bram Kragten 71793dcfa5 Cast fix for urlPath === "lovelace" (#5242) 2020-03-18 12:19:01 +01:00
Bram Kragten 1e527a8350 Bumped version to 20200318.0 2020-03-18 12:18:24 +01:00
Bram Kragten 262b12eb93 Fix dialog conent color (#5251)
* Fix ha-dialog content color

* Fix
2020-03-18 12:17:01 +01:00
HomeAssistant Azure 7fb1e699ae [ci skip] Translation update 2020-03-18 00:32:39 +00:00
Aidan Timson 9ee647329b Fix Wrong Index for Filtered Tabs (#5221)
* Fix wrong index for filtered tabs

* Set active tab to actual tab and use path

* Update src/layouts/hass-tabs-subpage.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update src/layouts/hass-tabs-subpage.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-17 20:44:07 +01:00
HomeAssistant Azure cd6dcec644 [ci skip] Translation update 2020-03-17 00:32:43 +00:00
Bram Kragten d8f248c60e Merge pull request #5234 from home-assistant/dev
20200316.1
2020-03-16 21:18:04 +01:00
Aidan Timson 2925b930ad Set Title to Current Panel (#5220)
* Set title to current panel

* Move to mixin

* Naming

* guard clause
2020-03-16 20:54:55 +01:00
Bram Kragten 127aaba47b Add UI for reload resources service (#5229)
* Add UI for reload resources service

* Update hui-root.ts

* Check for config of main panel
2020-03-16 20:52:21 +01:00
Bram Kragten 8bc8761af6 Bumped version to 20200316.1 2020-03-16 20:32:59 +01:00
Bram Kragten a88321d243 Only show url path field in advanced mode (#5233) 2020-03-16 20:32:13 +01:00
Bram Kragten 4e19232960 Merge pull request #5230 from Tediore/patch-3
Minor corrections and cosmetic improvements
2020-03-16 14:51:14 +01:00
Jay 5b95bdb6b7 Minor corrections and cosmetic improvements
Updated the correct file this time...
2020-03-16 08:15:18 -05:00
Bram Kragten 0fc59ccb16 Merge pull request #5228 from home-assistant/dev
20200316.0
2020-03-16 12:38:28 +01:00
Bram Kragten a9daf9835a Bumped version to 20200316.0 2020-03-16 12:24:39 +01:00
Zack Arnett 2110d9c3b9 Map Card: Fix Dark Mode Toggle (#5209)
* Fix Editor

* comment
2020-03-16 12:23:13 +01:00
Zack Arnett b77e0b8125 Card Picker: Remove Scale (#5205)
* remove scalling

* add zoom back
2020-03-16 12:22:56 +01:00
Zack Arnett 5197f102ea Webpage Card: Fix Aspect Ratio in Editor (#5210)
* fix Ifram editor

* suffix
2020-03-16 12:22:41 +01:00
Bram Kragten 447d4604c6 Require hyphen in lovelace dashboard url path (#5214)
* Require hyphen in url path

* Update dialog-lovelace-dashboard-detail.ts
2020-03-16 12:22:21 +01:00
Jason Lachowsky 5a84e34f93 Corrected minor misspellings (#5225) 2020-03-16 11:56:04 +01:00
Jay fb6d3cccdc Cosmetic improvements, minor corrections (#5199)
Made some minor corrections:
"it's" > "its" ("its" is the possessive form of "it")
"setup" > "set up" ("setup" is a noun, "set up" is a verb)

Cosmetic improvement:
"can not" > "cannot" (both are correct, but "cannot" is usually more common, at least in the US. Strictly a matter of opinion here so no worries if you want this reversed.)
2020-03-16 11:51:43 +01:00
HomeAssistant Azure fad3cb185b [ci skip] Translation update 2020-03-16 00:32:44 +00:00
HomeAssistant Azure f61ce395f5 [ci skip] Translation update 2020-03-15 00:32:49 +00:00
Franck Nijhof 17f3299152 Fix brightness_pct in light device turn_on action (#5201) 2020-03-13 21:58:34 -07:00
HomeAssistant Azure 17e04589d0 [ci skip] Translation update 2020-03-14 00:32:33 +00:00
Bram Kragten 4b2edde81b Merge pull request #5198 from home-assistant/dev
20200313.0
2020-03-13 20:39:21 +01:00
Bram Kragten 5d3d766f56 Bumped version to 20200313.0 2020-03-13 20:25:21 +01:00
Zack Arnett 94e2a0dea0 Media Card: Reset Marquee on Text change (#5184)
* Stop marquee on next and prev

* force stop

* clean

* This is much better

* Clean

* comments

* comment

* No more repaints
2020-03-13 20:22:49 +01:00
Paulus Schoutsen 21fe68add0 Stub config tweaks (#5197)
* Stub config tweaks

* Lint
2020-03-13 20:22:34 +01:00
Bram Kragten af6ebea4a3 Fix translations in production builds (#5192)
* Fix translations in production builds

* Make env functions
2020-03-13 10:19:32 -07:00
Paulus Schoutsen 3c17ee03b6 Improve color extraction for media control card (#5189)
* Improve color extraction

* Lazy load media control

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

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Extract constant

* Fix media control demo

* Remove quality(1)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-13 10:01:36 -07:00
Bram Kragten 0c3c007faf Check if entities is an array (#5193) 2020-03-13 17:48:49 +01:00
Zack Arnett 330eb0957b Update Gauge CSS (#5182) 2020-03-13 14:52:12 +01:00
HomeAssistant Azure 02923475e6 [ci skip] Translation update 2020-03-13 01:16:04 +00:00
Zack Arnett 01ff97b366 Fix Marquee Ellipsis (#5183) 2020-03-12 19:08:51 -04:00
Bram Kragten f0a4a99654 Merge pull request #5181 from home-assistant/dev
20200312.0
2020-03-12 21:43:28 +01:00
Bram Kragten 02d2368654 Bumped version to 20200312.0 2020-03-12 21:05:35 +01:00
Bram Kragten e19d07e434 Typos (#5180)
Fixes #5179
Fixes #5178
2020-03-12 21:04:46 +01:00
Bram Kragten 669ed5cb28 Dont create new array on every render (#5177) 2020-03-12 21:02:05 +01:00
Bram Kragten 785ae4a83d Fix for views with url starting with a number (#5176) 2020-03-12 20:49:26 +01:00
Bram Kragten d327045802 Update dialog-helper-detail.ts 2020-03-12 20:48:41 +01:00
Bram Kragten 785ef19cce Only update map if one of entities changed (#5175) 2020-03-12 20:37:54 +01:00
Bram Kragten f5653d0da5 Show if helper can be edited (#5174)
Fixes #5173
Fixes #5171
2020-03-12 20:37:33 +01:00
Bram Kragten e0a6d2efe5 Add on state to media control card (#5168) 2020-03-12 20:11:33 +01:00
Bram Kragten 9971e2e934 Fix scroll entity settings dialog (#5165)
Fixes #5144
2020-03-12 20:11:19 +01:00
Bram Kragten 558802c7dd Simplify action handler directive (#5157) 2020-03-12 20:11:05 +01:00
Bram Kragten 91edcf9b52 Fix stack size (#5155) 2020-03-12 20:10:45 +01:00
Sergey Avdeev f401aa2897 Update icon_color_css.ts (#5163) 2020-03-12 20:10:30 +01:00
Bram Kragten 1d0389327f Fix helper UI (#5161)
Fixes #5146
Fixes #5145
Fixes #5142
2020-03-12 20:10:06 +01:00
Bram Kragten 06cd7556f3 Dashboard UI fixes (#5160)
Fixes #5152
Fixes #5150
Fixes #5148
2020-03-12 20:09:55 +01:00
Bram Kragten 3b1f9a5dab Fix secondary info (#5159) 2020-03-12 20:09:41 +01:00
Bram Kragten f54cd18da4 Fix resize observer on error card (#5158)
* Fix resize observer on error card

* Update hui-media-control-card.ts
2020-03-12 20:09:27 +01:00
Zack Arnett 73e0fd614e updates transparent to be hex plus alpha of 0 (#5167) 2020-03-12 19:47:48 +01:00
Paulus Schoutsen 9b220cc6ce Extract media controls into method (#5141)
* Extract media controls into method

* address comments

* lint

* Moooorre fixes

* Fix margin

* Update demos

* Very narrow idle players show play button

* Lint

* More stuff

* Marquee on steroids
2020-03-12 10:40:03 +01:00
Zack Arnett c7a5f63e33 Fix for safari (#5143) 2020-03-12 10:06:08 +01:00
HomeAssistant Azure 11192e6065 [ci skip] Translation update 2020-03-12 00:32:46 +00:00
Bram Kragten d83b308100 Fix area dialog too wide (#5136)
* Fix area dialog to wide

* Update styles
2020-03-11 17:10:26 -07:00
Quentame f67bf6908f Refactor Freebox : add config flow + temperature sensor + signal dispatch (#4448)
* Add config flow to Freebox

* Compress image with https://tinypng.com/
2020-03-11 22:12:40 +01:00
Bram Kragten 2784edc689 Merge pull request #5135 from home-assistant/dev
20200311.1
2020-03-11 19:07:22 +01:00
Bram Kragten 8f41e99464 Bumped version to 20200311.1 2020-03-11 18:52:20 +01:00
Paulus Schoutsen 7c2b37e8ca Demo paths (#5134)
* Update paths to images in demo

* Remove some unused attributes

* Fix camera paths
2020-03-11 10:37:23 -07:00
Bram Kragten dbdbad2deb Fix closing hui-editor (#5132) 2020-03-11 15:23:31 +01:00
Bram Kragten e5db86363c Only save non system generated users and tweak text (#5131)
* Only save non system generated users and tweak text

* Clean up
2020-03-11 15:23:19 +01:00
Bram Kragten b2026c1cd7 Fix automation event trigger UI (#5130) 2020-03-11 13:47:23 +01:00
Bram Kragten b12f29afad Merge pull request #5128 from home-assistant/dev
20200311.0
2020-03-11 10:09:46 +01:00
Bram Kragten 04b23388b5 Bumped version to 20200311.0 2020-03-11 09:49:43 +01:00
Bram Kragten 7309a937e8 Bump home-assistant-js-websocket (#5127) 2020-03-11 09:38:21 +01:00
Ian Richardson 5dbcd1f726 ability to show attribute instead of state in picture-glance (#4958) 2020-03-11 09:01:00 +01:00
guillempages 3338459139 Allow state-label-element to show attributes (#4953)
* Allow state-label-element to show attributes

Add an additional (optional) parameter to the state-label element,
so that instead of showing the state, an attribute can be shown instead.

Can be used to e.g. add a climate entity to the floorplan,
but show the current temperature instead of the desired one.

* Improve style

Put the most frequent case as default in the ternary

* Remove unneeded variables

Use the _config.attribute directly instead of having a local temporary
Also remove superfluous checks for "!stateObj" (was already checked before)
2020-03-11 09:00:43 +01:00
Bram Kragten 35f17fc1d4 Add no data row when data table empty (#5113) 2020-03-11 08:42:52 +01:00
Zack Arnett e062940639 Media Card: Fix Style Maps (#5120)
* Fix style map

* Comments
2020-03-11 08:42:34 +01:00
HomeAssistant Azure ff4d5265c5 [ci skip] Translation update 2020-03-11 00:32:44 +00:00
Paulus Schoutsen 906f417436 Lazy load our elements once again (#5124) 2020-03-10 15:18:13 -07:00
Bram Kragten 1c75fe3bb8 Change marquee to css animations (#5119)
* Update hui-marquee.ts

* Change to css animation

* Comments

* tweaks

* Prevent page repaint on animation start/end
2020-03-10 17:39:16 -04:00
Bram Kragten 283e858576 Helpers: remove init values, change date/time mode picker, dont… (#5118) 2020-03-10 09:37:44 -07:00
HomeAssistant Azure 2b4ab6320b [ci skip] Translation update 2020-03-10 00:32:45 +00:00
Bram Kragten 2085260ce7 Fixes media card (#5115)
* Fixes media card

* Update hui-media-control-card.ts

* Change update of progress bar
2020-03-09 21:22:17 +01:00
Erik Montnemery 1f143176ad Use fallback for device name on device page (#5116)
* Use fallback for device name on device page

* Update ha-config-device-page.ts

* Lint
2020-03-09 21:09:27 +01:00
Bram Kragten dd2163a837 Update media_player.family_room_2 2020-03-09 19:27:58 +01:00
Zack Arnett 0e1eca8a3e Media Card: Add Marquee to Title (#5095)
* Marquee Addition

* Review Comments

* instance var name change

* fix merge

* Comments plus merge fix
2020-03-09 09:43:53 -07:00
Bram Kragten 9da32880ec Fix update of cached datatables on connect (#5114) 2020-03-09 08:19:23 -07:00
Bram Kragten 15aee6a66a Fix alignment of generic entity row (#5112) 2020-03-09 13:55:30 +01:00
Zack Arnett aba74f074a Fix input number from overflowing (#5099) 2020-03-09 13:55:14 +01:00
Bram Kragten 75860508de Recalc content height on lovelace change (#5110)
Fixes https://github.com/home-assistant/frontend/issues/5108
2020-03-09 13:20:26 +01:00
Aidan Timson 52160a367a 🔧 Standardize Generic Dialogs (#4726)
* 🔧 Use confirmation dialog in area deletion

* Swap automation confirmation dialogs

* Add to disable webhook

* Add to person deletion

* Add to zone deletion

* Add dialogs in raw editor

* Add/fix try catch

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-09 13:16:02 +01:00
Zack Arnett 5651a61604 Media Card: Adds Cursor: Pointer to Progress Bar (#5091) 2020-03-08 20:59:40 -07:00
Zack Arnett 959d8c3181 Media Card: Colors more integrated with Art (#5105) 2020-03-08 20:55:03 -07:00
Paulus Schoutsen 64ee7456dc Style unavailable/unknown cards (#5104)
* Style unavailable/unknown cards

* Hide default image if unavailable

* Style map

Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>
2020-03-08 14:19:58 -07:00
Paulus Schoutsen 814fcf63a8 Fix cardHeight (#5102)
* Fix cardHeight

* Opacity instead of changing DOM

* Better fix

* Remove guard we don't need
2020-03-08 09:42:59 -07:00
Zack Arnett b72d8cf7d7 Media Card: Fix Progress update (#5096) 2020-03-07 22:00:52 -08:00
Zack Arnett 8e7ef58715 Card Picker: Firefox Fix (#5098) 2020-03-07 21:59:25 -08:00
Paulus Schoutsen 56bfa01c56 Fix demo name 2020-03-07 21:53:40 -08:00
Paulus Schoutsen 4a0fc3e087 Rename demo 2020-03-07 21:51:48 -08:00
Paulus Schoutsen f3c371996f Add media player card gallery (#5101) 2020-03-07 21:47:53 -08:00
Paulus Schoutsen e5467181cb Fix vibrant type (#5100) 2020-03-08 00:46:51 -05:00
HomeAssistant Azure 0b3d2ea4ad [ci skip] Translation update 2020-03-08 00:32:36 +00:00
HomeAssistant Azure 9648aa3588 [ci skip] Translation update 2020-03-07 00:32:40 +00:00
HomeAssistant Azure 1b92cbbf74 [ci skip] Translation update 2020-03-06 13:41:27 +00:00
Bram Kragten 9979c046b3 Update azure-pipelines-translation.yml for Azure Pipelines 2020-03-06 14:38:19 +01:00
Bram Kragten 9ad121f9e6 Merge pull request #5089 from home-assistant/dev
20200306.0
2020-03-06 14:19:28 +01:00
Bram Kragten a0900afba3 Bumped version to 20200306.0 2020-03-06 14:00:36 +01:00
Bram Kragten 1cb614c8a8 Forgot border height (#5088) 2020-03-06 13:46:11 +01:00
David F. Mulcahey e63723f39e fix click handlers on data tables (#5087) 2020-03-06 13:45:12 +01:00
Bram Kragten 720bd03173 Add image to demo media player (#5086) 2020-03-06 13:44:59 +01:00
Bram Kragten 9e07cf67a5 Fix navigation after deleting a view and allow deleting view with cards (#5085)
* Fix navigation after deleting a view

* Allow deleting views with cards
2020-03-06 13:14:43 +01:00
Thomas Lovén 503dec7345 GUI editor for conditional card (#5051)
* GUI editor for conditional card

* Typing

* Fix typos. Remove quotes

* Add lovelace to card picker

* Address review comments
2020-03-06 12:58:41 +01:00
Bram Kragten 5a2649a65b Virtualize data tabel (#5066)
* WIP

* Fixes and implement further

* Give more space to table on mobile

* Remove unused deps

* Update ha-config-lovelace-dashboards.ts

* Add auto-height

* Console.bye

hihi

* lint
2020-03-06 12:58:13 +01:00
Tomasz 1599dc9e16 Set view visibility form UI (#4978)
* wip

* move logic to hui-view-visibility-editor.ts

* users will be always set

* extra filter to remove deleted users

* added better UI.
I had to add &nbsp; to ha-switch to avoid scrollbar

* fix for comments

* setting default visibility in a better way

* simplified logic, addressed comments
2020-03-06 12:36:34 +01:00
Zack Arnett 84dc8188c4 New Media Player - Cloned from Android Spotify Notification (#5044)
* Media Player Spotify Clone

* Ellipsis fix

* Style for theme update

* Height now determined by player height

* comments - Also includes Testing with images

* Pushing to resolve balloobs comments ;)

* Add Node Vibrant type

* Update Styles

* Comments

* Reviews

* Lint

* undo readme

* Reviews && Clean up

* Clear Interval

* Animation updates + comments

* small style tweak and comment

* Last little fix

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-03-05 21:33:38 -05:00
Paulus Schoutsen 74657ae815 Make cast backwards compatible (#5081)
* Make cast backwards compatible

* Update hc-main.ts

* Update home-assistant-js-websocket
2020-03-05 13:36:13 -08:00
Paulus Schoutsen 1a3b747d17 Style fixes to lovelace config dashboard (#5055)
* Style fixes to lovelace config dashboard

* Add standard panel and show which is default

* Update dialog-lovelace-dashboard-detail.ts

* Updated lovelace icon

* Comments and adapt to backend changes
2020-03-05 11:52:16 -08:00
Bram Kragten 802db71400 Fix secondary info in generic entity row (#5072) 2020-03-05 20:42:15 +01:00
Paulus Schoutsen 4f98524258 Optimise config entities panel + clarify not being able to dele… (#5079) 2020-03-05 09:09:29 -08:00
Bram Kragten b17ea09b8b Improve chips (#5070)
Follow mdc specs
2020-03-05 12:59:32 +01:00
Bram Kragten 8abbc71e91 Only rebuild when current panel changed (#5071)
* Only rebuild when current panel changed

* Oops

* Update yarn.lock

* copy dep to repo

* Update deep-equal.ts

* Comments
2020-03-05 12:59:18 +01:00
Paulus Schoutsen 1db31fb0f7 Show entity reg editor for helpers when not editable (#5056) 2020-03-04 17:20:16 -08:00
Bram Kragten e9b5725d7b Update default icon Lovelace sidebar. (#5069) 2020-03-05 00:19:41 +01:00
Bram Kragten d3105b6846 Add rel=noopener (#5046) 2020-03-04 22:34:48 +01:00
Bram Kragten 196540afc7 Allow card editors to use card picker again (#5067) 2020-03-04 22:04:04 +01:00
Paulus Schoutsen 2b8b9f8311 Remove unused camera command (#5068) 2020-03-04 12:39:56 -08:00
redbar0n b4f0fce600 Changed login text to be less misleading (#5054)
* Changed login text to be less misleading

See https://github.com/home-assistant/frontend/issues/5053

* Update according to suggestion for improvement

The new text should be more user-friendly.
2020-03-04 15:31:40 +01:00
Zack Arnett c6f101a487 Add Descriptions for cards - Card Picker (#5058)
* Add Descriptions for cards - this is for card pick

* oops

* Comments from Frenck

* few card capitalizations found

* Comments

* Comments on glance
2020-03-03 17:05:24 -05:00
Paulus Schoutsen 54739c7ccd Support grouped system log messages (#5030)
* Support grouped system log messages

* Format source
2020-03-03 13:55:26 -08:00
Zack Arnett aa2e632df3 Card Picker with Previews of cards (#4975)
* Card Picker with Previews of cards

* Getting Preview Async - Using dialogs entities

* Create generic getElement - filter entities before

* lint

* Add entities back to Picker. Set Qualifier

* Style Updates

* Move setup of filtered cards to connected

* style updates

* Dont pull entities if noEntity config

* Move all config logic to getConfig

* Style Update - Remove Manual process

* lint

* Accounting for ll-rebuild for async cards

* Style Updates - Use GetStubConfig for most

* Lint

* Filter entities with function - style - no preview

* Iframe rename and description

* Move getstubconfig to helper - update spinner

* Style for themes

* Move entities to be calc once

* Should update

* oops

* TSC

* Comments
2020-03-03 14:53:55 -05:00
Paulus Schoutsen f3445d99cf Sort ungrouped entities (#5047)
* Sort ungrouped entities

* Console.bye
2020-03-03 17:36:39 +01:00
Bram Kragten 7e48b21767 Remove states-ui and allow setting (local) default lovelace panel (#5043)
* Remove states-ui and allow setting (local) default lovelace panel

* Remove from demo

* Delete ha-cards.js

* Add default for yaml defined dashboards

* Update ha-config-lovelace-dashboards.ts
2020-03-03 16:27:35 +01:00
Bram Kragten 1d1688093a Update config.yml 2020-03-03 11:10:57 +01:00
Bram Kragten d392695ab7 Recreate translations when changed on dev (#5042) 2020-03-02 07:55:16 -08:00
HomeAssistant Azure 5066560411 [ci skip] Translation update 2020-03-02 12:54:26 +00:00
Bram Kragten 7fa6686e8c Update README.md 2020-03-02 13:40:45 +01:00
Paulus Schoutsen d74fe6ed52 Update translation hashing (#5025)
* Update translation hashing

* Move gulp-rename
2020-03-02 11:36:00 +01:00
HomeAssistant Azure 319a3b4943 [ci skip] Translation update 2020-03-02 00:36:43 +00:00
HomeAssistant Azure 226e6e9f59 [ci skip] Translation update 2020-03-01 00:32:29 +00:00
Erik Montnemery 42f311a457 Update whitelist (#5026) 2020-02-29 14:09:14 +01:00
HomeAssistant Azure e50ec2e2e2 [ci skip] Translation update 2020-02-29 00:32:31 +00:00
Bram Kragten b72a3361c0 Fixes for brightness automation action (#5003)
* Fixes for brightness

* Add checbox before optional range integer

* Console

* Comments
2020-02-28 23:01:45 +01:00
Bram Kragten 7b057eaa77 Merge pull request #5024 from home-assistant/dev
20200228.0
2020-02-28 22:59:33 +01:00
Paulus Schoutsen d7aaed05b7 Clean up generic row (#5022) 2020-02-28 13:35:42 -08:00
Bram Kragten c5fe5565bb Merge branch 'master' into dev 2020-02-28 22:21:45 +01:00
Bram Kragten a1a1763897 Bumped version to 20200228.0 2020-02-28 22:20:44 +01:00
Bram Kragten 724357683c Add take control for yaml mode (#4992) 2020-02-28 22:00:01 +01:00
Bram Kragten 0d6de9fe73 Fix for unavailable input-select (#4991)
* Fix for unavailable select

* Update hui-thermostat-card.ts
2020-02-28 21:59:14 +01:00
Bram Kragten 5646045e9e Add UI to create and manage Lovelace dashboards and resources (#5012)
* Add UI to create and manage Lovelace dashboards and resources

* update, comments, fixes

* Align icons with seach icon and checkboxes

* Fix

* Remove js and html resource types

* Allow it for existing ones
2020-02-28 21:58:50 +01:00
Bram Kragten 17c7a3bbac Bumped version to 20200220.5 2020-02-28 15:35:08 +01:00
Ian Richardson 8d65eb1fdf Fix state_color for button (#4995) 2020-02-28 15:35:04 +01:00
Ian Richardson 2298a55b16 Fix action handling for buttons row (#5007) 2020-02-28 15:34:45 +01:00
HomeAssistant Azure 33d65bcefc [ci skip] Translation update 2020-02-28 00:32:34 +00:00
Thomas Lovén 3cc7deda04 GUI editors for stacks (#4999)
* GUI editors for stacks

* fix type checking

* lint

* Address review comments

* Cleanup. Removing inline functions, combining others

* Give the class a more fitting name

* Final tweak

* Update stack cards

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-27 14:07:55 +01:00
Bram Kragten e2de660bec Only cache default lovelace and handle config updates (#5000)
* Only cache default lovelace and handle config updates

* Update partial-panel-resolver.ts
2020-02-27 14:01:37 +01:00
Bram Kragten 6b1e5a525f Fix update if no lastversion and change audio pickers to default (#5010) 2020-02-27 11:44:09 +01:00
Ian Richardson 93565f0ed9 Fix action handling for buttons row (#5007) 2020-02-27 09:20:20 +01:00
HomeAssistant Azure 143d1162b6 [ci skip] Translation update 2020-02-27 00:32:30 +00:00
Ian Richardson 788d616fa2 Fix state_color for button (#4995) 2020-02-26 23:03:47 +01:00
Bram Kragten 0de9471a5d Revert "Static import all the LL cards etc" (#4989)
This reverts commit 52ded635ff.
2020-02-26 08:03:05 -08:00
Bram Kragten b229071248 Add helper UI (#4940)
* Add helper UI

* Oops

* Update

* Update

* Update

* Lint

* Add all input forms

* Return extended entity registry entry from update

* Comments

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-26 12:53:03 +01:00
Bram Kragten 6d145730a5 Bumped version to 20200220.4 2020-02-26 09:42:10 +01:00
Paulus Schoutsen f02bb67485 Static import all the LL cards etc (#4987) 2020-02-26 09:42:03 +01:00
Paulus Schoutsen 52ded635ff Static import all the LL cards etc (#4987) 2020-02-26 09:40:54 +01:00
HomeAssistant Azure a6d73828b8 [ci skip] Translation update 2020-02-26 00:32:31 +00:00
Paulus Schoutsen 1d052fa5bb Add support for multiple Lovelace dashboards (#4967)
* Add support for multiple Lovelace dashboards

* Fix navigation, add to cast, revert resource loading

* Change resource logic

* Lint + cast fix

* Comments

* Fixes

* Console.bye

* Lint"

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-25 13:06:25 -08:00
Bram Kragten 38d758b52f Bumped version to 20200220.3 2020-02-25 21:56:52 +01:00
Bram Kragten 9162e9c318 Bumped version to 20200220.2 2020-02-25 21:55:36 +01:00
Bram Kragten 189ea00768 Fix for when the preview element was an error element (#4969)
* Fix for when the preview element was an error element

* Comments

* Update hui-dialog-edit-card.ts
2020-02-25 21:51:52 +01:00
Bram Kragten 25d6427aed Fix for when the preview element was an error element (#4969)
* Fix for when the preview element was an error element

* Comments

* Update hui-dialog-edit-card.ts
2020-02-25 21:51:07 +01:00
Franck Nijhof 8a61442cf2 Add dev demo builds GitHub Actions workflow (#4980) 2020-02-25 10:15:48 -08:00
Franck Nijhof 106d405699 Only trigger on PRs or pushes against the master and dev branch… (#4982) 2020-02-25 10:06:14 -08:00
Chris Talkington 1f23e9062f Fix typo in supervisor popup (#4966) 2020-02-24 20:45:08 -08:00
Franck Nijhof 231b498ea5 Remove Travis-CI (#4972) 2020-02-24 20:43:47 -08:00
HomeAssistant Azure a256e5abfa [ci skip] Translation update 2020-02-25 00:33:05 +00:00
Ruslan Sayfutdinov 028b370ead [logbook] fix scrolling on iOS (#4950)
* [logbook] fix scrolling on iOS

* Update styling

* Update ha-logbook.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-24 13:50:22 +01:00
Sergey Avdeev 18abc6adf7 Update icon_color_css.ts (#4962) 2020-02-24 11:43:58 +01:00
Ruslan Sayfutdinov 95aa29d6ca Fix layout of history and logbook filters (#4963) 2020-02-24 11:38:05 +01:00
Paulus Schoutsen 5d2242dd16 Add a smarter default value for entity card show header toggle (#4964) 2020-02-24 11:29:40 +01:00
HomeAssistant Azure de8bca6967 [ci skip] Translation update 2020-02-24 00:32:30 +00:00
HomeAssistant Azure 12234de20e [ci skip] Translation update 2020-02-23 00:32:34 +00:00
Tomasz b41369a2ad Localize tabs names in view editor (#4954)
* Localize tabs

* remove Polish localization
2020-02-22 15:00:01 +01:00
HomeAssistant Azure 6e35c79c14 [ci skip] Translation update 2020-02-22 00:32:31 +00:00
Franck Nijhof 22e4c0512e Add GitHub Actions (#4952) 2020-02-21 13:59:09 +01:00
HomeAssistant Azure 3606b8077f [ci skip] Translation update 2020-02-21 00:34:40 +00:00
Paulus Schoutsen 3a90a65ba8 Merge pull request #4948 from home-assistant/dev
20200220.1
2020-02-20 14:49:22 -08:00
Paulus Schoutsen e59987a8ed Bumped version to 20200220.1 2020-02-20 14:47:40 -08:00
Paulus Schoutsen 22d8ce0fd9 Fix creating card (#4947) 2020-02-20 14:47:28 -08:00
Zep Fietje 01eae3876b Make config list items appearance consistent for automations, scenes and scripts (#4945) 2020-02-20 21:10:40 +01:00
Paulus Schoutsen 2e43f390a4 Merge pull request #4942 from home-assistant/dev
20200220.0
2020-02-20 10:29:20 -08:00
Paulus Schoutsen 65421fa551 Bumped version to 20200220.0 2020-02-20 10:14:57 -08:00
Zack Arnett fc88922ce3 Fix CPU and Browser Usuage (#4935) 2020-02-20 09:57:14 +01:00
Paulus Schoutsen 52609dded9 Add rebuild support to editor preview (#4932)
* Add rebuild support to editor preview

* getLovelaceCardClass function added

* Use error class

* Tiny cleanup

* Misplaced comment
2020-02-20 09:55:42 +01:00
HomeAssistant Azure 6d54496187 [ci skip] Translation update 2020-02-20 00:32:31 +00:00
Bram Kragten 2a6c38066d Merge pull request #4920 from home-assistant/dev
20200219.0
2020-02-19 10:49:19 +01:00
Bram Kragten 924c7804c9 Update hui-media-control-card.ts (#4919) 2020-02-19 10:44:42 +01:00
Bram Kragten 23f34fa7ae Bumped version to 20200219.0 2020-02-19 10:30:14 +01:00
Ian Richardson 7046cba1f7 Add buttons row (#4714)
*  Add buttons row

* refactor to composition

* Add action handler

* address review
2020-02-19 10:25:42 +01:00
Zack Arnett 4be1040a14 Convert History Graph Card to Typescript (#4882)
* Converting History Graph to Typescript

* Conversion to TS

* Reviews

* Review Updates
2020-02-19 10:20:37 +01:00
Zack Arnett 68baeb83cb Media Card Seek Functionality (#4907)
* Seek function

* Remove a testing section

* reviews
2020-02-19 10:19:57 +01:00
Zack Arnett aa94e45582 Sensor Card - Top Margin 16px -> 8px (#4917) 2020-02-18 22:36:49 -08:00
Zack Arnett 2c58a9f802 Sensor Stroke Width Fix (#4916)
* Sensor width fix

* Const
2020-02-18 20:20:32 -08:00
HomeAssistant Azure 0a41a4f066 [ci skip] Translation update 2020-02-19 00:32:35 +00:00
Bram Kragten e265d9581c Fix multiselect without data (#4906) 2020-02-18 22:17:52 +01:00
Paulus Schoutsen 4675579f79 Add safe mode support (#4908)
* Add safe mode support

* Lint

* Fix type in demo
2020-02-18 08:33:25 -08:00
Bram Kragten 52ae01ea74 Fix description and title of options flow (#4910) 2020-02-18 11:27:27 +01:00
HomeAssistant Azure 099430238c [ci skip] Translation update 2020-02-18 00:32:41 +00:00
Bram Kragten af3626b215 Merge pull request #4850 from zsarnett/media-card-updates
Update Media Card to check for Supported Features
2020-02-17 21:16:06 +01:00
Bram Kragten 52ea3a5ce8 Merge pull request #4895 from scop/sort-available-events
Sort list of available events
2020-02-17 21:15:08 +01:00
Ville Skyttä 2ab2ade642 Import compare 2020-02-17 21:15:58 +02:00
Zack Arnett 1cc3936ec3 Typing functions 2020-02-17 13:36:21 -05:00
Paulus Schoutsen 322eef1c0f Add more info to system log (#4899)
* Add more info to system log

* Add util, oops

* Tweak UI
2020-02-17 10:20:24 -08:00
Zack Arnett 0964130782 rookie mistake 2020-02-17 12:09:17 -05:00
Zack Arnett be9ec50e3a When no image occurs mark the image as undefined 2020-02-17 11:51:05 -05:00
Zack Arnett da1dd45169 Update for playlist information if music isnt present 2020-02-17 11:31:27 -05:00
Zack Arnett 9a7f7f119d Review updates again because I am a fool 2020-02-17 10:28:13 -05:00
Bram Kragten b1a414c840 Merge pull request #4903 from home-assistant/dev
20200217.0
2020-02-17 16:24:27 +01:00
Zack Arnett 2718ada9f9 Review updates 2020-02-17 10:01:01 -05:00
Bram Kragten 46a596ce34 Bumped version to 20200217.0 2020-02-17 15:58:06 +01:00
Bram Kragten 7036cefa72 Allow to change the location of home zone in zone editor (#4849)
* Allow to change the location of home zone in zone editor

* Update src/translations/en.json

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Comment + mobile to general config

* Remove dupe import

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-17 15:27:31 +01:00
Ian Richardson fb7fbf2dac add state_color option to glance, button and state-icon (#4854)
* add state_color option to glance, button and state-icon

* address comments

* address comments
2020-02-17 15:26:45 +01:00
Bram Kragten 49b0c8d549 include entities not in entity registry in config entities (#4867)
* include entities not in entity registry in config entities

* Update ha-data-table.ts

* Comments

* Update ha-device-entities-card.ts

* Comments
2020-02-17 15:02:23 +01:00
Bram Kragten 8f9a6bd544 Add multi select component to ha-form (#4247)
* Add multi select component

* Apply suggestions from code review

Co-Authored-By: Ian Richardson <iantrich@gmail.com>

* Comments

* update

* Fix

* Refactor to dropdown menu

Co-authored-by: Ian Richardson <iantrich@gmail.com>
2020-02-17 14:13:09 +01:00
Ruslan Sayfutdinov 24e4b0b772 [sidebar] set max-width for item-text (#4893) 2020-02-16 20:23:25 -08:00
HomeAssistant Azure 1c86bd2f8b [ci skip] Translation update 2020-02-17 00:32:55 +00:00
Zack Arnett 363f548f13 fix error (#4885) 2020-02-16 15:19:28 -08:00
Ville Skyttä 51ce481e77 Sort list of available events 2020-02-16 23:32:47 +02:00
Zack Arnett 30e5611812 Stupid mistake 2020-02-16 12:15:56 -05:00
Zack Arnett 67706a312d Support for requesting the image from the server 2020-02-16 12:11:18 -05:00
Paulus Schoutsen f4eb3380b4 Less whitespace around icon (#4888) 2020-02-15 22:39:03 -08:00
Paulus Schoutsen 73934afc7d Sensor card hugging (#4887) 2020-02-16 00:57:56 -05:00
Paulus Schoutsen 9d2a0c0502 Reduce size of floorplan pic Arsaboo (#4886) 2020-02-15 21:40:28 -08:00
HomeAssistant Azure 9ec75531a8 [ci skip] Translation update 2020-02-16 00:32:37 +00:00
HomeAssistant Azure 91bdb8f742 [ci skip] Translation update 2020-02-15 00:32:38 +00:00
Thomas Lovén d8ae3439de Make sure config is always frozen. Not just on error (#4871) 2020-02-14 16:11:25 -08:00
Bram Kragten 2d018fff6c Update babel en disable ES5 builds on dev (#4876) 2020-02-14 16:09:21 -08:00
Bram Kragten 7d37dc6cde Bump vaadin elements (#4878) 2020-02-14 16:08:44 -08:00
Bram Kragten c60033027d Update material elements (#4877)
* Update material elements

* Update ha-checkbox.ts
2020-02-14 16:08:30 -08:00
Ian Richardson 3f7c29a6f6 ♻️ change entity-button to button card (#4581)
* ♻️ change entity-button to button card

* maintain separate entity-button class
2020-02-14 10:56:08 +01:00
Paulus Schoutsen b2243f480c Add option to lazy load cards (#4857)
* Add option to lazy load cards

* Lazy load header/footer elements

* Lazy load rows

* Clean up params

* Rename last var
2020-02-13 21:13:48 -08:00
Ian Richardson f5384e8bc8 add create helper functions for custom cards (#4853)
* add create helper functions for custom cards

* address comments
2020-02-13 21:13:29 -08:00
Robbie Trencheny ecc6fcf862 Hide HTML5 push notification toggle if inside external app (#4860)
* Hide HTML5 push notification toggle if external bus is engaged

* Use isExternal instead

* Hide the whole row

* Black

* Fix import

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-13 17:47:08 -08:00
HomeAssistant Azure 46cc2aec94 [ci skip] Translation update 2020-02-14 00:32:50 +00:00
Thomas Lovén c62a5a6dcd Freeze lovelace configuration on load (#4862)
* Freeze lovelace configuration on load

* Clone only when necessary

* Make cloning badges really work

* Freeze after checking

* Don't doublefreeze
2020-02-13 16:18:15 -08:00
Zack Arnett f6b10232ec Disabled Style Updates 2020-02-13 16:35:16 -05:00
Zack Arnett 87559c0938 Review Updates 2020-02-13 16:30:34 -05:00
Bram Kragten 7903541689 Add toolbars and mobile headers + layout tweaks (#4803)
* Add toolbars and mobile headers + layout tweaks

* Comments
2020-02-13 19:53:48 +01:00
Bram Kragten c93e1b0123 Add more info for Person (#4848)
* Add more info for Person

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

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-13 09:06:52 -08:00
Bram Kragten e261fafdb3 Allow enabling/disabling automation from edit screen (#4846)
* Allow enabling/disabling automation from edit screen

* Comments
2020-02-13 09:06:14 -08:00
Bram Kragten 485e2fde25 Update hui-thermostat-card.ts (#4863) 2020-02-13 08:41:51 -08:00
Bram Kragten 6feaf64c90 Fix display of arrays/objects in attributes (#4836)
* Fix display of arrays/objects in attributes

* async import js-yaml
2020-02-13 08:22:41 -08:00
Bram Kragten 6b115bf06a Merge pull request #4859 from home-assistant/frenck-2020-0188
Spelling: Config(uration)
2020-02-13 10:29:46 +01:00
Bram Kragten f45785fafe Change defaults of automations to device (#4843)
* Change defaults of automations to device

* Script too

* Update device_automation.ts

* Update device_automation.ts
2020-02-12 20:43:44 -08:00
Ruslan Sayfutdinov ec046bc925 [history] fix dropdown animation (#4858) 2020-02-12 20:36:29 -08:00
HomeAssistant Azure ab5733718b [ci skip] Translation update 2020-02-13 00:33:01 +00:00
Franck Nijhof 1077fb2945 Spelling: Config(uration) 2020-02-13 00:30:41 +01:00
Bram Kragten b7a84cdd60 Merge pull request #4856 from home-assistant/dev
20200212.0
2020-02-12 22:41:36 +01:00
Bram Kragten 78102f5882 Merge branch 'master' into dev 2020-02-12 22:21:32 +01:00
Bram Kragten 4ea11bd928 Bumped version to 20200212.0 2020-02-12 22:18:01 +01:00
Bram Kragten 785aefa028 Bumped version to 20200130.3 2020-02-12 21:58:59 +01:00
Bram Kragten 5c2004bcc1 Bumped version to 20200130.2 2020-02-12 21:56:03 +01:00
Bram Kragten 156d944ca1 Fix translations for update button config entry system options (#4837) 2020-02-12 21:55:53 +01:00
Bram Kragten 97a6354a72 Fix tap firing twice on iOS (#4841) 2020-02-12 21:55:28 +01:00
Bram Kragten 49422c3f63 Fix translations for update button config entry system options (#4837) 2020-02-12 13:49:20 +01:00
Bram Kragten 0b8700f725 Hide zone edit button for non admins (#4840) 2020-02-12 13:48:51 +01:00
Bram Kragten c5aa000a97 Check for null target_temp (#4842)
Fixes #4359
2020-02-12 13:48:27 +01:00
Bram Kragten 4cdc4765f7 Fix tap firing twice on iOS (#4841) 2020-02-12 13:47:56 +01:00
Ruslan Sayfutdinov a95290235d [logbook] fix margins for RTL languages (#4852) 2020-02-11 17:29:35 -08:00
HomeAssistant Azure fb9d7ac2d8 [ci skip] Translation update 2020-02-12 00:32:46 +00:00
Ruslan Sayfutdinov d48a4e0ac6 [logbook] implement shouldUpdate (#4832)
* [logbook] implement shouldUpdate

* Update src/panels/logbook/ha-logbook.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-11 15:26:28 -08:00
Zack Arnett d33e035db7 Update Media Card to check for supported features 2020-02-11 13:11:25 -05:00
Bram Kragten 1437b4c4b6 Fix media control card styling (#4845) 2020-02-11 09:43:46 -05:00
Robert Resch 9fce60065b Add lozalization to more-info-vacuum (#4793)
* Convert more-info-vacuum to Lit

* Introduce VacuumCommand to reduce render complexity and duplicate code

* Add localization for more-info-vacuum

* Inline supportFeature instead of creating a const.

* - Use interface instead of class for VacuumCommand
- Add different translation for start_pause and pause as they are not the same

* fix typo

* Use VACUUM_COMMANDS.some instead of writing duplicate code

* add @bramkragten suggestions
2020-02-11 09:15:38 +01:00
Paulus Schoutsen d052b9ede8 Update en.json (#4835) 2020-02-11 09:05:18 +01:00
Ruslan Sayfutdinov 8cee5c729e [logbook] fix period dropdown animation (#4834) 2020-02-10 20:50:12 -08:00
HomeAssistant Azure 88bdf7c7ec [ci skip] Translation update 2020-02-11 00:32:36 +00:00
Bram Kragten 2c006e99f2 Use original id to remove entity (#4829) 2020-02-10 15:17:29 -08:00
Erik Montnemery e7e8dff0ec Graceful fallback if translations for device automations are missing (#4824)
* Graceful fallback if translations for device automations are missing

* Update src/data/device_automation.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/data/device_automation.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/data/device_automation.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* tweak

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-10 20:17:24 +01:00
Ian Richardson 981c798e22 💄 match alarm panel icon coloring to card's (#4825) 2020-02-10 08:43:38 -08:00
Ruslan Sayfutdinov 4613d8b1f6 [logbook] configure flex container to display entries correctly on mobile devices (#4810) 2020-02-10 10:11:28 +01:00
Paulus Schoutsen ba4e1949c4 Theme update refetch themes (#4812) 2020-02-10 10:10:39 +01:00
Iulian Onofrei cc6686a790 Fix typo (#4779) 2020-02-10 10:03:42 +01:00
Nicholas Amadori f791412f73 Spelling (#4806)
"Gerenal" corrected to "General"
2020-02-10 10:03:19 +01:00
HomeAssistant Azure 0c8ac17dcb [ci skip] Translation update 2020-02-10 00:32:29 +00:00
HomeAssistant Azure 9e11fe868e [ci skip] Translation update 2020-02-09 00:32:35 +00:00
Bram Kragten 7d91515bf5 Style tweaks (#4766)
* Style tweaks

* Update ha-style.ts

* Move derived styles
2020-02-08 14:49:29 -08:00
HomeAssistant Azure e0565c35ab [ci skip] Translation update 2020-02-08 00:32:33 +00:00
Paulus Schoutsen e5387e5806 Fall back to use handler if translations broken (#4777) 2020-02-07 18:46:16 +01:00
Paulus Schoutsen 8a4c52aeb7 Filter battery sensors from generated UI (#4799)
* Filter battery sensors from generated UI

* Use fancy TypeScript feature
2020-02-07 18:32:37 +01:00
Paulus Schoutsen 15e7b8117c Add integrations to dev info page (#4800)
* Add integrations to dev info page

* Fix annoying looking html tags

* What happened here
2020-02-07 18:30:38 +01:00
HomeAssistant Azure d1703ba3e8 [ci skip] Translation update 2020-02-07 00:32:35 +00:00
Ruslan Sayfutdinov c977f22047 Show seconds in the UI (#4765) 2020-02-06 10:38:38 -08:00
Zack Arnett 2e47aa1905 Update Edit Footer for Cards (#4752)
* Update CSS

* Radius Updates

* Updating to be a ha-card element
2020-02-05 23:05:49 -08:00
HomeAssistant Azure c72105dca3 [ci skip] Translation update 2020-02-06 00:32:31 +00:00
Bram Kragten e01f1cfcac More info scroll fix (#4774)
* Fix more info dialog scrolling

* Update ha-more-info-dialog.js
2020-02-05 14:03:16 -08:00
Zack Arnett 2e4c73c087 Convert Media Control Card to Typescript (#4761)
* Delete old JS file. Add new TS file. Add Type

* Updates

* Reviews

* Review Updates :)

* Updating State Localize

* Clean up

* Fixing Travis
2020-02-05 09:28:29 -08:00
Bram Kragten c7f7ef28bf Fixes removing audio device (#4763)
(only the supervisor doesn't support it)
2020-02-05 09:21:43 -08:00
Michael Irigoyen aac7dbab58 Update Material Design Icons to v4.9.95 (#4764) 2020-02-05 17:34:10 +01:00
Bram Kragten 8518f774d4 Rename hass.io panel to supervisor 2020-02-05 10:00:19 +01:00
HomeAssistant Azure cb0d91d124 [ci skip] Translation update 2020-02-05 00:32:34 +00:00
Zack Arnett 107f428dd3 Sensor Card Fill feature (#4745) 2020-02-04 16:11:13 -08:00
Bram Kragten 7758ddba56 Fix theming with derived styles (#4758)
* Fix theming with derived styles

* Move
2020-02-04 15:40:35 -08:00
Paulus Schoutsen e0376c803f Fix hassio audio 2020-02-04 10:28:43 -08:00
Paulus Schoutsen 788c490bbc Update update headers in hassio (#4751)
* Update update headers in hassio

* Other tabs too
2020-02-04 18:36:10 +01:00
Ian Richardson cdf6e9eb75 🐛 properly format timestamps in glance card (#4602)
* 🐛 properly format timestamps in glance card

* address review comments
2020-02-04 16:18:42 +01:00
Bram Kragten 4aa49f66bc Remove unused classmap 2020-02-04 15:55:29 +01:00
Bram Kragten 50d0671abe Bumped version to 20200130.1 2020-02-04 15:38:03 +01:00
Bram Kragten e176357fbf Tweak badge focus padding (#4750) 2020-02-04 15:34:20 +01:00
David F. Mulcahey de1b127ac2 fix loading groups (#4727) 2020-02-04 15:33:50 +01:00
Bram Kragten 1dad7c81da Fix passive color radius and fix switch label clicks (#4703) 2020-02-04 15:33:01 +01:00
Bram Kragten e980e93969 Change map settings icon (#4701)
* Change map settings icon

Closes #4694

* hide for demo
2020-02-04 15:28:59 +01:00
Ian Richardson 57fc56f836 🐛 fix tabindex for default entity more-info actions (#4697)
* 🐛 fix tabindex for default entity more-info actions

* Update hui-state-label-badge.ts
2020-02-04 15:28:33 +01:00
Bram Kragten 05113e1809 Styling zone menu (#4684)
* Styling zone menu

* Update ha-device-entities-card.ts
2020-02-04 15:28:10 +01:00
Bram Kragten 1bf82f216a Tweak badge focus padding (#4750) 2020-02-04 15:15:15 +01:00
Bram Kragten 004ff58c21 Update hassio-style.ts 2020-02-04 13:34:14 +01:00
Joakim Sørensen f1a1654371 Use icon image where available (#4721)
* Use iconimg where available

* Adjust margin for icon

* remove log

* Fix property casing

* Add blue topbar, and generalize properties

* Inline checks

* inline property functions

* Limit compute

* Linting

* lovercase const

* Review comments and move update dot to line

* Add roboto font to hassio

* Fix update and stopped styles colliding

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-04 12:36:09 +01:00
Bram Kragten 862044ca23 Hassio styling tweaks (#4749)
* Hassio styling tweaks

* Update hassio-style.ts

* Update hassio-pages-with-tabs.ts
2020-02-04 10:54:10 +01:00
Paulus Schoutsen c54b474838 Hide automations from generated UI (#4748) 2020-02-04 09:27:26 +01:00
Bram Kragten 42cbe863bb Fix passive color radius and fix switch label clicks (#4703)
* Fix passive color radius and fix switch label clicks

* Colors vars
2020-02-03 22:32:22 -08:00
HomeAssistant Azure ccc42dad79 [ci skip] Translation update 2020-02-04 00:33:02 +00:00
Paulus Schoutsen 82ff444cec Confirm when resetting hassio optoins (#4718) 2020-02-03 08:53:57 -08:00
Paulus Schoutsen 24c591fbf3 Convert Hass.io add-on options to YAML (#4717)
* Convert Hass.io options to YAML

* Fix yaml editors on other places

* Update ha-automation-action-service.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-03 11:06:47 +01:00
Joakim Sørensen ad676d7fd3 Fix theme on sensor card (#4724) 2020-02-03 09:30:20 +01:00
David F. Mulcahey cbe4782d78 fix loading groups (#4727) 2020-02-03 09:29:13 +01:00
HomeAssistant Azure 3fdcc1c0ea [ci skip] Translation update 2020-02-03 00:32:48 +00:00
HomeAssistant Azure f9d64e51c4 [ci skip] Translation update 2020-02-02 00:32:38 +00:00
Paulus Schoutsen b082828a75 Forward haptic events to parent window (#4719) 2020-02-01 08:11:57 -08:00
Paulus Schoutsen 25f5bf0042 Fix ingress add-on not started dialog showing twice (#4716)
* Fix ingress add-on not started dialog showing twice

* logging not allowed
2020-02-01 08:11:30 -08:00
Bram Kragten f5dec3c6d5 Change map settings icon (#4701)
* Change map settings icon

Closes #4694

* hide for demo
2020-02-01 00:26:22 -08:00
Joakim Sørensen 3215437bb8 Fixes add-on audio selector (#4648)
* Fixes addon audio selector

* Set device as property

* Use getAttribute

* Keep device as attribute

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-31 23:03:30 -08:00
HomeAssistant Azure 33176d8f3d [ci skip] Translation update 2020-02-01 00:32:28 +00:00
Ian Richardson f82b62f45c 🐛 fix tabindex for default entity more-info actions (#4697)
* 🐛 fix tabindex for default entity more-info actions

* Update hui-state-label-badge.ts
2020-01-31 17:19:08 +01:00
Bram Kragten edfdd0da89 Styling zone menu (#4684)
* Styling zone menu

* Update ha-device-entities-card.ts
2020-01-31 12:14:21 +01:00
HomeAssistant Azure 33d9bf4660 [ci skip] Translation update 2020-01-31 00:32:34 +00:00
Bram Kragten 1479ce9d56 Merge pull request #4672 from home-assistant/dev
20200130.0
2020-01-30 17:37:25 +01:00
Bram Kragten 1912bda60d Fix flex issues on google and alexa settings page (#4674) 2020-01-30 17:18:27 +01:00
Bram Kragten 2e25db4d1b Merge pull request #4673 from home-assistant/fix-tooltip
Fix tooltip in sidemenu
2020-01-30 17:18:02 +01:00
Bram Kragten ec08b2ef65 Update ha-sidebar.ts 2020-01-30 16:39:09 +01:00
Bram Kragten 2c740cedb8 Fix tooltip sidemenu 2020-01-30 16:38:42 +01:00
Bram Kragten e3984d7bf9 Bumped version to 20200130.0 2020-01-30 15:51:24 +01:00
Bram Kragten 2f86b6ec3d Merge pull request #4671 from home-assistant/device-page-fixes
Device info page fixes
2020-01-30 14:51:40 +01:00
Bram Kragten d10045eac1 Remove log 2020-01-30 14:34:53 +01:00
Bram Kragten 41da68290e Merge pull request #4668 from home-assistant/zone-fixes
Zone ui fixes
2020-01-30 14:04:36 +01:00
Bram Kragten 593a2de07b Device info page fixes
Fixes #4666
Fixes #4664
Fixes #4663
Fixes #4662
2020-01-30 14:03:45 +01:00
Bram Kragten 59540bdf63 Merge pull request #4667 from home-assistant/restore-back-buttons
Restore back buttons
2020-01-30 11:56:29 +01:00
Bram Kragten 616df070a4 Zone ui fixes
fixes #4659
fixes #4658
fixes #4661
fixes #4665
fixes #4660
fixes #4655
2020-01-30 11:54:49 +01:00
Bram Kragten ef62f1956b Restore back buttons
fixes #4654
fixes #4653
fixes #4656
2020-01-30 11:22:50 +01:00
HomeAssistant Azure b41f25ef12 [ci skip] Translation update 2020-01-30 00:32:32 +00:00
Bram Kragten ce8caa34f5 Merge pull request #4649 from home-assistant/dev
20200129.0
2020-01-29 19:48:36 +01:00
Bram Kragten 3ed538276e Merge branch 'master' into dev 2020-01-29 19:33:36 +01:00
Bram Kragten c1a29e8091 Bumped version to 20200129.0 2020-01-29 19:28:09 +01:00
Bram Kragten 4e8bf434f1 Add settings button to map panel (#4641) 2020-01-29 19:04:12 +01:00
Bram Kragten dd8c568a2c Fix action directive double tab iOS issues (#4639) 2020-01-29 19:03:43 +01:00
Bram Kragten 7ab9257f5e Fix translation advanced mode (#4647) 2020-01-29 19:01:35 +01:00
Bram Kragten 7021fd5809 Make dialogs full width on mobile, and modal (#4642)
* Make dialogs full width on mobile, and modal

* Fix dialog to bottom screen mobile
2020-01-29 08:59:37 -08:00
Bram Kragten adec2fc2df Only update disabled for entity reg if it is a user value. (#4646) 2020-01-29 08:51:29 -08:00
Bram Kragten 27ebcc1bda Remove balloob from cast page (#4645) 2020-01-29 17:09:56 +01:00
HomeAssistant Azure 2fb7a31c76 [ci skip] Translation update 2020-01-29 00:32:22 +00:00
Bram Kragten 65994e7280 Add related items to device info (#4637)
* Add related items to device info

* Update ha-config-device-page.ts

* remove log

* Lint

* Fix dialog logic showing triggers on script dialog

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-28 15:13:44 -08:00
Joakim Sørensen 036eedc69d Add styles to addon-header (#4632)
* Add styles to addon-header

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-28 14:37:53 -08:00
Joakim Sørensen 7937714ce6 Fixes add-on install button (#4635)
* Fixes add-on install button

* Set the default

* linting issue
2020-01-28 14:37:42 -08:00
Bram Kragten cdbd51f6f7 Update hass-tabs-subpage.ts 2020-01-28 22:44:21 +01:00
Bram Kragten d5a8105718 Update ha-config-areas.ts 2020-01-28 22:40:57 +01:00
Bram Kragten 1c9eab7ca0 Change config navigation to tabs (#4630)
* Change config navigation to tabs

* Update ha-menu-button.ts

* Icons

* update

* Review comments

* configSections -> object instead of array
2020-01-28 21:48:21 +01:00
Joakim Sørensen 6e624b394b Corrects add-on link (#4634)
* Fixes the addon url

* quote it

* Don't link the extra space

* puerly for testing

* Don't link the extra space
2020-01-28 11:39:42 -08:00
Joakim Sørensen 1cb10694e7 Fixes status switch spacing (#4633)
* fix switch spacing

* Fix alignment
2020-01-28 11:37:33 -08:00
HomeAssistant Azure d496b9742f [ci skip] Translation update 2020-01-28 00:32:38 +00:00
Paulus Schoutsen 72e5375795 Fix hassio build 2020-01-27 11:57:28 -08:00
Bram Kragten 04f8f0f74f Render should always return a html template (#4612) 2020-01-27 08:34:22 -08:00
Paulus Schoutsen 82fb622904 Add buttons header-footer (#4601)
* Add buttons header-footer

* Simplify

* Update src/panels/lovelace/header-footer/hui-buttons-header-footer.ts

Co-Authored-By: Ian Richardson <iantrich@gmail.com>

* Address comments

Co-authored-by: Ian Richardson <iantrich@gmail.com>
2020-01-27 09:34:08 +01:00
HomeAssistant Azure 95ba1fd0cb [ci skip] Translation update 2020-01-27 00:32:22 +00:00
Bram Kragten c7b3a517e8 Add area picker (#4608)
* Add area picker

* Make config flow dialog wider

* Comment
2020-01-26 21:41:11 +01:00
Joakim Sørensen 523dc881bb Convert Hass.io panel to TS/Lit (#4398)
* Convert system

* Convert dashboard

* Remove logging statement

* Convert addon view (base) and log

* Convert addon-view info

* Remove unintended file in commit

* Convert ansi-to-html

* Fix log update reloading

* Convert addon-view config

* Convert addon-view network

* Add inn missing haStyle

* Convert addon-view audio

* convert dialog-hassio-markdown

* Convert dialog-hassio-snapshot

* Convert entrypoint

* Convert hassio-style

* Lint hassio-addon-audio

* Lint hassio-addon-audio

* Lint hassio-addon-config

* Remove file that should not have been comitted

* Linting of the rest

* Cleanup

* Cleanup config

* Required changes after rebase

* Change property/method clasification

* use ? for _inputDevices and _outputDevices

* Use undefined instead of null for addon property

* Use ? for addons property

* Async addon audio

* Corrects typo in Error

* Wrap async calls in try/catch

* Remove npm task

* Fix async constant/functions

* Reintroduce noDevice

* We don't use the data of the POST no need to store and pass it

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update hassio/src/addon-view/hassio-addon-config.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update hassio/src/addon-view/hassio-addon-audio.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-audio.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Apply review comments

* Simplify selected item change

* Change back to attr

* Apply lessons learned to addon-config

* Send event on config change

* Extract error msg

* Apply lessons learned to addon-info

* Apply lessons learned to addon-logs

* Fix shorthand linting issue

* Prefix private with _

* reset error

* Apply lessons learned to addon-network

* Revert package.json change

* Apply lessons learned to addon-view

* Fixes Unnecessary 'await' issue

* rename content -> addoninfo

* Update hassio/src/addon-view/hassio-addon-config.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-config.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-config.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-network.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-logs.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Fix syntax issues

* Fix error handling issues

* Use forEach and not map

* Use private for _error

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update hassio/src/addon-view/hassio-addon-info.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Use classMap

* remove unneded limitations

* it can be null

* Update hassio/src/system/hassio-supervisor-log.ts

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* split hassio.ts

* Update datahandling

* Return result

* Use map instead of forEach

* Unnecessary 'await'.

* Move setSupervisorOption to data/hassio/supervisor

* Unnecessary 'await'

* Move fetchSupervisorLogs to data/hassio/supervisor

* Move fetchHassioHardwareInfo to data/hassio/hardware

* change error property

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-26 20:37:20 +01:00
HomeAssistant Azure 1123adc584 [ci skip] Translation update 2020-01-26 00:32:39 +00:00
Timmo 15be1688ad Merge Confirmation Dialogs into Alert, Confirmation or Prompt (#4114)
*  Add alert dialog

🔨 Add alert dialogs

🔨 add more

🔨 Add more

🔨 Enhance check

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

🔥 Combine confirmation into alert dialog

🔨 Replace confirmation calls with alert dialog

✏️ Remove 3

🔨 Add prompt logic

Rename to generic

Rename and add new params for alert, confirmation and prompt

Renames and prop changes

Rename and props

Cleanup

Setup prompt

Wording

Use text for prompt

Add prompts and confirmation on delete user

Rename

Rename

Rename imports

Fix parms change

Only use default for confirmation

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Update src/dialogs/generic/dialog-box.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Update

change text

Add autofocus

Merge show dialogs into one generic

Add automation delete confirmation

Modal

Remove deleted file

Add delete donfirm to script

Fix error with tslint

Fix from rebase

Fix from rebase

Fix from rebase

* 🔧 Split dialog functions

* 🔧 Fix from rebase

* 🔧 More fixes

* 🔧 Fix

* 🔧 Apply suggestions from code review

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* 🔧 Update from suggestion

* 🔧 Renames and cleanup

* 🔧 Camelcase

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* 🔧 camel case

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-25 17:48:29 +01:00
Bram Kragten 0c0e82a3ba Move get dialog logic entity registry (#4579) 2020-01-25 14:49:36 +01:00
Paulus Schoutsen 8abe8d7615 Automatically strip area name from entities (#4597) 2020-01-25 14:43:11 +01:00
Paulus Schoutsen f95ba4c04c Allow options flow to define form title/description (#4598)
* Allow options flow to define their own title

* Allow description too
2020-01-25 14:38:58 +01:00
Ian Richardson 6874788cc0 🐛 fix severity toggle in gauge card editor (#4600) 2020-01-25 14:35:48 +01:00
David F. Mulcahey f77bd79387 fix user given name display (#4606) 2020-01-25 14:34:15 +01:00
Ian Richardson 67a91b7c19 💄 color lights unless explicitly set not to (#4603) 2020-01-24 22:21:31 -08:00
HomeAssistant Azure 30211fe61d [ci skip] Translation update 2020-01-25 00:32:57 +00:00
Bram Kragten 9de80b2947 Fix menu button for touch (#4589)
* Fix menu button for touch

* Missed 2
2020-01-24 23:21:41 +01:00
Bram Kragten b7a3fe6e91 Improve zones UI (#4576)
* Improve zones UI

* Make home blue

* Only fit after edit in dialog

* Filter states from UI edtor

* Comments

* bring editable circle to front

* Update ha-config-zone.ts

* Update ha-config-zone.ts

* Hide side navigation for zones

* Fix initial ignore fit, fix click on switch label, space dialog buttons
2020-01-24 23:21:26 +01:00
Ian Richardson 1f38d13b3b add action_name option for scene/script rows (#4571)
*  add action_name option for scene/script rows

* address review comments
2020-01-24 23:01:01 +01:00
Ian Richardson ef6e468a7f 💄 align light card regardless of brightness support (#4582)
* 💄 align light card regardless of brightness support

* merge css properties
2020-01-24 22:12:54 +01:00
Ian Richardson 729a5e385f 🐛 don't remove key when value is empty (#4583)
* 🐛 don't remove key when value is empty

* only restrict delete to required field
2020-01-24 22:12:14 +01:00
Bram Kragten 32fd7a51f4 Fix entity registry dialog translations (#4575)
Fixes #4567
2020-01-24 10:09:40 -08:00
Ian Richardson f3f32c800e 💄 move advanced mode toggle (#4587) 2020-01-24 09:50:20 -08:00
Bram Kragten 1f44b4b5a9 Fit map if an entity moved (#4590) 2020-01-24 15:12:21 +01:00
Bram Kragten 971538e9c2 Fix alarm card editor (#4592) 2020-01-24 15:11:57 +01:00
Bram Kragten db9924bd87 Fix Mobile Entity Registry Delete Button (#4591) 2020-01-24 13:59:43 +01:00
Ian Richardson 74c6b9077a add conditional row (#4569)
*  add conditional row

* fix types

* address comments
2020-01-24 09:59:36 +01:00
Ian Richardson 23865c31e6 🐛 fix editor switches (#4584) 2020-01-24 09:32:56 +01:00
Ian Richardson 8641a701cb revert fix for card editor overflow menu selection (#4585) 2020-01-24 09:32:14 +01:00
HomeAssistant Azure 3ca99e5c90 [ci skip] Translation update 2020-01-24 00:32:23 +00:00
Ian Richardson 753804f463 💄 additional active icon states (#4510)
* 💄 additional active icon states

* ♻️ sort by domain

* 👌 address review comments

* state_color option for entities card

* fix typo

* 👌 address comments

extract common css
properly set boolean attributes
separate error states/color
fix unavailable color

* only make copy if necessary

* remove paused timer

* remove paused timer
2020-01-23 09:01:18 -08:00
Ian Richardson 9aedeab4fa close card editor on ESC (#4570) 2020-01-23 14:43:09 +01:00
HomeAssistant Azure fc4e3e90b2 [ci skip] Translation update 2020-01-23 00:32:51 +00:00
Bram Kragten ae8a9940ed Add state and related to entity reg dialog (#4473)
* Add state and related to entity reg dialog

* Replace more-info-settings, remove state tab add state button
2020-01-22 15:03:47 -08:00
Pascal Vizeli a544295167 Add netlify pipeline (#4563)
* Add netlify pipeline

* Address comments
2020-01-22 14:42:32 -08:00
Ian Richardson 8a9e149d33 ♻️ convert more-info-script to LitElement/TypeScript (#4545)
* ♻️ convert more-info-script to Lit/TypeScript

* ♻️ convert more-info-script to LitElement/TypeScript

* 👌 use relative time
2020-01-22 22:01:02 +01:00
Bram Kragten 49611e285f Add zones config UI (#4556)
* Add zones config UI

* Update en.json

* Update dialog-zone-detail.ts

* Update hc-cast.ts

* Update more-info-content.ts

* Add drag radius and icon to dialog

* Review comments
2020-01-22 11:29:51 -08:00
Franck Nijhof def0c51669 Update issue and PR templates (#4553)
* Update issue and PR templates

* Small Tweak
2020-01-22 09:33:18 -08:00
Ian Richardson 572215b359 🔥 remove more-info-updater (#4544)
* 🔥 remove more-info-updater

* remove reference
2020-01-22 09:30:12 -08:00
Bram Kragten 0f8cf574d3 Use state icon in logbook instead of domain icon (#4558)
Fixes https://github.com/home-assistant/home-assistant-polymer/issues/2313
2020-01-22 09:17:49 -08:00
Bram Kragten 312f1df368 Fix string type in ha-form-string (#4559) 2020-01-22 15:28:54 +01:00
Bram Kragten 5bfacb3bf0 Fix lovelace reload button on error page (#4557)
Fixes https://github.com/home-assistant/home-assistant-polymer/issues/3107
2020-01-22 15:03:51 +01:00
HomeAssistant Azure 2103866c48 [ci skip] Translation update 2020-01-22 00:32:29 +00:00
Franck Nijhof 61cf1bf1eb Add stalebot (#4551) 2020-01-21 16:51:10 +01:00
David F. Mulcahey 9c407caf2c Hide blank manufacturer names on Device details page (#4543)
* don't show "by" when there is no manufacturer

* Update src/panels/config/devices/device-detail/ha-device-card.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-21 16:26:32 +01:00
Bram Kragten 323cf72be3 Fix #4539 (#4550) 2020-01-21 16:25:58 +01:00
Marius eeced628b3 add never_triggered (#4442)
* add never_triggered

Add never_triggered to the last-triggered secondary_info.
as it stands, the secondary_info line is empty when used on an automation or script that hasn't been triggered yet, while the user expects info on that line.

* add "never_triggered"

for automation and script, to use in secondary_info
add last_triggered on script, because it was missing

* delete spaces

* add 2 spaces

travis check

* travis check row 116

* add never_triggered

to entities, delete incorrect entries to automation and script

* Update src/translations/en.json

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/components/hui-generic-entity-row.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/components/hui-generic-entity-row.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update en.json

* Update hui-generic-entity-row.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Ian Richardson <iantrich@gmail.com>
2020-01-21 08:21:32 -06:00
David F. Mulcahey 38be488f86 Update ZHA config panel to handle the addition of ZHA devices for the Zigbee coordinator (#4541)
* only show when there are entities

* handle coordinator correctly
2020-01-21 10:35:31 +01:00
Ian Richardson 83756a338a ♻️ convert more-info-automation to LitElement/TypeScript (#4547) 2020-01-21 10:31:22 +01:00
Ian Richardson b9415cb5f0 ♻️ convert more-info-default to LitElement/TypeScript (#4546) 2020-01-21 10:29:38 +01:00
HomeAssistant Azure fd49e26120 [ci skip] Translation update 2020-01-21 00:32:30 +00:00
Bram Kragten 3474e92eb7 Fix alignment entities card header toggle (#4532) 2020-01-20 21:05:05 +01:00
Bram Kragten 913299998c Fix missing text device entities (#4531) 2020-01-20 21:04:47 +01:00
Paulus Schoutsen d9e522e4d7 Add header/footer support to entities card (#4496)
* Add header/footer support to entities card

Oops debug radius

Revert change to hui-picture-card

Remove unused import

* Use new createElement helper
2020-01-20 18:13:19 +01:00
David F. Mulcahey 22c8e4a455 Add the "add all device entities to Lovelace" functionality to ZHA device card (#4521)
* fix race condition

* add all entities
2020-01-20 14:22:48 +01:00
Franck Nijhof 02fe5144d8 Remove obsolete homebridge_* attributes (#4533) 2020-01-20 14:17:57 +01:00
David F. Mulcahey 9d333fb557 use logical device type (#4524) 2020-01-20 12:14:47 +01:00
David F. Mulcahey ef2ca4a07f Clean up display of ZHA device page (#4522)
* remove margins

* adjust help icon and max width
2020-01-20 12:13:47 +01:00
Ian Richardson f74ee76ae2 📝 clarify what conditions in automations are (#4514)
* 📝 clarify what conditions in automations are

* 📝 reword to make short and sweet
2020-01-19 17:07:58 -08:00
HomeAssistant Azure 6fb9a7636d [ci skip] Translation update 2020-01-20 00:32:40 +00:00
Joakim Sørensen 56249110d6 Adds error to shopinglist card editor if integration is not loaded (#4523)
* Adds error to shopinglist card edito if integration is not loaded

* localization

* Update src/translations/en.json

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-19 14:39:07 -08:00
Ian Richardson 1a2ebabd22 🚸 prompt user to confirm logout (#4501)
* 🚸 prompt user to confirm logout

* 👌 update dialog title/text/confirm
2020-01-18 22:02:36 -08:00
Ian Richardson 28511d0cbf only set tabindex if tap_action defined (#4511) 2020-01-18 21:59:56 -08:00
Joakim Sørensen b01bdec973 Bring back ha-icon-next (#4516) 2020-01-18 21:57:24 -08:00
Michael Irigoyen ecee5980af Update Material Design Icons to v4.8.95 (#4520) 2020-01-18 21:54:30 -08:00
HomeAssistant Azure 3e1b85e6b5 [ci skip] Translation update 2020-01-19 00:32:50 +00:00
HomeAssistant Azure ce94d1ea7c [ci skip] Translation update 2020-01-18 00:32:47 +00:00
Paulus Schoutsen 62654ec598 Refactor create element (#4509)
* Refactor create element

* Move things around

* Fix reference in gallery
2020-01-17 16:19:01 -08:00
Ian Richardson fbe4550c78 🐛 fix display of current/set temperature when 0 (#4498)
* 🐛 fix display of current/set temperature when 0

* 👌 nullish coalescing
2020-01-17 23:08:18 +01:00
Bram Kragten a082667c24 Bumped version to 20200108.2 2020-01-17 22:42:48 +01:00
Bram Kragten fc29b519ae Don't use light card in generated Lovelace mode (#4505)
* Don't make seperate card for grouped lights

* Update generate-lovelace-config.ts

* Don't use light group at all in generated UI
2020-01-17 22:42:24 +01:00
Bram Kragten c391b19c0e fixes #4468 (#4508) 2020-01-17 22:41:57 +01:00
Bram Kragten 8c49e3c4ef fixes #4468 (#4508) 2020-01-17 22:41:09 +01:00
Ian Richardson 67022b9ffc 🐛 make picture card tabbable only if action set (#4494)
* 🐛 make picture card tabbable only if action set

* 👌use ifDefined and hasAction

* ✏️ fix syntax mistake
2020-01-17 22:39:24 +01:00
Bram Kragten eb9023595d Don't use light card in generated Lovelace mode (#4505)
* Don't make seperate card for grouped lights

* Update generate-lovelace-config.ts

* Don't use light group at all in generated UI
2020-01-17 22:38:08 +01:00
Bram Kragten 8262d1617f Bumped version to 20200108.1 2020-01-17 17:13:00 +01:00
Alexei Chetroi 581a803cc4 Fix ZHA add device path. (#4486) 2020-01-17 17:12:13 +01:00
Paulus Schoutsen 5ff8fe68ba Alert user when add-on not started (#4485) 2020-01-17 17:02:56 +01:00
David F. Mulcahey a2a039ebc5 Add group binding to the ZHA config panel and misc. cleanup (#4466)
* clean up zha device card and usage

* group binding tile

* add cluster selection to group binding tile

* fix css class name

* fix filtering

* multiselect for clusters in group binding

* pass narrow to cluster table

* fix tables

* fix device page

* address remaing comments from previous PR

* fix bad cherry-pick

* css cleanup

* consistency

* use properties

* translations

* add confirmation dialog to remove button

* fix css

* review comments

* remove noise
2020-01-17 16:39:57 +01:00
Ian Richardson 1064aed1b0 📝 make some Lovelace UI text more clear (#4500) 2020-01-17 09:54:16 +01:00
Ian Richardson 7025592e8e 🐛 fix picture glance card's camera_view option in editor (#4495) 2020-01-17 09:44:57 +01:00
HomeAssistant Azure 4966354b62 [ci skip] Translation update 2020-01-17 00:32:37 +00:00
David F. Mulcahey 68d6faf4af fix selection check (#4488) 2020-01-16 18:19:01 +01:00
Paulus Schoutsen e3346483b9 Hide device trackers from generated lovelace (#4487) 2020-01-16 08:57:41 +01:00
HomeAssistant Azure e8fb79e5ce [ci skip] Translation update 2020-01-16 00:32:40 +00:00
Alexei Chetroi d612162ab1 Fix ZHA add device path. (#4486) 2020-01-15 20:05:05 +01:00
Bram Kragten 86f8ef3a70 Styling focus menus (#4483)
* Styling menus

* Update ha-config-navigation.ts
2020-01-15 19:41:56 +01:00
Bram Kragten 0e43435362 Don't ask to choose view when only 1 view (#4480) 2020-01-15 09:05:01 -08:00
Bram Kragten aaefe0b09f Handle unknown state (#4481) 2020-01-15 09:01:59 -08:00
Bram Kragten bc731a9dc3 Add edit btn to more info for scene, script and automation (#4476) 2020-01-15 09:50:16 +01:00
Bram Kragten da25701dca Disable adoptedStyleSheets in dev (#4474) 2020-01-15 09:25:17 +01:00
Bram Kragten 21ae483dc9 Styling fixes (#4475) 2020-01-15 09:25:04 +01:00
HomeAssistant Azure 38b6e9ca10 [ci skip] Translation update 2020-01-15 00:32:57 +00:00
Bram Kragten d31245866c Add DEPRECATED to states ui (#4463)
* Add DEPRECATED to states ui

* unelevated red

* target

* Add msg in info
2020-01-14 06:35:01 -08:00
Bram Kragten 4e08d8f3b3 Fix zha back btn (#4470) 2020-01-14 07:57:00 -05:00
Bram Kragten 1e717ab33e Catch undefined cloudstatus (#4465) 2020-01-14 13:52:23 +01:00
Bram Kragten 995fb4974e Fix translations (#4469) 2020-01-14 13:20:06 +01:00
HomeAssistant Azure ffb76132f8 [ci skip] Translation update 2020-01-14 00:32:29 +00:00
Bram Kragten acba3af54b Fix back btn for Polymer (#4467) 2020-01-13 18:21:43 +01:00
Paulus Schoutsen 40ac456937 Force refresh tokens if external app (#4461) 2020-01-13 05:47:08 -08:00
Bram Kragten 5c32413bf7 Onboarding core: Display error message when saving fails (#4462) 2020-01-13 05:31:53 -08:00
Bram Kragten 22792c70c5 Change config panel navigation (#4377)
* Change config panel navigation

* Show active + don't show toolbar?

* Update ha-panel-config.ts

* Change color of menu toolbar

* Update ha-config-router.ts

* Review comments
2020-01-12 17:57:38 +01:00
Krisjanis Lejejs a8ed87298a Improved map panel and map card to ignore zones when fitting map. (#4447)
* Improved map panel and map card to ignore zones when fitting map. [#1598](https://github.com/home-assistant/home-assistant-polymer/issues/1598)

* Improved map panel and map card to ignore zones when fitting map. [#1598](https://github.com/home-assistant/home-assistant-polymer/issues/1598)

* Improved map panel and map card to ignore zones when fitting map. [#1598](https://github.com/home-assistant/home-assistant-polymer/issues/1598)

* Changed approach and created a different array for zones

* Removed zone key option for markers
2020-01-12 17:56:55 +01:00
Joakim Sørensen b15270dfe2 Use correct suffix for elevation (#4454)
* Use correct suffix for elevation

* Use correct suffix for elevation
2020-01-12 07:31:59 -08:00
Bram Kragten 58ad949bc8 Virtualize logbook (#4450)
* Virtualize logbook

* Clean

* Update ha-logbook.ts
2020-01-12 13:00:26 +01:00
HomeAssistant Azure adce40de56 [ci skip] Translation update 2020-01-12 00:33:31 +00:00
Ian Richardson 0f487ae4bf Add tabindex to lovelace elements (#4160)
* tabindex

* use action handler

* circular focus test

* address comment

* add focus styling to other elements

* add focus styling to cards

* style glance card entities

* Add back light/thermo changes that were lost in rebase

* Remove unused import

* lint

* lint

* 💄 tweak focus style for glance entities

* 💄 apply styling to focused state-label-badges
2020-01-11 11:50:43 +01:00
Joakim Sørensen 2848e3a63b Adds CCS var usage to person dialog (#4449) 2020-01-11 11:49:57 +01:00
Bram Kragten 5a172a64c5 Make entry flow dialog modal (#4440)
* Make entry flow dialog modal

* Add close button

* Update dialog-data-entry-flow.ts

* Fix aria-label
2020-01-10 16:40:19 -08:00
HomeAssistant Azure 433aa16ea6 [ci skip] Translation update 2020-01-11 00:32:34 +00:00
HomeAssistant Azure 50cb8cf3cc [ci skip] Translation update 2020-01-10 00:32:38 +00:00
Sean Mooney 4e5406b27b Typo fix in issue template (#4445)
fixes small typo, necesarry = necessary
2020-01-09 09:29:42 -06:00
Franck Nijhof 80eb80619a Add configuration for Lock Threads on closed pull requests (#4443) 2020-01-09 11:40:25 +01:00
Ian Richardson bf71b3a869 ♻️ convert ha-attributes to lit-element (#4350)
* ♻️ convert ha-attributes to lit-element

* Address comments

* inline items

* 🐛 Fix attribution display logic
2020-01-09 10:22:23 +01:00
HomeAssistant Azure ff270c4b7d [ci skip] Translation update 2020-01-09 00:32:44 +00:00
Bram Kragten 8b659498b6 Merge pull request #4439 from home-assistant/dev
20200108.0
2020-01-08 18:54:05 +01:00
David F. Mulcahey 5415068917 Rework the ZHA config panel (#4415)
* convert zha config panel to tabs

* add spacer to prevent combobox from hitting bottom

* break clusters out into their own section

* cleanup buttons

* remove header

* make devices default tab

* convert from tabs to a list view

* convert to table on dashboard

* fix anchor on mobile safari

* cleanup CSS to fix display on mobile

* cleanup card css

* more css cleanup

* fix group page

* remove translations changes

* Update src/panels/config/zha/zha-clusters.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

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

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-device-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-groups-dashboard.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* review comments

* fix dangling quote after commit suggestion

* css cleanup

* remove flex rules

* remove flex rules

* css  cleanup

* remove dialog per review comments

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-08 18:35:21 +01:00
Bram Kragten 357a67c00d Bumped version to 20200108.0 2020-01-08 18:26:20 +01:00
HomeAssistant Azure cbe4269320 [ci skip] Translation update 2020-01-08 17:25:54 +00:00
Bram Kragten fbd5185ce2 Add ability to remove Lovelace config (#4430)
* Add ability to remove Lovelace config

* Update hc-lovelace.ts
2020-01-08 18:19:10 +01:00
Bram Kragten a33cf97e2c Fix moving actions with data (#4438) 2020-01-08 18:18:53 +01:00
Pascal Vizeli 7e7da26543 Update azure-pipelines-translation.yml for Azure Pipelines 2020-01-08 16:54:09 +01:00
Bram Kragten 79058e893b Add alert when Google sync failed (#4435) 2020-01-08 15:59:22 +01:00
Bram Kragten e9231fc17e 20200107.0
20200107.0
2020-01-07 21:26:10 +01:00
Bram Kragten 2eb548bb74 Merge branch 'master' into dev 2020-01-07 20:53:23 +01:00
Bram Kragten 08baf8a757 Bumped version to 20200107.0 2020-01-07 20:50:51 +01:00
Bram Kragten f02fa6a94b Add multi select to entity registry (#4424)
* Add multi select to entity registry

* Fix filter and sort on status

* Remove unused prop platform

* Review

* Update ha-config-entity-registry.ts
2020-01-07 12:29:42 +01:00
Bram Kragten 2ed6d0e73c Make modal of Lovelace editor dialogs (#4426)
Fixes #4425
2020-01-06 22:25:17 +01:00
David F. Mulcahey 35d9b2ac3c Add the ability to create new Zigbee groups to the ZHA config panel (#4384)
* add group page

* Update src/panels/config/zha/zha-add-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* fix group name handling

* Update src/panels/config/zha/zha-add-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-06 07:02:47 -05:00
Bram Kragten 18d09c6f04 Add UI for restored entities (#4414)
* Add UI for restored entities

* Add conformation for removal

* Apply suggestions

* Guard
2020-01-03 12:44:25 +01:00
Joakim Sørensen 70b81de49d Force rerender on update/save (#4396)
* Force rerender on update/save

* Fix linting issue

* Define properties by using @property() instead

* Add styles to disabled save button

* Change to use @customElement, and remove _generation as a property.
2020-01-02 21:15:26 +01:00
David Cramer f0808c1f54 Add ha-subppage toolbar css styles (#4409) 2020-01-02 20:55:43 +01:00
Jay e779f0747e Change TRIGGER to EXECUTE (#4413)
There's been some confusion among new users about what the `TRIGGER` button does in the automation info popup. `EXECUTE` better represents what pressing that button does since it bypasses conditions and simply runs the action like a script. The automation docs at <https://www.home-assistant.io/docs/automation/action/> also say "The action of an automation rule is what is being executed when a rule fires."
2020-01-02 20:16:39 +01:00
David F. Mulcahey bdd18775c3 Add group editing to the ZHA config panel (#4382)
* add group editing

* Update src/panels/config/zha/zha-devices-data-table.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-devices-data-table.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/config/zha/zha-group-page.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* review comments

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-01-02 15:59:18 +01:00
David F. Mulcahey 711d51c022 Disable ZHA device binding buttons when a device to bind isn't selected (#4407)
* only enable buttons when a device is selected

* review comments
2020-01-02 07:24:40 -05:00
David F. Mulcahey 1b0d8bba29 fix area index on ZHA device card (#4406) 2020-01-02 10:50:19 +01:00
Colin Frei 2988cc512f Fix grammatical error (#4403) 2020-01-02 10:28:36 +01:00
Joakim Sørensen a2f8e5f3e7 Hide protection mode toggle if not usable (#4392) 2020-01-02 10:20:21 +01:00
David F. Mulcahey 680bf06a4b Add group detail view to the ZHA config panel (#4380)
* add group details

* review comments
2019-12-24 10:29:22 -05:00
David F. Mulcahey ff0b1881e2 Add Zigbee group removal to the ZHA config panel (#4376)
* add remove groups function

* add ability to remove groups

* translations

* review comments

* review comments

* review comments
2019-12-24 08:12:02 -05:00
David F. Mulcahey de653e1f7b Add Zigbee group viewing to ZHA config panel (#4365)
* add ability to view zigbee groups

* review comments

* remove selectable until used
2019-12-23 10:46:34 -05:00
Bram Kragten bb41170765 Add language Iban (#4375) 2019-12-23 16:27:41 +01:00
Bram Kragten 0ed2bc93aa Remove uploading translations from Travis (#4374) 2019-12-23 13:39:47 +01:00
Bram Kragten 04770f8ee2 Add language Esperanto (#4373) 2019-12-23 13:39:31 +01:00
Bram Kragten 15a2790b9f Add support to add all device entities to Lovelace (#4356)
* Add support to add all device entities to Lovelace

* Reload config when it was changed while Lovelace was not active

* Localize

* Update ha-panel-lovelace.ts

* Move to device entities card

* Move Lovelace logic to lovelace combine with unused entities

* Unused imports

* Added suggestions and support for YAML mode
2019-12-23 10:39:17 +01:00
Jc2k 83880791b1 Add 'unignore' to DISCOVERY_SOURCES that can be ignored. (#4370) 2019-12-21 17:10:20 +01:00
HomeAssistant Azure 4dca3289f6 [ci skip] Translation update 2019-12-19 16:07:21 +00:00
Pascal Vizeli 083a3ebfc4 Run translation on dev (#4368) 2019-12-19 17:03:05 +01:00
Pascal Vizeli 6117c4e989 Add Auto Translation handling (#4339)
* Add Auto Translation handling

* Cleanup
2019-12-18 16:38:36 +01:00
Bram Kragten 609763e658 Set focus to search when opening add integration dialog (#4357)
* Set focus to search when opening add integration dialog

* Also add to flow form
2019-12-18 16:35:20 +01:00
Bram Kragten 2c57ab60f1 Add ignore discovery button (#4354)
* Add ignore discovery button

* Add seperate list for ignored integrations

* Move translations

* Add zeroconf
2019-12-18 16:22:17 +01:00
Ian Richardson dd17a153d2 Fire custom LL event (#4361) 2019-12-18 07:40:26 +01:00
Bram Kragten c2d551bb7c Merge pull request #4341 from bonanitech/patch-2
Upgrade MDI icons to 4.7.95
2019-12-12 17:20:24 +01:00
Mauricio Bonani e0b1921108 Fix version number 2019-12-09 12:40:11 -05:00
Mauricio Bonani fcf39ceb96 Upgrade MDI icons to 4.7.95 2019-12-09 12:27:03 -05:00
Mauricio Bonani 3cc979a077 Upgrade MDI icons to 4.7.95 2019-12-09 12:24:36 -05:00
Bram Kragten d1990a4bac Revert "Add copy entity ID/state/attributes menu button in dev tools/states" (#4337)
* Revert "Add copy entity ID/state/attributes menu button in dev tools/states (#4259)"

This reverts commit 4b56db5255.

* Update package.json
2019-12-09 12:59:20 +01:00
Bram Kragten cbba1849e2 Convert script and automation editor to lit (#4327)
* Convert script and automation editor to lit

* Update yarn.lock
2019-12-09 10:59:52 +01:00
Bram Kragten 43393d1647 Update cloud-google-assistant.ts (#4329) 2019-12-09 08:34:36 +01:00
Bram Kragten b47ee1051c Fix thingtalk automations creation (#4328) 2019-12-07 20:46:04 +01:00
Bram Kragten 393adacc9e Convert automation actions/scripts to Lit (#4324)
* Convert automation actions/scripts to Lit

* Update ha-automation-action-row.ts

* Comments
2019-12-06 12:14:45 +01:00
Bram Kragten 073428849e Convert automation conditions to Lit (#4321)
* Convert automation conditions to Lit

* Split condition editor and row

* Comments

* Update automation.ts

* Update automation.ts
2019-12-05 19:48:06 +01:00
Bram Kragten e6ac0258e3 Use dynamicElement directive in ha-form (#4317)
* Use dynamicContentDirective

* Turn around

* Remove attributes

* Rename to dynamicElement
2019-12-04 22:58:35 +01:00
1245 changed files with 115089 additions and 54918 deletions
-4
View File
@@ -1,4 +0,0 @@
node_modules
hass_frontend
hass_frontend_es5
.git
-80
View File
@@ -1,80 +0,0 @@
{
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
"ecmaVersion": "2020",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"settings": {
"react": {
"pragma": "h",
"version": "15.0"
},
"import/resolver": {
"webpack": {
"config": "webpack.config.js"
}
}
},
"globals": {
"__DEV__": false,
"__DEMO__": false,
"__BUILD__": false,
"__VERSION__": false,
"__STATIC_PATH__": false,
"Polymer": true,
"webkitSpeechRecognition": false,
"ResizeObserver": false
},
"env": {
"browser": true,
"mocha": true
},
"rules": {
"class-methods-use-this": 0,
"new-cap": 0,
"prefer-template": 0,
"object-shorthand": 0,
"func-names": 0,
"prefer-arrow-callback": 0,
"no-underscore-dangle": 0,
"no-var": 0,
"strict": 0,
"prefer-spread": 0,
"no-plusplus": 0,
"no-bitwise": 0,
"comma-dangle": 0,
"vars-on-top": 0,
"no-continue": 0,
"no-param-reassign": 0,
"no-multi-assign": 0,
"radix": 0,
"no-alert": 0,
"no-return-await": 0,
"prefer-destructuring": 0,
"no-restricted-globals": [2, "event"],
"prefer-promise-reject-errors": 0,
"import/prefer-default-export": 0,
"import/no-unresolved": 0,
"import/extensions": [2, "ignorePackages"],
"object-curly-newline": 0,
"default-case": 0,
"react/jsx-no-bind": [2, { "ignoreRefs": true }],
"react/jsx-no-duplicate-props": 2,
"react/self-closing-comp": 2,
"react/prefer-es6-class": 2,
"react/no-string-refs": 2,
"react/require-render-return": 2,
"react/no-find-dom-node": 2,
"react/no-is-mounted": 2,
"react/jsx-no-comment-textnodes": 2,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"no-restricted-syntax": [0, "ForOfStatement"],
"prettier/prettier": "error"
},
"plugins": ["react", "prettier"]
}
+79 -7
View File
@@ -1,12 +1,84 @@
{
"extends": "./.eslintrc-hound.json",
"plugins": ["react"],
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb-typescript/base",
"plugin:wc/recommended",
"plugin:lit/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"ecmaFeatures": {
"modules": true
},
"sourceType": "module",
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"webpack": {
"config": "./webpack.config.js"
}
}
},
"globals": {
"__DEV__": false,
"__DEMO__": false,
"__BUILD__": false,
"__VERSION__": false,
"__STATIC_PATH__": false,
"Polymer": true,
"webkitSpeechRecognition": false,
"ResizeObserver": false
},
"env": {
"browser": true
"browser": true,
"es6": true
},
"rules": {
"import/no-unresolved": 2,
"linebreak-style": 0,
"implicit-arrow-linebreak": 0
}
"class-methods-use-this": 0,
"new-cap": 0,
"prefer-template": 0,
"object-shorthand": 0,
"func-names": 0,
"prefer-arrow-callback": 0,
"no-underscore-dangle": 0,
"no-var": 0,
"strict": 0,
"prefer-spread": 0,
"no-plusplus": 0,
"no-bitwise": 0,
"comma-dangle": 0,
"vars-on-top": 0,
"no-continue": 0,
"no-param-reassign": 0,
"no-multi-assign": 0,
"radix": 0,
"no-alert": 0,
"no-return-await": 0,
"no-nested-ternary": 0,
"prefer-destructuring": 0,
"no-restricted-globals": [2, "event"],
"prefer-promise-reject-errors": 0,
"import/order": 0,
"import/prefer-default-export": 0,
"import/no-unresolved": 0,
"import/no-cycle": 0,
"import/extensions": 0,
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
"object-curly-newline": 0,
"default-case": 0,
"wc/no-self-class": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/explicit-function-return-type": 0
},
"plugins": ["disable", "import", "lit", "prettier", "@typescript-eslint"],
"processor": "disable/disable"
}
+1
View File
@@ -11,3 +11,4 @@
*.mp3 binary
demo/public/api/camera_proxy_stream/* binary
demo/public/api/media_player_proxy/* binary
+100
View File
@@ -0,0 +1,100 @@
---
name: Report a bug with the UI, Frontend or Lovelace
about: Report an issue related to the Home Assistant frontend.
labels: bug
---
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Do not report issues for custom Lovelace cards.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## Checklist
- [ ] I have updated to the latest available Home Assistant version.
- [ ] I have cleared the cache of my browser.
- [ ] I have tried a different browser to see if it is related to my browser.
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us about the current behavior.
If possible provide a screenshot with a description.
-->
## Expected behavior
<!--
Describe what you expected to happen or it should look/behave.
If possible provide a screenshot with a description.
-->
## Steps to reproduce
<!--
Provide steps for us, that helps reproducing your issue.
For example:
1. Add a climate integration
2. Navigate to Lovelace
3. Click more info of the climate entity
4. Set the HVAC action to heat
5. Set the temperature higher than the current temperature
6. Set the HVAC action to cool
-->
## Environment
<!--
Provide details about the versions you are using, which helps us reproducing
and finding the issue quicker. Version information is found in the
Home Assistant frontend: Developer tools -> Info.
Browser version and operating system is important! Please try to replicate
your issue in a different browser and be sure to include your findings.
-->
- Home Assistant release with the issue:
- Last working Home Assistant release (if known):
- Browser and browser version:
- Operating system:
## State of relevant entities
<!--
If your issue is about how an entity is shown in the UI, please add the state
and attributes for all situations with a screenshot of the UI.
You can find this information at `/developer-tools/state`
-->
```yaml
```
## Problem-relevant configuration
<!--
An example configuration that caused the problem for you. Fill this out even
if it seems unimportant to you. Please be sure to remove personal information
like passwords, private URLs and other credentials.
-->
```yaml
```
## Javascript errors shown in your browser console/inspector
<!--
If you come across any javascript or other error logs, e.g., in your browser
console/inspector please provide them.
-->
```txt
```
## Additional information
+26
View File
@@ -0,0 +1,26 @@
---
name: Request a feature for the UI, Frontend or Lovelace
about: Request an new feature for the Home Assistant frontend.
labels: feature request
---
<!--
DO NOT DELETE ANY TEXT from this template!
Otherwise, your request may be closed without comment.
-->
## The request
<!--
Describe to our maintainers, the feature you would like to be added.
Please be clear and concise and, if possible, provide a screenshot or mockup.
-->
## The alternatives
<!--
Are you currently using, or have you considered alternatives?
If so, could you please describe those?
-->
## Additional information
-78
View File
@@ -1,78 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Provide as many details as possible. Do not delete any text from this template!
-->
**Checklist:**
- [ ] I updated to the latest version available
- [ ] I cleared the cache of my browser
**Home Assistant release with the issue:**
<!--
- Frontend -> Developer tools -> Info
- Or use this command: hass --version
-->
**Last working Home Assistant release (if known):**
**UI (States or Lovelace UI?):**
<!--
- Frontend -> Developer tools -> Info
-->
**Browser and Operating System:**
<!--
Provide details about what browser (and version) you are seeing the issue in. And also which operating system this is on. If possible try to replicate the issue in other browsers and include your findings here.
-->
**Description of problem:**
<!--
Explain what the issue is, and what is the current behaviour. If possible provide a screenshot with a description.
-->
**Expected behaviour:**
<!--
Explain how things should look/behave. If possible provide a screenshot with a description.
-->
**Relevant config:**
<!--
Give the config of both the integration that is used, the Lovelace config, scene, automation or otherwise relevant configuration.
-->
**Steps to reproduce this problem:**
<!--
Sum up all steps that are necesarry to reproduce this bug.
For example:
1. Add a climate integration
2. Navigate to Lovelace
3. Click more info of the climate entity
4. Set the hvac action to heat
5. Set the temperature higher than the current temperature
6. Set the hvac action to cool
-->
**Javascript errors shown in the web inspector (if applicable):**
```
```
**Additional information:**
+14
View File
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Report a bug that is NOT related to the UI, Frontend or Lovelace
url: https://github.com/home-assistant/core/issues
about: This is the issue tracker for our frontend. Please report other issues with the backend repository.
- name: Report incorrect or missing information on our website
url: https://github.com/home-assistant/home-assistant.io/issues
about: Our documentation has its own issue tracker. Please report issues with the website there.
- name: I have a question or need support
url: https://www.home-assistant.io/help
about: We use GitHub for tracking bugs, check our website for resources on getting help.
- name: I'm unsure where to go
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
-19
View File
@@ -1,19 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: feature request
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+83
View File
@@ -0,0 +1,83 @@
<!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did this.
This piece of text is published with the release notes, so it helps if you
write it towards our users, not us.
Note: Remove this section if this PR is NOT a breaking change.
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
## Type of change
<!--
What type of change does your PR introduce to the Home Assistant frontend?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Example configuration
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR.
-->
```yaml
```
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [ ] The code change is tested and works locally.
- [ ] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
<!--
Thank you for contributing <3
-->
[docs-repository]: https://github.com/home-assistant/home-assistant.io
+27
View File
@@ -0,0 +1,27 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 1
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: 2020-01-01
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: false
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: pulls
# Optionally, specify configuration settings just for `issues` or `pulls`
issues:
daysUntilLock: 30
+56
View File
@@ -0,0 +1,56 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- feature request
- Help wanted
- to do
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
There hasn't been any activity on this issue recently. Due to the high number
of incoming GitHub notifications, we have to clean some of the old issues,
as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check
if that solves the issue. Let us know if that works for you by adding a
comment 👍
This issue now has been marked as stale and will be closed if no further
activity occurs. Thank you for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
only: issues
+125
View File
@@ -0,0 +1,125 @@
name: CI
on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v2
- name: Setting up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Build icons
run: ./node_modules/.bin/gulp gen-icons-json
- name: Build translations
run: ./node_modules/.bin/gulp build-translations
- name: Run eslint
run: ./node_modules/.bin/eslint '{**/src,src}/**/*.{js,ts,html}' --ignore-path .gitignore
- name: Run tsc
run: ./node_modules/.bin/tsc
test:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v2
- name: Setting up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Run Mocha
run: npm run mocha
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Check out files from GitHub
uses: actions/checkout@v2
- name: Setting up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Build Application
run: ./node_modules/.bin/gulp build-app
env:
IS_TEST: "true"
supervisor:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Check out files from GitHub
uses: actions/checkout@v2
- name: Setting up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Build Application
run: ./node_modules/.bin/gulp build-hassio
env:
IS_TEST: "true"
+39
View File
@@ -0,0 +1,39 @@
name: Demo
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v2
- name: Setting up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Build Demo
run: ./node_modules/.bin/gulp build-demo
- name: Deploy to Netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_DEV_SITE_ID }}
with:
args: deploy --dir=demo/dist --prod
+14
View File
@@ -0,0 +1,14 @@
name: Release Drafter
on:
push:
branches:
- dev
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+3 -1
View File
@@ -5,7 +5,6 @@ npm-debug.log
.DS_Store
hass_frontend/*
.reify-cache
demo/hademo-icons.html
# Python stuff
*.py[cod]
@@ -31,3 +30,6 @@ src/cast/dev_const.ts
# Secrets
.lokalise_token
yarn-error.log
#asdf
.tool-versions
+10
View File
@@ -0,0 +1,10 @@
build
build-translations/*
translations/*
node_modules/*
hass_frontend/*
pip-selfcheck.json
# vscode
.vscode/*
!.vscode/extensions.json
-27
View File
@@ -1,27 +0,0 @@
sudo: false
language: node_js
cache:
yarn: true
directories:
- bower_components
install: yarn install
script:
- npm run build
- hassio/script/build_hassio
# Because else eslint fails because hassio has cleaned that build
- ./node_modules/.bin/gulp gen-icons-app
- npm run test
# - xvfb-run wct --module-resolution=node --npm
# - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct --module-resolution=node --npm --plugin sauce; fi'
services:
- docker
before_deploy:
- "docker pull lokalise/lokalise-cli@sha256:2198814ebddfda56ee041a4b427521757dd57f75415ea9693696a64c550cef21"
deploy:
provider: script
script: script/travis_deploy
"on":
branch: master
dist: trusty
addons:
sauce_connect: true
-1
View File
@@ -1,7 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.vscode-typescript-tslint-plugin",
"esbenp.prettier-vscode",
"bierner.lit-html",
"runem.lit-plugin"
+108 -48
View File
@@ -2,79 +2,139 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
## Enforcement Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [safety@home-assistant.io][email]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the community leaders responsible for enforcement at
[safety@home-assistant.io][email] or by using the report/flag feature of
the medium used. All complaints will be reviewed and investigated promptly and
fairly.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available [here][version].
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available [here][version].
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][mozilla].
## Adoption
This Code of Conduct was first adopted January 21st, 2017 and announced in [this][coc-blog] blog post.
This Code of Conduct was first adopted January 21st, 2017 and announced in
[this][coc-blog] blog post and has been updated on May 25th, 2020 to version
2.0 of the [Contributor Covenant][homepage] as announced in [this][coc2-blog]
blog post.
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
[coc-blog]: /blog/2017/01/21/home-assistant-governance/
[coc2-blog]: /blog/2020/05/25/code-of-conduct-updated/
[email]: mailto:safety@home-assistant.io
[coc-blog]: https://home-assistant.io/blog/2017/01/21/home-assistant-governance/
[homepage]: http://contributor-covenant.org
[mozilla]: https://github.com/mozilla/diversity
[version]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
-31
View File
@@ -1,31 +0,0 @@
FROM node:8.11.1-alpine
# install yarn
ENV PATH /root/.yarn/bin:$PATH
## Install/force base tools
RUN apk update \
&& apk add make g++ curl bash binutils tar git python2 python3 \
&& rm -rf /var/cache/apk/* \
&& /bin/bash \
&& touch ~/.bashrc
## Install yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
## Setup the project
RUN mkdir -p /frontend
WORKDIR /frontend
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
COPY script/docker_entrypoint.sh /usr/bin/docker_entrypoint.sh
RUN chmod +x /usr/bin/docker_entrypoint.sh
CMD [ "docker_entrypoint.sh" ]
+4 -10
View File
@@ -1,4 +1,4 @@
# Home Assistant Polymer [![Build Status](https://travis-ci.org/home-assistant/home-assistant-polymer.svg?branch=master)](https://travis-ci.org/home-assistant/home-assistant-polymer)
# Home Assistant Frontend
This is the repository for the official [Home Assistant](https://home-assistant.io) frontend.
@@ -6,12 +6,12 @@ This is the repository for the official [Home Assistant](https://home-assistant.
- [View demo of Home Assistant](https://demo.home-assistant.io/)
- [More information about Home Assistant](https://home-assistant.io)
- [Frontend development instructions](https://developers.home-assistant.io/docs/en/frontend_index.html)
- [Frontend development instructions](https://developers.home-assistant.io/docs/frontend/development/)
## Development
- Initial setup: `script/setup`
- Development: [Instructions](https://developers.home-assistant.io/docs/en/frontend_development.html)
- Development: [Instructions](https://developers.home-assistant.io/docs/frontend/development/)
- Production build: `script/build_frontend`
- Gallery: `cd gallery && script/develop_gallery`
- Hass.io: [Instructions](https://developers.home-assistant.io/docs/en/hassio_hass.html)
@@ -19,15 +19,9 @@ This is the repository for the official [Home Assistant](https://home-assistant.
## Frontend development
### Classic environment
A complete guide can be found at the following [link](https://www.home-assistant.io/developers/frontend/). It describes a short guide for the build of project.
### Docker environment
It is possible to compile the project and/or run commands in the development environment having only the [Docker](https://www.docker.com) pre-installed in the system. On the root of project you can do:
* `sh ./script/docker_run.sh build` Build all the project with one command
* `sh ./script/docker_run.sh bash` Open an interactive shell (the same environment generated by the *classic environment*) where you can run commands. This bash work on your project directory and any change on your file is automatically present within your build bash.
**Note**: if you have installed `npm` in addition to the `docker`, you can use the commands `npm run docker_build` and `npm run bash` to get a full build or bash as explained above
## License
Home Assistant is open-source and Apache 2 licensed. Feel free to browse the repository, learn and reuse parts in your own projects.
+30
View File
@@ -0,0 +1,30 @@
# https://dev.azure.com/home-assistant
trigger: none
pr: none
schedules:
- cron: "0 0 * * *"
displayName: "build preview"
branches:
include:
- dev
always: true
variables:
- group: netlify
jobs:
- job: 'Netlify_preview'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
# Cast
curl -X POST -d {} https://api.netlify.com/build_hooks/${NETLIFY_CAST}
# Demo
curl -X POST -d {} https://api.netlify.com/build_hooks/${NETLIFY_DEMO}
# Gallery
curl -X POST -d {} https://api.netlify.com/build_hooks/${NETLIFY_GALLERY}
displayName: 'Trigger netlify build preview'
+6 -11
View File
@@ -8,7 +8,7 @@ trigger:
pr: none
variables:
- name: versionWheels
value: '1.3-3.7-alpine3.10'
value: '1.10.1-3.7-alpine3.11'
- name: versionNode
value: '12.1'
- group: twine
@@ -47,18 +47,13 @@ stages:
script/release
displayName: "Build and release package"
- stage: "Wheels"
jobs:
- template: templates/azp-job-wheels.yaml@azure
parameters:
builderVersion: '$(versionWheels)'
builderApk: 'build-base'
wheelsLocal: true
wheelsRequirement: 'requirement.txt'
preBuild:
- task: NodeTool@0
displayName: "Use Node $(versionNode)"
inputs:
versionSpec: "$(versionNode)"
- script: |
set -e
yarn install
script/build_frontend
sleep 240
echo "home-assistant-frontend==$(Build.SourceBranchName)" > requirement.txt
+70
View File
@@ -0,0 +1,70 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
branches:
include:
- dev
paths:
include:
- translations/en.json
pr: none
schedules:
- cron: "30 0 * * *"
displayName: "frontend translation update"
branches:
include:
- dev
always: true
variables:
- group: translation
resources:
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
jobs:
- job: 'Upload'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Use Node 12.x'
inputs:
versionSpec: '12.x'
- script: |
export LOKALISE_TOKEN="$(lokaliseToken)"
export AZURE_BRANCH="$(Build.SourceBranchName)"
./script/translations_upload_base
displayName: 'Upload Translation'
- job: 'Download'
dependsOn:
- 'Upload'
condition: or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Use Node 12.x'
inputs:
versionSpec: '12.x'
- template: templates/azp-step-git-init.yaml@azure
- script: |
export LOKALISE_TOKEN="$(lokaliseToken)"
export AZURE_BRANCH="$(Build.SourceBranchName)"
npm install
./script/translations_download
displayName: 'Download Translation'
- script: |
git checkout dev
git add translation
git commit -am "[ci skip] Translation update"
git push
displayName: 'Update translation'
-49
View File
@@ -1,49 +0,0 @@
module.exports.babelLoaderConfig = ({ latestBuild }) => {
if (latestBuild === undefined) {
throw Error("latestBuild not defined for babel loader config");
}
return {
test: /\.m?js$|\.tsx?$/,
use: {
loader: "babel-loader",
options: {
presets: [
!latestBuild && [
require("@babel/preset-env").default,
{ modules: false },
],
[
require("@babel/preset-typescript").default,
{
jsxPragma: "h",
},
],
].filter(Boolean),
plugins: [
// Part of ES2018. Converts {...a, b: 2} to Object.assign({}, a, {b: 2})
[
"@babel/plugin-proposal-object-rest-spread",
{ loose: true, useBuiltIns: true },
],
// Only support the syntax, Webpack will handle it.
"@babel/syntax-dynamic-import",
[
"@babel/transform-react-jsx",
{
pragma: "h",
},
],
"@babel/plugin-proposal-optional-chaining",
[
require("@babel/plugin-proposal-decorators").default,
{ decoratorsBeforeExport: true },
],
[
require("@babel/plugin-proposal-class-properties").default,
{ loose: true },
],
],
},
},
};
};
+196
View File
@@ -0,0 +1,196 @@
const path = require("path");
const env = require("./env.js");
const paths = require("./paths.js");
// Files from NPM Packages that should not be imported
module.exports.ignorePackages = ({ latestBuild }) => [
// Bloats bundle and it's not used.
path.resolve(require.resolve("moment"), "../locale"),
// Part of yaml.js and only used for !!js functions that we don't use
require.resolve("esprima"),
];
// Files from NPM packages that we should replace with empty file
module.exports.emptyPackages = ({ latestBuild }) =>
[
// Contains all color definitions for all material color sets.
// We don't use it
require.resolve("@polymer/paper-styles/color.js"),
require.resolve("@polymer/paper-styles/default-theme.js"),
// Loads stuff from a CDN
require.resolve("@polymer/font-roboto/roboto.js"),
require.resolve("@vaadin/vaadin-material-styles/font-roboto.js"),
// Compatibility not needed for latest builds
latestBuild &&
// wrapped in require.resolve so it blows up if file no longer exists
require.resolve(
path.resolve(paths.polymer_dir, "src/resources/compatibility.ts")
),
// This polyfill is loaded in workers to support ES5, filter it out.
latestBuild && require.resolve("proxy-polyfill/src/index.js"),
].filter(Boolean);
module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
__DEV__: !isProdBuild,
__BUILD__: JSON.stringify(latestBuild ? "latest" : "es5"),
__VERSION__: JSON.stringify(env.version()),
__DEMO__: false,
__BACKWARDS_COMPAT__: false,
__STATIC_PATH__: "/static/",
"process.env.NODE_ENV": JSON.stringify(
isProdBuild ? "production" : "development"
),
...defineOverlay,
});
module.exports.terserOptions = (latestBuild) => ({
safari10: true,
ecma: latestBuild ? undefined : 5,
output: { comments: false },
});
module.exports.babelOptions = ({ latestBuild }) => ({
babelrc: false,
presets: [
!latestBuild && [require("@babel/preset-env").default, { modules: false }],
require("@babel/preset-typescript").default,
].filter(Boolean),
plugins: [
// Part of ES2018. Converts {...a, b: 2} to Object.assign({}, a, {b: 2})
[
"@babel/plugin-proposal-object-rest-spread",
{ loose: true, useBuiltIns: true },
],
// Only support the syntax, Webpack will handle it.
"@babel/syntax-dynamic-import",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
[
require("@babel/plugin-proposal-decorators").default,
{ decoratorsBeforeExport: true },
],
[
require("@babel/plugin-proposal-class-properties").default,
{ loose: true },
],
],
});
// Are already ES5, cause warnings when babelified.
module.exports.babelExclude = () => [
require.resolve("@mdi/js/mdi.js"),
require.resolve("hls.js"),
];
const outputPath = (outputRoot, latestBuild) =>
path.resolve(outputRoot, latestBuild ? "frontend_latest" : "frontend_es5");
const publicPath = (latestBuild, root = "") =>
latestBuild ? `${root}/frontend_latest/` : `${root}/frontend_es5/`;
/*
BundleConfig {
// Object with entrypoints that need to be bundled
entry: { [name: string]: pathToFile },
// Folder where bundled files need to be written
outputPath: string,
// absolute url-path where bundled files can be found
publicPath: string,
// extra definitions that we need to replace in source
defineOverlay: {[name: string]: value },
// if this is a production build
isProdBuild: boolean,
// If we're targeting latest browsers
latestBuild: boolean,
// If we're doing a stats build (create nice chunk names)
isStatsBuild: boolean,
// Names of entrypoints that should not be hashed
dontHash: Set<string>
}
*/
module.exports.config = {
app({ isProdBuild, latestBuild, isStatsBuild }) {
return {
entry: {
service_worker: "./src/entrypoints/service_worker.ts",
app: "./src/entrypoints/app.ts",
authorize: "./src/entrypoints/authorize.ts",
onboarding: "./src/entrypoints/onboarding.ts",
core: "./src/entrypoints/core.ts",
"custom-panel": "./src/entrypoints/custom-panel.ts",
},
outputPath: outputPath(paths.app_output_root, latestBuild),
publicPath: publicPath(latestBuild),
isProdBuild,
latestBuild,
isStatsBuild,
};
},
demo({ isProdBuild, latestBuild, isStatsBuild }) {
return {
entry: {
main: path.resolve(paths.demo_dir, "src/entrypoint.ts"),
},
outputPath: outputPath(paths.demo_output_root, latestBuild),
publicPath: publicPath(latestBuild),
defineOverlay: {
__VERSION__: JSON.stringify(`DEMO-${env.version()}`),
__DEMO__: true,
},
isProdBuild,
latestBuild,
isStatsBuild,
};
},
cast({ isProdBuild, latestBuild }) {
const entry = {
launcher: path.resolve(paths.cast_dir, "src/launcher/entrypoint.ts"),
};
if (latestBuild) {
entry.receiver = path.resolve(
paths.cast_dir,
"src/receiver/entrypoint.ts"
);
}
return {
entry,
outputPath: outputPath(paths.cast_output_root, latestBuild),
publicPath: publicPath(latestBuild),
isProdBuild,
latestBuild,
defineOverlay: {
__BACKWARDS_COMPAT__: true,
},
};
},
hassio({ isProdBuild, latestBuild }) {
return {
entry: {
entrypoint: path.resolve(paths.hassio_dir, "src/entrypoint.ts"),
},
outputPath: outputPath(paths.hassio_output_root, latestBuild),
publicPath: publicPath(latestBuild, paths.hassio_publicPath),
isProdBuild,
latestBuild,
dontHash: new Set(["entrypoint"]),
};
},
gallery({ isProdBuild, latestBuild }) {
return {
entry: {
entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"),
},
outputPath: outputPath(paths.gallery_output_root, latestBuild),
publicPath: publicPath(latestBuild),
isProdBuild,
latestBuild,
};
},
};
+30 -4
View File
@@ -1,6 +1,32 @@
const fs = require("fs");
const path = require("path");
const paths = require("./paths.js");
module.exports = {
isProdBuild: process.env.NODE_ENV === "production",
isStatsBuild: process.env.STATS === "1",
isTravis: process.env.TRAVIS === "true",
isNetlify: process.env.NETLIFY === "true",
useRollup() {
return process.env.ROLLUP === "1";
},
isProdBuild() {
return (
process.env.NODE_ENV === "production" || module.exports.isStatsBuild()
);
},
isStatsBuild() {
return process.env.STATS === "1";
},
isTest() {
return process.env.IS_TEST === "true";
},
isNetlify() {
return process.env.NETLIFY === "true";
},
version() {
const version = fs
.readFileSync(path.resolve(paths.polymer_dir, "setup.py"), "utf8")
.match(/\d{8}\.\d+/);
if (!version) {
throw Error("Version not found");
}
return version[0];
},
};
+13 -12
View File
@@ -1,16 +1,17 @@
// Run HA develop mode
const gulp = require("gulp");
const envVars = require("../env");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gen-icons.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./compress.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
gulp.task(
"develop-app",
@@ -20,14 +21,14 @@ gulp.task(
},
"clean",
gulp.parallel(
"gen-service-worker-dev",
gulp.parallel("gen-icons-app", "gen-icons-mdi"),
"gen-service-worker-app-dev",
"gen-icons-json",
"gen-pages-dev",
"gen-index-app-dev",
gulp.series("create-test-translation", "build-translations")
"build-translations"
),
"copy-static",
"webpack-watch-app"
"copy-static-app",
env.useRollup() ? "rollup-watch-app" : "webpack-watch-app"
)
);
@@ -38,15 +39,15 @@ gulp.task(
process.env.NODE_ENV = "production";
},
"clean",
gulp.parallel("gen-icons-app", "gen-icons-mdi", "build-translations"),
"copy-static",
"webpack-prod-app",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-app",
env.useRollup() ? "rollup-prod-app" : "webpack-prod-app",
...// Don't compress running tests
(envVars.isTravis ? [] : ["compress-app"]),
(env.isTest() ? [] : ["compress-app"]),
gulp.parallel(
"gen-pages-prod",
"gen-index-app-prod",
"gen-service-worker-prod"
"gen-service-worker-app-prod"
)
)
);
+10 -10
View File
@@ -1,12 +1,14 @@
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gen-icons.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
gulp.task(
"develop-cast",
@@ -15,14 +17,11 @@ gulp.task(
process.env.NODE_ENV = "development";
},
"clean-cast",
gulp.parallel(
"gen-icons-app",
"gen-icons-mdi",
"gen-index-cast-dev",
"build-translations"
),
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-cast",
"webpack-dev-server-cast"
"gen-index-cast-dev",
env.useRollup() ? "rollup-dev-server-cast" : "webpack-dev-server-cast"
)
);
@@ -33,9 +32,10 @@ gulp.task(
process.env.NODE_ENV = "production";
},
"clean-cast",
gulp.parallel("gen-icons-app", "gen-icons-mdi", "build-translations"),
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-cast",
"webpack-prod-cast",
env.useRollup() ? "rollup-prod-cast" : "webpack-prod-cast",
"gen-index-cast-prod"
)
);
+8 -11
View File
@@ -1,39 +1,36 @@
const del = require("del");
const gulp = require("gulp");
const config = require("../paths");
const paths = require("../paths");
require("./translations");
gulp.task(
"clean",
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
return del([config.root, config.build_dir]);
return del([paths.app_output_root, paths.build_dir]);
})
);
gulp.task(
"clean-demo",
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
return del([config.demo_root, config.build_dir]);
return del([paths.demo_output_root, paths.build_dir]);
})
);
gulp.task(
"clean-cast",
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
return del([config.cast_root, config.build_dir]);
return del([paths.cast_output_root, paths.build_dir]);
})
);
gulp.task(
"clean-hassio",
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
return del([config.hassio_root, config.build_dir]);
})
);
gulp.task("clean-hassio", function cleanOutputAndBuildDir() {
return del([paths.hassio_output_root, paths.build_dir]);
});
gulp.task(
"clean-gallery",
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
return del([config.gallery_root, config.build_dir]);
return del([paths.gallery_output_root, paths.build_dir]);
})
);
+23 -16
View File
@@ -6,33 +6,40 @@ const merge = require("merge-stream");
const path = require("path");
const paths = require("../paths");
const zopfliOptions = { threshold: 150 };
gulp.task("compress-app", function compressApp() {
const jsLatest = gulp
.src(path.resolve(paths.output, "**/*.js"))
.pipe(zopfli())
.pipe(gulp.dest(paths.output));
.src(path.resolve(paths.app_output_latest, "**/*.js"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(paths.app_output_latest));
const jsEs5 = gulp
.src(path.resolve(paths.output_es5, "**/*.js"))
.pipe(zopfli())
.pipe(gulp.dest(paths.output_es5));
.src(path.resolve(paths.app_output_es5, "**/*.js"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(paths.app_output_es5));
const polyfills = gulp
.src(path.resolve(paths.static, "polyfills/*.js"))
.pipe(zopfli())
.pipe(gulp.dest(path.resolve(paths.static, "polyfills")));
.src(path.resolve(paths.app_output_static, "polyfills/*.js"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(path.resolve(paths.app_output_static, "polyfills")));
const translations = gulp
.src(path.resolve(paths.static, "translations/*.json"))
.pipe(zopfli())
.pipe(gulp.dest(path.resolve(paths.static, "translations")));
.src(path.resolve(paths.app_output_static, "translations/**/*.json"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(path.resolve(paths.app_output_static, "translations")));
return merge(jsLatest, jsEs5, polyfills, translations);
const icons = gulp
.src(path.resolve(paths.app_output_static, "mdi/*.json"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(path.resolve(paths.app_output_static, "mdi")));
return merge(jsLatest, jsEs5, polyfills, translations, icons);
});
gulp.task("compress-hassio", function compressApp() {
return gulp
.src(path.resolve(paths.hassio_root, "**/*.js"))
.pipe(zopfli())
.pipe(gulp.dest(paths.hassio_root));
.src(path.resolve(paths.hassio_output_root, "**/*.js"))
.pipe(zopfli(zopfliOptions))
.pipe(gulp.dest(paths.hassio_output_root));
});
+11 -16
View File
@@ -1,13 +1,16 @@
// Run demo develop mode
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gen-icons.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
gulp.task(
"develop-demo",
@@ -16,15 +19,10 @@ gulp.task(
process.env.NODE_ENV = "development";
},
"clean-demo",
gulp.parallel(
"gen-icons-app",
"gen-icons-mdi",
"gen-icons-demo",
"gen-index-demo-dev",
"build-translations"
),
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "gen-index-demo-dev", "build-translations"),
"copy-static-demo",
"webpack-dev-server-demo"
env.useRollup() ? "rollup-dev-server-demo" : "webpack-dev-server-demo"
)
);
@@ -35,14 +33,11 @@ gulp.task(
process.env.NODE_ENV = "production";
},
"clean-demo",
gulp.parallel(
"gen-icons-app",
"gen-icons-mdi",
"gen-icons-demo",
"build-translations"
),
// Cast needs to be backwards compatible and older HA has no translations
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-demo",
"webpack-prod-demo",
env.useRollup() ? "rollup-prod-demo" : "webpack-prod-demo",
"gen-index-demo-prod"
)
);
+30 -8
View File
@@ -1,9 +1,14 @@
const del = require("del");
const gulp = require("gulp");
const fs = require("fs");
const mapStream = require("map-stream");
const inDir = "translations";
const downloadDir = inDir + "/downloads";
const inDirFrontend = "translations/frontend";
const inDirBackend = "translations/backend";
const downloadDir = "translations/downloads";
const srcMeta = "src/translations/translationMetadata.json";
const encoding = "utf8";
const tasks = [];
@@ -12,7 +17,7 @@ function hasHtml(data) {
}
function recursiveCheckHasHtml(file, data, errors, recKey) {
Object.keys(data).forEach(function(key) {
Object.keys(data).forEach(function (key) {
if (typeof data[key] === "object") {
const nextRecKey = recKey ? `${recKey}.${key}` : key;
recursiveCheckHasHtml(file, data[key], errors, nextRecKey);
@@ -25,7 +30,7 @@ function recursiveCheckHasHtml(file, data, errors, recKey) {
function checkHtml() {
const errors = [];
return mapStream(function(file, cb) {
return mapStream(function (file, cb) {
const content = file.contents;
let error;
if (content) {
@@ -42,20 +47,36 @@ function checkHtml() {
}
let taskName = "clean-downloaded-translations";
gulp.task(taskName, function() {
gulp.task(taskName, function () {
return del([`${downloadDir}/**`]);
});
tasks.push(taskName);
taskName = "check-translations-html";
gulp.task(taskName, function() {
gulp.task(taskName, function () {
return gulp.src(`${downloadDir}/*.json`).pipe(checkHtml());
});
tasks.push(taskName);
taskName = "check-all-files-exist";
gulp.task(taskName, function () {
const file = fs.readFileSync(srcMeta, { encoding });
const meta = JSON.parse(file);
Object.keys(meta).forEach((lang) => {
if (!fs.existsSync(`${inDirFrontend}/${lang}.json`)) {
fs.writeFileSync(`${inDirFrontend}/${lang}.json`, JSON.stringify({}));
}
if (!fs.existsSync(`${inDirBackend}/${lang}.json`)) {
fs.writeFileSync(`${inDirBackend}/${lang}.json`, JSON.stringify({}));
}
});
return Promise.resolve();
});
tasks.push(taskName);
taskName = "move-downloaded-translations";
gulp.task(taskName, function() {
return gulp.src(`${downloadDir}/*.json`).pipe(gulp.dest(inDir));
gulp.task(taskName, function () {
return gulp.src(`${downloadDir}/*.json`).pipe(gulp.dest(inDirFrontend));
});
tasks.push(taskName);
@@ -65,6 +86,7 @@ gulp.task(
gulp.series(
"check-translations-html",
"move-downloaded-translations",
"check-all-files-exist",
"clean-downloaded-translations"
)
);
+71 -44
View File
@@ -6,31 +6,36 @@ const fs = require("fs-extra");
const path = require("path");
const template = require("lodash.template");
const minify = require("html-minifier").minify;
const config = require("../paths.js");
const paths = require("../paths.js");
const env = require("../env.js");
const templatePath = (tpl) =>
path.resolve(config.polymer_dir, "src/html/", `${tpl}.html.template`);
path.resolve(paths.polymer_dir, "src/html/", `${tpl}.html.template`);
const readFile = (pth) => fs.readFileSync(pth).toString();
const renderTemplate = (pth, data = {}, pathFunc = templatePath) => {
const compiled = template(readFile(pathFunc(pth)));
return compiled({ ...data, renderTemplate });
return compiled({
...data,
useRollup: env.useRollup(),
renderTemplate,
});
};
const renderDemoTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(config.demo_dir, "src/html/", `${tpl}.html.template`)
path.resolve(paths.demo_dir, "src/html/", `${tpl}.html.template`)
);
const renderCastTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(config.cast_dir, "src/html/", `${tpl}.html.template`)
path.resolve(paths.cast_dir, "src/html/", `${tpl}.html.template`)
);
const renderGalleryTemplate = (pth, data = {}) =>
renderTemplate(pth, data, (tpl) =>
path.resolve(config.gallery_dir, "src/html/", `${tpl}.html.template`)
path.resolve(paths.gallery_dir, "src/html/", `${tpl}.html.template`)
);
const minifyHtml = (content) =>
@@ -47,34 +52,37 @@ gulp.task("gen-pages-dev", (done) => {
for (const page of PAGES) {
const content = renderTemplate(page, {
latestPageJS: `/frontend_latest/${page}.js`,
latestHassIconsJS: "/frontend_latest/hass-icons.js",
es5Compatibility: "/frontend_es5/compatibility.js",
es5PageJS: `/frontend_es5/${page}.js`,
es5HassIconsJS: "/frontend_es5/hass-icons.js",
});
fs.outputFileSync(path.resolve(config.root, `${page}.html`), content);
fs.outputFileSync(
path.resolve(paths.app_output_root, `${page}.html`),
content
);
}
done();
});
gulp.task("gen-pages-prod", (done) => {
const latestManifest = require(path.resolve(config.output, "manifest.json"));
const es5Manifest = require(path.resolve(config.output_es5, "manifest.json"));
const latestManifest = require(path.resolve(
paths.app_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
for (const page of PAGES) {
const content = renderTemplate(page, {
latestPageJS: latestManifest[`${page}.js`],
latestHassIconsJS: latestManifest["hass-icons.js"],
es5Compatibility: es5Manifest["compatibility.js"],
es5PageJS: es5Manifest[`${page}.js`],
es5HassIconsJS: es5Manifest["hass-icons.js"],
});
fs.outputFileSync(
path.resolve(config.root, `${page}.html`),
path.resolve(paths.app_output_root, `${page}.html`),
minifyHtml(content)
);
}
@@ -88,37 +96,40 @@ gulp.task("gen-index-app-dev", (done) => {
latestAppJS: "/frontend_latest/app.js",
latestCoreJS: "/frontend_latest/core.js",
latestCustomPanelJS: "/frontend_latest/custom-panel.js",
latestHassIconsJS: "/frontend_latest/hass-icons.js",
es5Compatibility: "/frontend_es5/compatibility.js",
es5AppJS: "/frontend_es5/app.js",
es5CoreJS: "/frontend_es5/core.js",
es5CustomPanelJS: "/frontend_es5/custom-panel.js",
es5HassIconsJS: "/frontend_es5/hass-icons.js",
}).replace(/#THEMEC/g, "{{ theme_color }}");
fs.outputFileSync(path.resolve(config.root, "index.html"), content);
fs.outputFileSync(path.resolve(paths.app_output_root, "index.html"), content);
done();
});
gulp.task("gen-index-app-prod", (done) => {
const latestManifest = require(path.resolve(config.output, "manifest.json"));
const es5Manifest = require(path.resolve(config.output_es5, "manifest.json"));
const latestManifest = require(path.resolve(
paths.app_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
const content = renderTemplate("index", {
latestAppJS: latestManifest["app.js"],
latestCoreJS: latestManifest["core.js"],
latestCustomPanelJS: latestManifest["custom-panel.js"],
latestHassIconsJS: latestManifest["hass-icons.js"],
es5Compatibility: es5Manifest["compatibility.js"],
es5AppJS: es5Manifest["app.js"],
es5CoreJS: es5Manifest["core.js"],
es5CustomPanelJS: es5Manifest["custom-panel.js"],
es5HassIconsJS: es5Manifest["hass-icons.js"],
});
const minified = minifyHtml(content).replace(/#THEMEC/g, "{{ theme_color }}");
fs.outputFileSync(path.resolve(config.root, "index.html"), minified);
fs.outputFileSync(
path.resolve(paths.app_output_root, "index.html"),
minified
);
done();
});
@@ -127,7 +138,7 @@ gulp.task("gen-index-cast-dev", (done) => {
latestReceiverJS: "/frontend_latest/receiver.js",
});
fs.outputFileSync(
path.resolve(config.cast_root, "receiver.html"),
path.resolve(paths.cast_output_root, "receiver.html"),
contentReceiver
);
@@ -135,14 +146,17 @@ gulp.task("gen-index-cast-dev", (done) => {
latestLauncherJS: "/frontend_latest/launcher.js",
es5LauncherJS: "/frontend_es5/launcher.js",
});
fs.outputFileSync(path.resolve(config.cast_root, "faq.html"), contentFAQ);
fs.outputFileSync(
path.resolve(paths.cast_output_root, "faq.html"),
contentFAQ
);
const contentLauncher = renderCastTemplate("launcher", {
latestLauncherJS: "/frontend_latest/launcher.js",
es5LauncherJS: "/frontend_es5/launcher.js",
});
fs.outputFileSync(
path.resolve(config.cast_root, "index.html"),
path.resolve(paths.cast_output_root, "index.html"),
contentLauncher
);
done();
@@ -150,11 +164,11 @@ gulp.task("gen-index-cast-dev", (done) => {
gulp.task("gen-index-cast-prod", (done) => {
const latestManifest = require(path.resolve(
config.cast_output,
paths.cast_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
config.cast_output_es5,
paths.cast_output_es5,
"manifest.json"
));
@@ -162,7 +176,7 @@ gulp.task("gen-index-cast-prod", (done) => {
latestReceiverJS: latestManifest["receiver.js"],
});
fs.outputFileSync(
path.resolve(config.cast_root, "receiver.html"),
path.resolve(paths.cast_output_root, "receiver.html"),
contentReceiver
);
@@ -170,14 +184,17 @@ gulp.task("gen-index-cast-prod", (done) => {
latestLauncherJS: latestManifest["launcher.js"],
es5LauncherJS: es5Manifest["launcher.js"],
});
fs.outputFileSync(path.resolve(config.cast_root, "faq.html"), contentFAQ);
fs.outputFileSync(
path.resolve(paths.cast_output_root, "faq.html"),
contentFAQ
);
const contentLauncher = renderCastTemplate("launcher", {
latestLauncherJS: latestManifest["launcher.js"],
es5LauncherJS: es5Manifest["launcher.js"],
});
fs.outputFileSync(
path.resolve(config.cast_root, "index.html"),
path.resolve(paths.cast_output_root, "index.html"),
contentLauncher
);
done();
@@ -189,32 +206,36 @@ gulp.task("gen-index-demo-dev", (done) => {
const content = renderDemoTemplate("index", {
latestDemoJS: "/frontend_latest/main.js",
es5Compatibility: "/frontend_es5/compatibility.js",
es5DemoJS: "/frontend_es5/main.js",
});
fs.outputFileSync(path.resolve(config.demo_root, "index.html"), content);
fs.outputFileSync(
path.resolve(paths.demo_output_root, "index.html"),
content
);
done();
});
gulp.task("gen-index-demo-prod", (done) => {
const latestManifest = require(path.resolve(
config.demo_output,
paths.demo_output_latest,
"manifest.json"
));
const es5Manifest = require(path.resolve(
config.demo_output_es5,
paths.demo_output_es5,
"manifest.json"
));
const content = renderDemoTemplate("index", {
latestDemoJS: latestManifest["main.js"],
es5Compatibility: es5Manifest["compatibility.js"],
es5DemoJS: es5Manifest["main.js"],
});
const minified = minifyHtml(content);
fs.outputFileSync(path.resolve(config.demo_root, "index.html"), minified);
fs.outputFileSync(
path.resolve(paths.demo_output_root, "index.html"),
minified
);
done();
});
@@ -222,16 +243,19 @@ gulp.task("gen-index-gallery-dev", (done) => {
// In dev mode we don't mangle names, so we hardcode urls. That way we can
// run webpack as last in watch mode, which blocks output.
const content = renderGalleryTemplate("index", {
latestGalleryJS: "./entrypoint.js",
latestGalleryJS: "./frontend_latest/entrypoint.js",
});
fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), content);
fs.outputFileSync(
path.resolve(paths.gallery_output_root, "index.html"),
content
);
done();
});
gulp.task("gen-index-gallery-prod", (done) => {
const latestManifest = require(path.resolve(
config.gallery_output,
paths.gallery_output_latest,
"manifest.json"
));
const content = renderGalleryTemplate("index", {
@@ -239,6 +263,9 @@ gulp.task("gen-index-gallery-prod", (done) => {
});
const minified = minifyHtml(content);
fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), minified);
fs.outputFileSync(
path.resolve(paths.gallery_output_root, "index.html"),
minified
);
done();
});
+10 -5
View File
@@ -1,13 +1,16 @@
// Run demo develop mode
const gulp = require("gulp");
const env = require("../env");
require("./clean.js");
require("./translations.js");
require("./gen-icons.js");
require("./gen-icons-json.js");
require("./gather-static.js");
require("./webpack.js");
require("./service-worker.js");
require("./entry-html.js");
require("./rollup.js");
gulp.task(
"develop-gallery",
@@ -16,10 +19,11 @@ gulp.task(
process.env.NODE_ENV = "development";
},
"clean-gallery",
gulp.parallel("gen-icons-app", "gen-icons-app", "build-translations"),
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-gallery",
"gen-index-gallery-dev",
"webpack-dev-server-gallery"
env.useRollup() ? "rollup-dev-server-gallery" : "webpack-dev-server-gallery"
)
);
@@ -30,9 +34,10 @@ gulp.task(
process.env.NODE_ENV = "production";
},
"clean-gallery",
gulp.parallel("gen-icons-app", "gen-icons-mdi", "build-translations"),
"translations-enable-merge-backend",
gulp.parallel("gen-icons-json", "build-translations"),
"copy-static-gallery",
"webpack-prod-gallery",
env.useRollup() ? "rollup-prod-gallery" : "webpack-prod-gallery",
"gen-index-gallery-prod"
)
);
+55 -33
View File
@@ -26,14 +26,23 @@ function copyTranslations(staticDir) {
);
}
function copyMdiIcons(staticDir) {
const staticPath = genStaticPath(staticDir);
// MDI icons output
fs.copySync(polyPath("build/mdi"), staticPath("mdi"));
}
function copyPolyfills(staticDir) {
const staticPath = genStaticPath(staticDir);
// Web Component polyfills and adapters
// For custom panels using ES5 builds that don't use Babel 7+
copyFileDir(
npmPath("@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"),
staticPath("polyfills/")
);
// Web Component polyfills and adapters
copyFileDir(
npmPath("@webcomponents/webcomponentsjs/webcomponents-bundle.js"),
staticPath("polyfills/")
@@ -44,6 +53,12 @@ function copyPolyfills(staticDir) {
);
}
function copyLoaderJS(staticDir) {
const staticPath = genStaticPath(staticDir);
copyFileDir(npmPath("systemjs/dist/s.min.js"), staticPath("js"));
copyFileDir(npmPath("systemjs/dist/s.min.js.map"), staticPath("js"));
}
function copyFonts(staticDir) {
const staticPath = genStaticPath(staticDir);
// Local fonts
@@ -65,61 +80,68 @@ function copyMapPanel(staticDir) {
);
}
gulp.task("copy-static", (done) => {
const staticDir = paths.static;
const staticPath = genStaticPath(paths.static);
// Basic static files
fs.copySync(polyPath("public"), paths.root);
gulp.task("copy-translations-app", async () => {
const staticDir = paths.app_output_static;
copyTranslations(staticDir);
});
gulp.task("copy-static-app", async () => {
const staticDir = paths.app_output_static;
// Basic static files
fs.copySync(polyPath("public"), paths.app_output_root);
copyLoaderJS(staticDir);
copyPolyfills(staticDir);
copyFonts(staticDir);
copyTranslations(staticDir);
copyMdiIcons(staticDir);
// Panel assets
copyFileDir(
npmPath("react-big-calendar/lib/css/react-big-calendar.css"),
staticPath("panels/calendar/")
);
copyMapPanel(staticDir);
done();
});
gulp.task("copy-static-demo", (done) => {
gulp.task("copy-static-demo", async () => {
// Copy app static files
fs.copySync(
polyPath("public/static"),
path.resolve(paths.demo_root, "static")
path.resolve(paths.demo_output_root, "static")
);
// Copy demo static files
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_root);
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_output_root);
copyPolyfills(paths.demo_static);
copyMapPanel(paths.demo_static);
copyFonts(paths.demo_static);
copyTranslations(paths.demo_static);
done();
copyLoaderJS(paths.demo_output_static);
copyPolyfills(paths.demo_output_static);
copyMapPanel(paths.demo_output_static);
copyFonts(paths.demo_output_static);
copyTranslations(paths.demo_output_static);
copyMdiIcons(paths.demo_output_static);
});
gulp.task("copy-static-cast", (done) => {
gulp.task("copy-static-cast", async () => {
// Copy app static files
fs.copySync(polyPath("public/static"), paths.cast_static);
fs.copySync(polyPath("public/static"), paths.cast_output_static);
// Copy cast static files
fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_root);
fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_output_root);
copyMapPanel(paths.cast_static);
copyFonts(paths.cast_static);
copyTranslations(paths.cast_static);
done();
copyLoaderJS(paths.cast_output_static);
copyPolyfills(paths.cast_output_static);
copyMapPanel(paths.cast_output_static);
copyFonts(paths.cast_output_static);
copyTranslations(paths.cast_output_static);
copyMdiIcons(paths.cast_output_static);
});
gulp.task("copy-static-gallery", (done) => {
gulp.task("copy-static-gallery", async () => {
// Copy app static files
fs.copySync(polyPath("public/static"), paths.gallery_static);
fs.copySync(polyPath("public/static"), paths.gallery_output_static);
// Copy gallery static files
fs.copySync(path.resolve(paths.gallery_dir, "public"), paths.gallery_root);
fs.copySync(
path.resolve(paths.gallery_dir, "public"),
paths.gallery_output_root
);
copyMapPanel(paths.gallery_static);
copyFonts(paths.gallery_static);
copyTranslations(paths.gallery_static);
done();
copyMapPanel(paths.gallery_output_static);
copyFonts(paths.gallery_output_static);
copyTranslations(paths.gallery_output_static);
copyMdiIcons(paths.gallery_output_static);
});
+112
View File
@@ -0,0 +1,112 @@
const gulp = require("gulp");
const path = require("path");
const fs = require("fs");
const hash = require("object-hash");
const ICON_PACKAGE_PATH = path.resolve(
__dirname,
"../../node_modules/@mdi/svg/"
);
const META_PATH = path.resolve(ICON_PACKAGE_PATH, "meta.json");
const PACKAGE_PATH = path.resolve(ICON_PACKAGE_PATH, "package.json");
const ICON_PATH = path.resolve(ICON_PACKAGE_PATH, "svg");
const OUTPUT_DIR = path.resolve(__dirname, "../../build/mdi");
const encoding = "utf8";
const getMeta = () => {
const file = fs.readFileSync(META_PATH, { encoding });
const meta = JSON.parse(file);
return meta.map((icon) => {
const svg = fs.readFileSync(`${ICON_PATH}/${icon.name}.svg`, {
encoding,
});
return { path: svg.match(/ d="([^"]+)"/)[1], name: icon.name };
});
};
const splitBySize = (meta) => {
const chunks = [];
const CHUNK_SIZE = 50000;
let curSize = 0;
let startKey;
let icons = [];
Object.values(meta).forEach((icon) => {
if (startKey === undefined) {
startKey = icon.name;
}
curSize += icon.path.length;
icons.push(icon);
if (curSize > CHUNK_SIZE) {
chunks.push({
startKey,
endKey: icon.name,
icons,
});
curSize = 0;
startKey = undefined;
icons = [];
}
});
chunks.push({
startKey,
icons,
});
return chunks;
};
const findDifferentiator = (curString, prevString) => {
for (let i = 0; i < curString.length; i++) {
if (curString[i] !== prevString[i]) {
return curString.substring(0, i + 1);
}
}
throw new Error("Cannot find differentiator", curString, prevString);
};
gulp.task("gen-icons-json", (done) => {
const meta = getMeta();
const split = splitBySize(meta);
if (!fs.existsSync(OUTPUT_DIR)) {
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
}
const parts = [];
let lastEnd;
split.forEach((chunk) => {
let startKey;
if (lastEnd === undefined) {
chunk.startKey = undefined;
startKey = undefined;
} else {
startKey = findDifferentiator(chunk.startKey, lastEnd);
}
lastEnd = chunk.endKey;
const output = {};
chunk.icons.forEach((icon) => {
output[icon.name] = icon.path;
});
const filename = hash(output);
parts.push({ start: startKey, file: filename });
fs.writeFileSync(
path.resolve(OUTPUT_DIR, `${filename}.json`),
JSON.stringify(output)
);
});
const file = fs.readFileSync(PACKAGE_PATH, { encoding });
const package = JSON.parse(file);
fs.writeFileSync(
path.resolve(OUTPUT_DIR, "iconMetadata.json"),
JSON.stringify({ version: package.version, parts })
);
done();
});
-140
View File
@@ -1,140 +0,0 @@
const gulp = require("gulp");
const path = require("path");
const fs = require("fs");
const paths = require("../paths");
const ICON_PACKAGE_PATH = path.resolve(
__dirname,
"../../node_modules/@mdi/svg/"
);
const META_PATH = path.resolve(ICON_PACKAGE_PATH, "meta.json");
const ICON_PATH = path.resolve(ICON_PACKAGE_PATH, "svg");
const OUTPUT_DIR = path.resolve(__dirname, "../../build");
const MDI_OUTPUT_PATH = path.resolve(OUTPUT_DIR, "mdi.html");
const HASS_OUTPUT_PATH = path.resolve(OUTPUT_DIR, "hass-icons.html");
const BUILT_IN_PANEL_ICONS = [
"calendar", // Calendar
"settings", // Config
"home-assistant", // Hass.io
"poll-box", // History panel
"format-list-bulleted-type", // Logbook
"mailbox", // Mailbox
"tooltip-account", // Map
"cart", // Shopping List
"hammer", // developer-tools
];
// Given an icon name, load the SVG file
function loadIcon(name) {
const iconPath = path.resolve(ICON_PATH, `${name}.svg`);
try {
return fs.readFileSync(iconPath, "utf-8");
} catch (err) {
return null;
}
}
// Given an SVG file, convert it to an iron-iconset-svg definition
function transformXMLtoPolymer(name, xml) {
const start = xml.indexOf("><path") + 1;
const end = xml.length - start - 6;
const pth = xml.substr(start, end);
return `<g id="${name}">${pth}</g>`;
}
// Given an iconset name and icon names, generate a polymer iconset
function generateIconset(iconsetName, iconNames) {
const iconDefs = Array.from(iconNames)
.map((name) => {
const iconDef = loadIcon(name);
if (!iconDef) {
throw new Error(`Unknown icon referenced: ${name}`);
}
return transformXMLtoPolymer(name, iconDef);
})
.join("");
return `<ha-iconset-svg name="${iconsetName}" size="24"><svg><defs>${iconDefs}</defs></svg></ha-iconset-svg>`;
}
// Helper function to map recursively over files in a folder and it's subfolders
function mapFiles(startPath, filter, mapFunc) {
const files = fs.readdirSync(startPath);
for (let i = 0; i < files.length; i++) {
const filename = path.join(startPath, files[i]);
const stat = fs.lstatSync(filename);
if (stat.isDirectory()) {
mapFiles(filename, filter, mapFunc);
} else if (filename.indexOf(filter) >= 0) {
mapFunc(filename);
}
}
}
// Find all icons used by the project.
function findIcons(searchPath, iconsetName) {
const iconRegex = new RegExp(`${iconsetName}:[\\w-]+`, "g");
const icons = new Set();
function processFile(filename) {
const content = fs.readFileSync(filename);
let match;
// eslint-disable-next-line
while ((match = iconRegex.exec(content))) {
// strip off "hass:" and add to set
icons.add(match[0].substr(iconsetName.length + 1));
}
}
mapFiles(searchPath, ".js", processFile);
mapFiles(searchPath, ".ts", processFile);
return icons;
}
gulp.task("gen-icons-mdi", (done) => {
const meta = JSON.parse(
fs.readFileSync(path.resolve(ICON_PACKAGE_PATH, META_PATH), "UTF-8")
);
const iconNames = meta.map((iconInfo) => iconInfo.name);
if (!fs.existsSync(OUTPUT_DIR)) {
fs.mkdirSync(OUTPUT_DIR);
}
fs.writeFileSync(MDI_OUTPUT_PATH, generateIconset("mdi", iconNames));
done();
});
gulp.task("gen-icons-app", (done) => {
const iconNames = findIcons("./src", "hass");
BUILT_IN_PANEL_ICONS.forEach((name) => iconNames.add(name));
if (!fs.existsSync(OUTPUT_DIR)) {
fs.mkdirSync(OUTPUT_DIR);
}
fs.writeFileSync(HASS_OUTPUT_PATH, generateIconset("hass", iconNames));
done();
});
gulp.task("gen-icons-demo", (done) => {
const iconNames = findIcons(path.resolve(paths.demo_dir, "./src"), "hademo");
fs.writeFileSync(
path.resolve(paths.demo_dir, "hademo-icons.html"),
generateIconset("hademo", iconNames)
);
done();
});
gulp.task("gen-icons-hassio", (done) => {
const iconNames = findIcons(
path.resolve(paths.hassio_dir, "./src"),
"hassio"
);
// Find hassio icons inside HA main repo.
for (const item of findIcons(
path.resolve(paths.polymer_dir, "./src"),
"hassio"
)) {
iconNames.add(item);
}
fs.writeFileSync(
path.resolve(paths.hassio_dir, "hassio-icons.html"),
generateIconset("hassio", iconNames)
);
done();
});
+31 -7
View File
@@ -1,11 +1,33 @@
const gulp = require("gulp");
const fs = require("fs");
const path = require("path");
const envVars = require("../env");
const env = require("../env");
const paths = require("../paths");
require("./clean.js");
require("./gen-icons.js");
require("./gen-icons-json.js");
require("./webpack.js");
require("./compress.js");
require("./rollup.js");
async function writeEntrypointJS() {
// We ship two builds and we need to do feature detection on what version to load.
fs.mkdirSync(paths.hassio_output_root, { recursive: true });
fs.writeFileSync(
path.resolve(paths.hassio_output_root, "entrypoint.js"),
`
try {
new Function("import('${paths.hassio_publicPath}/frontend_latest/entrypoint.js')")();
} catch (err) {
var el = document.createElement('script');
el.src = '${paths.hassio_publicPath}/frontend_es5/entrypoint.js';
document.body.appendChild(el);
}
`,
{ encoding: "utf-8" }
);
}
gulp.task(
"develop-hassio",
@@ -14,8 +36,9 @@ gulp.task(
process.env.NODE_ENV = "development";
},
"clean-hassio",
gulp.parallel("gen-icons-hassio", "gen-icons-mdi"),
"webpack-watch-hassio"
"gen-icons-json",
writeEntrypointJS,
env.useRollup() ? "rollup-watch-hassio" : "webpack-watch-hassio"
)
);
@@ -26,9 +49,10 @@ gulp.task(
process.env.NODE_ENV = "production";
},
"clean-hassio",
gulp.parallel("gen-icons-hassio", "gen-icons-mdi"),
"webpack-prod-hassio",
"gen-icons-json",
env.useRollup() ? "rollup-prod-hassio" : "webpack-prod-hassio",
writeEntrypointJS,
...// Don't compress running tests
(envVars.isTravis ? [] : ["compress-hassio"])
(env.isTest() ? [] : ["compress-hassio"])
)
);
+146
View File
@@ -0,0 +1,146 @@
// Tasks to run Rollup
const path = require("path");
const gulp = require("gulp");
const rollup = require("rollup");
const handler = require("serve-handler");
const http = require("http");
const log = require("fancy-log");
const rollupConfig = require("../rollup");
const paths = require("../paths");
const open = require("open");
const bothBuilds = (createConfigFunc, params) =>
gulp.series(
async function buildLatest() {
await buildRollup(
createConfigFunc({
...params,
latestBuild: true,
})
);
},
async function buildES5() {
await buildRollup(
createConfigFunc({
...params,
latestBuild: false,
})
);
}
);
function createServer(serveOptions) {
const server = http.createServer((request, response) => {
return handler(request, response, {
public: serveOptions.root,
});
});
server.listen(
serveOptions.port,
serveOptions.networkAccess ? "0.0.0.0" : undefined,
() => {
log.info(`Available at http://localhost:${serveOptions.port}`);
open(`http://localhost:${serveOptions.port}`);
}
);
}
function watchRollup(createConfig, extraWatchSrc = [], serveOptions) {
const { inputOptions, outputOptions } = createConfig({
isProdBuild: false,
latestBuild: true,
});
const watcher = rollup.watch({
...inputOptions,
output: [outputOptions],
watch: {
include: ["src/**"] + extraWatchSrc,
},
});
let startedHttp = false;
watcher.on("event", (event) => {
if (event.code === "BUNDLE_END") {
log(`Build done @ ${new Date().toLocaleTimeString()}`);
} else if (event.code === "ERROR") {
log.error(event.error);
} else if (event.code === "END") {
if (startedHttp || !serveOptions) {
return;
}
startedHttp = true;
createServer(serveOptions);
}
});
gulp.watch(
path.join(paths.translations_src, "en.json"),
gulp.series("build-translations", "copy-translations-app")
);
}
async function buildRollup(config) {
const bundle = await rollup.rollup(config.inputOptions);
await bundle.write(config.outputOptions);
}
gulp.task("rollup-watch-app", () => {
watchRollup(rollupConfig.createAppConfig);
});
gulp.task("rollup-watch-hassio", () => {
watchRollup(rollupConfig.createHassioConfig, ["hassio/src/**"]);
});
gulp.task("rollup-dev-server-demo", () => {
watchRollup(rollupConfig.createDemoConfig, ["demo/src/**"], {
root: paths.demo_output_root,
port: 8090,
});
});
gulp.task("rollup-dev-server-cast", () => {
watchRollup(rollupConfig.createCastConfig, ["cast/src/**"], {
root: paths.cast_output_root,
port: 8080,
networkAccess: true,
});
});
gulp.task("rollup-dev-server-gallery", () => {
watchRollup(rollupConfig.createGalleryConfig, ["gallery/src/**"], {
root: paths.gallery_output_root,
port: 8100,
});
});
gulp.task(
"rollup-prod-app",
bothBuilds(rollupConfig.createAppConfig, { isProdBuild: true })
);
gulp.task(
"rollup-prod-demo",
bothBuilds(rollupConfig.createDemoConfig, { isProdBuild: true })
);
gulp.task(
"rollup-prod-cast",
bothBuilds(rollupConfig.createCastConfig, { isProdBuild: true })
);
gulp.task("rollup-prod-hassio", () =>
bothBuilds(rollupConfig.createHassioConfig, { isProdBuild: true })
);
gulp.task("rollup-prod-gallery", () =>
buildRollup(
rollupConfig.createGalleryConfig({
isProdBuild: true,
latestBuild: true,
})
)
);
+72 -9
View File
@@ -5,18 +5,22 @@
const gulp = require("gulp");
const path = require("path");
const fs = require("fs-extra");
const config = require("../paths.js");
const workboxBuild = require("workbox-build");
const sourceMapUrl = require("source-map-url");
const paths = require("../paths.js");
const swPath = path.resolve(config.root, "service_worker.js");
const swDest = path.resolve(paths.app_output_root, "service_worker.js");
const writeSW = (content) => fs.outputFileSync(swPath, content.trim() + "\n");
const writeSW = (content) => fs.outputFileSync(swDest, content.trim() + "\n");
gulp.task("gen-service-worker-dev", (done) => {
gulp.task("gen-service-worker-app-dev", (done) => {
writeSW(
`
console.debug('Service worker disabled in development');
self.addEventListener('install', (event) => {
// This will activate the dev service worker,
// removing any prod service worker the dev might have running
self.skipWaiting();
});
`
@@ -24,10 +28,69 @@ self.addEventListener('install', (event) => {
done();
});
gulp.task("gen-service-worker-prod", (done) => {
fs.copySync(
path.resolve(config.output, "service_worker.js"),
path.resolve(config.root, "service_worker.js")
gulp.task("gen-service-worker-app-prod", async () => {
// Read bundled source file
const bundleManifestLatest = require(path.resolve(
paths.app_output_latest,
"manifest.json"
));
let serviceWorkerContent = fs.readFileSync(
paths.app_output_root + bundleManifestLatest["service_worker.js"],
"utf-8"
);
done();
// Delete old file from frontend_latest so manifest won't pick it up
fs.removeSync(
paths.app_output_root + bundleManifestLatest["service_worker.js"]
);
fs.removeSync(
paths.app_output_root + bundleManifestLatest["service_worker.js.map"]
);
// Remove ES5
const bundleManifestES5 = require(path.resolve(
paths.app_output_es5,
"manifest.json"
));
fs.removeSync(paths.app_output_root + bundleManifestES5["service_worker.js"]);
fs.removeSync(
paths.app_output_root + bundleManifestES5["service_worker.js.map"]
);
const workboxManifest = await workboxBuild.getManifest({
// Files that mach this pattern will be considered unique and skip revision check
// ignore JS files + translation files
dontCacheBustURLsMatching: /(frontend_latest\/.+|static\/translations\/.+)/,
globDirectory: paths.app_output_root,
globPatterns: [
"frontend_latest/*.js",
// Cache all English translations because we catch them as fallback
// Using pattern to match hash instead of * to avoid caching en-GB
// 'v' added as valid hash letter because in dev we hash with 'dev'
"static/translations/**/en-+([a-fv0-9]).json",
// Icon shown on splash screen
"static/icons/favicon-192x192.png",
"static/icons/favicon.ico",
// Common fonts
"static/fonts/roboto/Roboto-Light.woff2",
"static/fonts/roboto/Roboto-Medium.woff2",
"static/fonts/roboto/Roboto-Regular.woff2",
"static/fonts/roboto/Roboto-Bold.woff2",
],
});
for (const warning of workboxManifest.warnings) {
console.warn(warning);
}
// remove source map and add WB manifest
serviceWorkerContent = sourceMapUrl.removeFrom(serviceWorkerContent);
serviceWorkerContent = serviceWorkerContent.replace(
"WB_MANIFEST",
JSON.stringify(workboxManifest.manifestEntries)
);
// Write new file to root
fs.writeFileSync(swDest, serviceWorkerContent);
});
+249 -248
View File
@@ -1,22 +1,33 @@
const crypto = require("crypto");
const del = require("del");
const path = require("path");
const source = require("vinyl-source-stream");
const vinylBuffer = require("vinyl-buffer");
const gulp = require("gulp");
const fs = require("fs");
const foreach = require("gulp-foreach");
const hash = require("gulp-hash");
const hashFilename = require("gulp-hash-filename");
const merge = require("gulp-merge-json");
const minify = require("gulp-jsonminify");
const rename = require("gulp-rename");
const transform = require("gulp-json-transform");
const { mapFiles } = require("../util");
const env = require("../env");
const paths = require("../paths");
const inDir = "translations";
const inFrontendDir = "translations/frontend";
const inBackendDir = "translations/backend";
const workDir = "build-translations";
const fullDir = workDir + "/full";
const coreDir = workDir + "/core";
const outDir = workDir + "/output";
let mergeBackend = false;
String.prototype.rsplit = function(sep, maxsplit) {
gulp.task("translations-enable-merge-backend", (done) => {
mergeBackend = true;
done();
});
String.prototype.rsplit = function (sep, maxsplit) {
var split = this.split(sep);
return maxsplit
? [split.slice(0, -maxsplit).join(sep)].concat(split.slice(-maxsplit))
@@ -39,11 +50,9 @@ const TRANSLATION_FRAGMENTS = [
"developer-tools",
];
const tasks = [];
function recursiveFlatten(prefix, data) {
let output = {};
Object.keys(data).forEach(function(key) {
Object.keys(data).forEach(function (key) {
if (typeof data[key] === "object") {
output = {
...output,
@@ -105,7 +114,12 @@ function lokaliseTransform(data, original, file) {
output[key] = lokaliseTransform(value, original, file);
} else {
output[key] = value.replace(re_key_reference, (match, key) => {
const replace = key.split("::").reduce((tr, k) => tr[k], original);
const replace = key.split("::").reduce((tr, k) => {
if (!tr) {
throw Error(`Invalid key placeholder ${key} in ${file.path}`);
}
return tr[k];
}, original);
if (typeof replace !== "string") {
throw Error(`Invalid key placeholder ${key} in ${file.path}`);
}
@@ -116,11 +130,9 @@ function lokaliseTransform(data, original, file) {
return output;
}
let taskName = "clean-translations";
gulp.task(taskName, function() {
return del([`${outDir}/**/*.json`]);
gulp.task("clean-translations", function () {
return del([workDir]);
});
tasks.push(taskName);
gulp.task("ensure-translations-build-dir", (done) => {
if (!fs.existsSync(workDir)) {
@@ -129,31 +141,25 @@ gulp.task("ensure-translations-build-dir", (done) => {
done();
});
taskName = "create-test-metadata";
gulp.task(
taskName,
gulp.series("ensure-translations-build-dir", function writeTestMetaData(cb) {
fs.writeFile(
workDir + "/testMetadata.json",
JSON.stringify({
test: {
nativeName: "Test",
},
}),
cb
);
})
);
tasks.push(taskName);
gulp.task("create-test-metadata", function (cb) {
fs.writeFile(
workDir + "/testMetadata.json",
JSON.stringify({
test: {
nativeName: "Test",
},
}),
cb
);
});
taskName = "create-test-translation";
gulp.task(
taskName,
gulp.series("create-test-metadata", function() {
"create-test-translation",
gulp.series("create-test-metadata", function createTestTranslation() {
return gulp
.src("src/translations/en.json")
.src(path.join(paths.translations_src, "en.json"))
.pipe(
transform(function(data, file) {
transform(function (data, file) {
return recursiveEmpty(data);
})
)
@@ -161,7 +167,6 @@ gulp.task(
.pipe(gulp.dest(workDir));
})
);
tasks.push(taskName);
/**
* This task will build a master translation file, to be used as the base for
@@ -172,235 +177,231 @@ tasks.push(taskName);
* project is buildable immediately after merging new translation keys, since
* the Lokalise update to translations/en.json will not happen immediately.
*/
taskName = "build-master-translation";
gulp.task(
taskName,
gulp.series("clean-translations", function() {
return gulp
.src("src/translations/en.json")
.pipe(
transform(function(data, file) {
return lokaliseTransform(data, data, file);
})
)
.pipe(rename("translationMaster.json"))
.pipe(gulp.dest(workDir));
})
);
tasks.push(taskName);
gulp.task("build-master-translation", function () {
const src = [path.join(paths.translations_src, "en.json")];
taskName = "build-merged-translations";
gulp.task(
taskName,
gulp.series("build-master-translation", function() {
return gulp
.src([inDir + "/*.json", workDir + "/test.json"], { allowEmpty: true })
.pipe(
transform(function(data, file) {
return lokaliseTransform(data, data, file);
})
)
.pipe(
foreach(function(stream, file) {
// For each language generate a merged json file. It begins with the master
// translation as a failsafe for untranslated strings, and merges all parent
// tags into one file for each specific subtag
//
// TODO: This is a naive interpretation of BCP47 that should be improved.
// Will be OK for now as long as we don't have anything more complicated
// than a base translation + region.
const tr = path.basename(file.history[0], ".json");
const subtags = tr.split("-");
const src = [workDir + "/translationMaster.json"];
for (let i = 1; i <= subtags.length; i++) {
const lang = subtags.slice(0, i).join("-");
if (lang === "test") {
src.push(workDir + "/test.json");
} else if (lang !== "en") {
src.push(inDir + "/" + lang + ".json");
if (mergeBackend) {
src.push(path.join(inBackendDir, "en.json"));
}
return gulp
.src(src)
.pipe(
transform(function (data, file) {
return lokaliseTransform(data, data, file);
})
)
.pipe(
merge({
fileName: "translationMaster.json",
})
)
.pipe(gulp.dest(workDir));
});
gulp.task("build-merged-translations", function () {
return gulp
.src([inFrontendDir + "/*.json", workDir + "/test.json"], {
allowEmpty: true,
})
.pipe(
transform(function (data, file) {
return lokaliseTransform(data, data, file);
})
)
.pipe(
foreach(function (stream, file) {
// For each language generate a merged json file. It begins with the master
// translation as a failsafe for untranslated strings, and merges all parent
// tags into one file for each specific subtag
//
// TODO: This is a naive interpretation of BCP47 that should be improved.
// Will be OK for now as long as we don't have anything more complicated
// than a base translation + region.
const tr = path.basename(file.history[0], ".json");
const subtags = tr.split("-");
const src = [workDir + "/translationMaster.json"];
for (let i = 1; i <= subtags.length; i++) {
const lang = subtags.slice(0, i).join("-");
if (lang === "test") {
src.push(workDir + "/test.json");
} else if (lang !== "en") {
src.push(inFrontendDir + "/" + lang + ".json");
if (mergeBackend) {
src.push(inBackendDir + "/" + lang + ".json");
}
}
return gulp
.src(src, { allowEmpty: true })
.pipe(transform((data) => emptyFilter(data)))
.pipe(
merge({
fileName: tr + ".json",
})
)
.pipe(gulp.dest(fullDir));
})
);
})
);
tasks.push(taskName);
}
return gulp
.src(src, { allowEmpty: true })
.pipe(transform((data) => emptyFilter(data)))
.pipe(
merge({
fileName: tr + ".json",
})
)
.pipe(gulp.dest(fullDir));
})
);
});
var taskName;
const splitTasks = [];
TRANSLATION_FRAGMENTS.forEach((fragment) => {
taskName = "build-translation-fragment-" + fragment;
gulp.task(
taskName,
gulp.series("build-merged-translations", function() {
// Return only the translations for this fragment.
return gulp
.src(fullDir + "/*.json")
.pipe(
transform((data) => ({
ui: {
panel: {
[fragment]: data.ui.panel[fragment],
},
gulp.task(taskName, function () {
// Return only the translations for this fragment.
return gulp
.src(fullDir + "/*.json")
.pipe(
transform((data) => ({
ui: {
panel: {
[fragment]: data.ui.panel[fragment],
},
}))
)
.pipe(gulp.dest(workDir + "/" + fragment));
})
);
tasks.push(taskName);
},
}))
)
.pipe(gulp.dest(workDir + "/" + fragment));
});
splitTasks.push(taskName);
});
taskName = "build-translation-core";
gulp.task(
taskName,
gulp.series("build-merged-translations", function() {
// Remove the fragment translations from the core translation.
return gulp
.src(fullDir + "/*.json")
.pipe(
transform((data) => {
TRANSLATION_FRAGMENTS.forEach((fragment) => {
delete data.ui.panel[fragment];
});
return data;
})
)
.pipe(gulp.dest(coreDir));
})
);
tasks.push(taskName);
gulp.task(taskName, function () {
// Remove the fragment translations from the core translation.
return gulp
.src(fullDir + "/*.json")
.pipe(
transform((data, file) => {
TRANSLATION_FRAGMENTS.forEach((fragment) => {
delete data.ui.panel[fragment];
});
return data;
})
)
.pipe(gulp.dest(coreDir));
});
splitTasks.push(taskName);
taskName = "build-flattened-translations";
gulp.task(
taskName,
gulp.series(...splitTasks, function() {
// Flatten the split versions of our translations, and move them into outDir
return gulp
.src(
TRANSLATION_FRAGMENTS.map(
(fragment) => workDir + "/" + fragment + "/*.json"
).concat(coreDir + "/*.json"),
{ base: workDir }
)
.pipe(
transform(function(data) {
// Polymer.AppLocalizeBehavior requires flattened json
return flatten(data);
})
)
.pipe(minify())
.pipe(hashFilename())
.pipe(
rename((filePath) => {
if (filePath.dirname === "core") {
filePath.dirname = "";
}
})
)
.pipe(gulp.dest(outDir));
})
);
tasks.push(taskName);
gulp.task("build-flattened-translations", function () {
// Flatten the split versions of our translations, and move them into outDir
return gulp
.src(
TRANSLATION_FRAGMENTS.map(
(fragment) => workDir + "/" + fragment + "/*.json"
).concat(coreDir + "/*.json"),
{ base: workDir }
)
.pipe(
transform(function (data) {
// Polymer.AppLocalizeBehavior requires flattened json
return flatten(data);
})
)
.pipe(minify())
.pipe(
rename((filePath) => {
if (filePath.dirname === "core") {
filePath.dirname = "";
}
})
)
.pipe(gulp.dest(outDir));
});
taskName = "build-translation-fingerprints";
gulp.task(
taskName,
gulp.series("build-flattened-translations", function() {
return gulp
.src(outDir + "/**/*.json")
.pipe(
rename({
extname: "",
})
)
.pipe(
hash({
algorithm: "md5",
hashLength: 32,
template: "<%= name %>.json",
})
)
.pipe(hash.manifest("translationFingerprints.json"))
.pipe(
transform(function(data) {
// After generating fingerprints of our translation files, consolidate
// all translation fragment fingerprints under the translation name key
const newData = {};
Object.entries(data).forEach(([key, value]) => {
const [path, _md5] = key.rsplit("-", 1);
// let translation = key;
let translation = path;
const parts = translation.split("/");
if (parts.length === 2) {
translation = parts[1];
}
if (!(translation in newData)) {
newData[translation] = {
fingerprints: {},
};
}
newData[translation].fingerprints[path] = value;
});
return newData;
})
)
.pipe(gulp.dest(workDir));
})
);
tasks.push(taskName);
const fingerprints = {};
taskName = "build-translations";
gulp.task(
taskName,
gulp.series("build-translation-fingerprints", function() {
return gulp
.src(
[
"src/translations/translationMetadata.json",
workDir + "/testMetadata.json",
workDir + "/translationFingerprints.json",
],
{ allowEmpty: true }
)
.pipe(merge({}))
.pipe(
transform(function(data) {
const newData = {};
Object.entries(data).forEach(([key, value]) => {
// Filter out translations without native name.
if (data[key].nativeName) {
newData[key] = data[key];
} else {
console.warn(
`Skipping language ${key}. Native name was not translated.`
);
}
if (data[key]) newData[key] = value;
});
return newData;
})
)
.pipe(
transform((data) => ({
fragments: TRANSLATION_FRAGMENTS,
translations: data,
}))
)
.pipe(rename("translationMetadata.json"))
.pipe(gulp.dest(workDir));
})
);
tasks.push(taskName);
"build-translation-fingerprints",
function fingerprintTranslationFiles() {
// Fingerprint full file of each language
const files = fs.readdirSync(fullDir);
module.exports = tasks;
for (let i = 0; i < files.length; i++) {
fingerprints[files[i].split(".")[0]] = {
// In dev we create fake hashes
hash: env.isProdBuild()
? crypto
.createHash("md5")
.update(fs.readFileSync(path.join(fullDir, files[i]), "utf-8"))
.digest("hex")
: "dev",
};
}
mapFiles(outDir, ".json", (filename) => {
const parsed = path.parse(filename);
// nl.json -> nl-<hash>.json
if (!(parsed.name in fingerprints)) {
throw new Error(`Unable to find hash for ${filename}`);
}
fs.renameSync(
filename,
`${parsed.dir}/${parsed.name}-${fingerprints[parsed.name].hash}${
parsed.ext
}`
);
});
const stream = source("translationFingerprints.json");
stream.write(JSON.stringify(fingerprints));
process.nextTick(() => stream.end());
return stream.pipe(vinylBuffer()).pipe(gulp.dest(workDir));
}
);
gulp.task(
"build-translations",
gulp.series(
"clean-translations",
"ensure-translations-build-dir",
env.isProdBuild() ? (done) => done() : "create-test-translation",
"build-master-translation",
"build-merged-translations",
gulp.parallel(...splitTasks),
"build-flattened-translations",
"build-translation-fingerprints",
function writeMetadata() {
return gulp
.src(
[
path.join(paths.translations_src, "translationMetadata.json"),
workDir + "/testMetadata.json",
workDir + "/translationFingerprints.json",
],
{ allowEmpty: true }
)
.pipe(merge({}))
.pipe(
transform(function (data) {
const newData = {};
Object.entries(data).forEach(([key, value]) => {
// Filter out translations without native name.
if (data[key].nativeName) {
newData[key] = data[key];
} else {
console.warn(
`Skipping language ${key}. Native name was not translated.`
);
}
if (data[key]) newData[key] = value;
});
return newData;
})
)
.pipe(
transform((data) => ({
fragments: TRANSLATION_FRAGMENTS,
translations: data,
}))
)
.pipe(rename("translationMetadata.json"))
.pipe(gulp.dest(workDir));
}
)
);
+18 -15
View File
@@ -3,6 +3,7 @@ const gulp = require("gulp");
const webpack = require("webpack");
const WebpackDevServer = require("webpack-dev-server");
const log = require("fancy-log");
const path = require("path");
const paths = require("../paths");
const {
createAppConfig,
@@ -27,7 +28,7 @@ const runDevServer = ({
open: true,
watchContentBase: true,
contentBase,
}).listen(port, listenHost, function(err) {
}).listen(port, listenHost, function (err) {
if (err) {
throw err;
}
@@ -37,9 +38,9 @@ const runDevServer = ({
const handler = (done) => (err, stats) => {
if (err) {
console.log(err.stack || err);
log.error(err.stack || err);
if (err.details) {
console.log(err.details);
log.error(err.details);
}
return;
}
@@ -47,7 +48,7 @@ const handler = (done) => (err, stats) => {
log(`Build done @ ${new Date().toLocaleTimeString()}`);
if (stats.hasErrors() || stats.hasWarnings()) {
console.log(stats.toString("minimal"));
log.warn(stats.toString("minimal"));
}
if (done) {
@@ -57,10 +58,14 @@ const handler = (done) => (err, stats) => {
gulp.task("webpack-watch-app", () => {
// we are not calling done, so this command will run forever
webpack(bothBuilds(createAppConfig, { isProdBuild: false })).watch(
{},
webpack(createAppConfig({ isProdBuild: false, latestBuild: true })).watch(
{ ignored: /build-translations/ },
handler()
);
gulp.watch(
path.join(paths.translations_src, "en.json"),
gulp.series("build-translations", "copy-translations-app")
);
});
gulp.task(
@@ -77,7 +82,7 @@ gulp.task(
gulp.task("webpack-dev-server-demo", () => {
runDevServer({
compiler: webpack(bothBuilds(createDemoConfig, { isProdBuild: false })),
contentBase: paths.demo_root,
contentBase: paths.demo_output_root,
port: 8090,
});
});
@@ -98,7 +103,7 @@ gulp.task(
gulp.task("webpack-dev-server-cast", () => {
runDevServer({
compiler: webpack(bothBuilds(createCastConfig, { isProdBuild: false })),
contentBase: paths.cast_root,
contentBase: paths.cast_output_root,
port: 8080,
// Accessible from the network, because that's how Cast hits it.
listenHost: "0.0.0.0",
@@ -124,7 +129,7 @@ gulp.task("webpack-watch-hassio", () => {
webpack(
createHassioConfig({
isProdBuild: false,
latestBuild: false,
latestBuild: true,
})
).watch({}, handler());
});
@@ -134,9 +139,8 @@ gulp.task(
() =>
new Promise((resolve) =>
webpack(
createHassioConfig({
bothBuilds(createHassioConfig, {
isProdBuild: true,
latestBuild: false,
}),
handler(resolve)
)
@@ -145,10 +149,9 @@ gulp.task(
gulp.task("webpack-dev-server-gallery", () => {
runDevServer({
compiler: webpack(
createGalleryConfig({ latestBuild: true, isProdBuild: false })
),
contentBase: paths.gallery_root,
// We don't use the es5 build, but the dev server will fuck up the publicPath if we don't
compiler: webpack(bothBuilds(createGalleryConfig, { isProdBuild: false })),
contentBase: paths.gallery_output_root,
port: 8100,
});
});
+23 -15
View File
@@ -4,29 +4,37 @@ module.exports = {
polymer_dir: path.resolve(__dirname, ".."),
build_dir: path.resolve(__dirname, "../build"),
root: path.resolve(__dirname, "../hass_frontend"),
static: path.resolve(__dirname, "../hass_frontend/static"),
output: path.resolve(__dirname, "../hass_frontend/frontend_latest"),
output_es5: path.resolve(__dirname, "../hass_frontend/frontend_es5"),
app_output_root: path.resolve(__dirname, "../hass_frontend"),
app_output_static: path.resolve(__dirname, "../hass_frontend/static"),
app_output_latest: path.resolve(
__dirname,
"../hass_frontend/frontend_latest"
),
app_output_es5: path.resolve(__dirname, "../hass_frontend/frontend_es5"),
demo_dir: path.resolve(__dirname, "../demo"),
demo_root: path.resolve(__dirname, "../demo/dist"),
demo_static: path.resolve(__dirname, "../demo/dist/static"),
demo_output: path.resolve(__dirname, "../demo/dist/frontend_latest"),
demo_output_root: path.resolve(__dirname, "../demo/dist"),
demo_output_static: path.resolve(__dirname, "../demo/dist/static"),
demo_output_latest: path.resolve(__dirname, "../demo/dist/frontend_latest"),
demo_output_es5: path.resolve(__dirname, "../demo/dist/frontend_es5"),
cast_dir: path.resolve(__dirname, "../cast"),
cast_root: path.resolve(__dirname, "../cast/dist"),
cast_static: path.resolve(__dirname, "../cast/dist/static"),
cast_output: path.resolve(__dirname, "../cast/dist/frontend_latest"),
cast_output_root: path.resolve(__dirname, "../cast/dist"),
cast_output_static: path.resolve(__dirname, "../cast/dist/static"),
cast_output_latest: path.resolve(__dirname, "../cast/dist/frontend_latest"),
cast_output_es5: path.resolve(__dirname, "../cast/dist/frontend_es5"),
gallery_dir: path.resolve(__dirname, "../gallery"),
gallery_root: path.resolve(__dirname, "../gallery/dist"),
gallery_output: path.resolve(__dirname, "../gallery/dist/frontend_latest"),
gallery_static: path.resolve(__dirname, "../gallery/dist/static"),
gallery_output_root: path.resolve(__dirname, "../gallery/dist"),
gallery_output_latest: path.resolve(
__dirname,
"../gallery/dist/frontend_latest"
),
gallery_output_static: path.resolve(__dirname, "../gallery/dist/static"),
hassio_dir: path.resolve(__dirname, "../hassio"),
hassio_root: path.resolve(__dirname, "../hassio/build"),
hassio_publicPath: "/api/hassio/app/",
hassio_output_root: path.resolve(__dirname, "../hassio/build"),
hassio_publicPath: "/api/hassio/app",
translations_src: path.resolve(__dirname, "../src/translations"),
};
@@ -0,0 +1,14 @@
module.exports = function (opts = {}) {
const dontHash = opts.dontHash || new Set();
return {
name: "dont-hash",
renderChunk(_code, chunk, _options) {
if (!chunk.isEntry || !dontHash.has(chunk.name)) {
return null;
}
chunk.fileName = `${chunk.name}.js`;
return null;
},
};
};
@@ -0,0 +1,26 @@
const path = require("path");
module.exports = function (userOptions = {}) {
// Files need to be absolute paths.
// This only works if the file has no exports
// and only is imported for its side effects
const files = userOptions.files || [];
if (files.length === 0) {
return {
name: "ignore",
};
}
return {
name: "ignore",
load(id) {
return files.some((toIgnorePath) => id.startsWith(toIgnorePath))
? {
code: "",
}
: null;
},
};
};
@@ -0,0 +1,34 @@
const url = require("url");
const defaultOptions = {
publicPath: "",
};
module.exports = function (userOptions = {}) {
const options = { ...defaultOptions, ...userOptions };
return {
name: "manifest",
generateBundle(outputOptions, bundle) {
const manifest = {};
for (const chunk of Object.values(bundle)) {
if (!chunk.isEntry) {
continue;
}
// Add js extension to mimic Webpack manifest.
manifest[`${chunk.name}.js`] = url.resolve(
options.publicPath,
chunk.fileName
);
}
this.emitFile({
type: "asset",
source: JSON.stringify(manifest, undefined, 2),
name: "manifest.json",
fileName: "manifest.json",
});
},
};
};
@@ -0,0 +1,149 @@
// Worker plugin
// Each worker will include all of its dependencies
// instead of relying on an importer.
// Forked from v.1.4.1
// https://github.com/surma/rollup-plugin-off-main-thread
/**
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const rollup = require("rollup");
const path = require("path");
const MagicString = require("magic-string");
const defaultOpts = {
// A RegExp to find `new Workers()` calls. The second capture group _must_
// capture the provided file name without the quotes.
workerRegexp: /new Worker\((["'])(.+?)\1(,[^)]+)?\)/g,
plugins: ["node-resolve", "commonjs", "babel", "terser", "ignore"],
};
async function getBundledWorker(workerPath, rollupOptions) {
const bundle = await rollup.rollup({
...rollupOptions,
input: {
worker: workerPath,
},
});
const { output } = await bundle.generate({
// Generates cleanest output, we shouldn't have any imports/exports
// that would be incompatible with ES5.
format: "es",
// We should not export anything. This will fail build if we are.
exports: "none",
});
let code;
for (const chunkOrAsset of output) {
if (chunkOrAsset.name === "worker") {
code = chunkOrAsset.code;
} else if (chunkOrAsset.type !== "asset") {
throw new Error("Unexpected extra output");
}
}
return code;
}
module.exports = function (opts = {}) {
opts = { ...defaultOpts, ...opts };
let rollupOptions;
let refIds;
return {
name: "hass-worker",
async buildStart(options) {
refIds = {};
rollupOptions = {
plugins: options.plugins.filter((plugin) =>
opts.plugins.includes(plugin.name)
),
};
},
async transform(code, id) {
// Copy the regexp as they are stateful and this hook is async.
const workerRegexp = new RegExp(
opts.workerRegexp.source,
opts.workerRegexp.flags
);
if (!workerRegexp.test(code)) {
return;
}
const ms = new MagicString(code);
// Reset the regexp
workerRegexp.lastIndex = 0;
while (true) {
const match = workerRegexp.exec(code);
if (!match) {
break;
}
const workerFile = match[2];
let optionsObject = {};
// Parse the optional options object
if (match[3] && match[3].length > 0) {
// FIXME: ooooof!
optionsObject = new Function(`return ${match[3].slice(1)};`)();
}
delete optionsObject.type;
if (!new RegExp("^.*/").test(workerFile)) {
this.warn(
`Paths passed to the Worker constructor must be relative or absolute, i.e. start with /, ./ or ../ (just like dynamic import!). Ignoring "${workerFile}".`
);
continue;
}
// Find worker file and store it as a chunk with ID prefixed for our loader
const resolvedWorkerFile = (await this.resolve(workerFile, id)).id;
let chunkRefId;
if (resolvedWorkerFile in refIds) {
chunkRefId = refIds[resolvedWorkerFile];
} else {
this.addWatchFile(resolvedWorkerFile);
const source = await getBundledWorker(
resolvedWorkerFile,
rollupOptions
);
chunkRefId = refIds[resolvedWorkerFile] = this.emitFile({
name: path.basename(resolvedWorkerFile),
source,
type: "asset",
});
}
const workerParametersStartIndex = match.index + "new Worker(".length;
const workerParametersEndIndex =
match.index + match[0].length - ")".length;
ms.overwrite(
workerParametersStartIndex,
workerParametersEndIndex,
`import.meta.ROLLUP_FILE_URL_${chunkRefId}, ${JSON.stringify(
optionsObject
)}`
);
}
return {
code: ms.toString(),
map: ms.generateMap({ hires: true }),
};
},
};
};
+151
View File
@@ -0,0 +1,151 @@
const path = require("path");
const commonjs = require("@rollup/plugin-commonjs");
const resolve = require("@rollup/plugin-node-resolve");
const json = require("@rollup/plugin-json");
const babel = require("rollup-plugin-babel");
const replace = require("@rollup/plugin-replace");
const visualizer = require("rollup-plugin-visualizer");
const { string } = require("rollup-plugin-string");
const { terser } = require("rollup-plugin-terser");
const manifest = require("./rollup-plugins/manifest-plugin");
const worker = require("./rollup-plugins/worker-plugin");
const dontHashPlugin = require("./rollup-plugins/dont-hash-plugin");
const ignore = require("./rollup-plugins/ignore-plugin");
const bundle = require("./bundle");
const paths = require("./paths");
const extensions = [".js", ".ts"];
/**
* @param {Object} arg
* @param { import("rollup").InputOption } arg.input
*/
const createRollupConfig = ({
entry,
outputPath,
defineOverlay,
isProdBuild,
latestBuild,
isStatsBuild,
publicPath,
dontHash,
}) => {
return {
/**
* @type { import("rollup").InputOptions }
*/
inputOptions: {
input: entry,
// Some entry points contain no JavaScript. This setting silences a warning about that.
// https://rollupjs.org/guide/en/#preserveentrysignatures
preserveEntrySignatures: false,
plugins: [
ignore({
files: bundle.emptyPackages({ latestBuild }),
}),
resolve({
extensions,
preferBuiltins: false,
browser: true,
rootDir: paths.polymer_dir,
}),
commonjs({
namedExports: {
"js-yaml": ["safeDump", "safeLoad"],
},
}),
json(),
babel({
...bundle.babelOptions({ latestBuild }),
extensions,
exclude: bundle.babelExclude(),
}),
string({
// Import certain extensions as strings
include: [path.join(paths.polymer_dir, "node_modules/**/*.css")],
}),
replace(
bundle.definedVars({ isProdBuild, latestBuild, defineOverlay })
),
manifest({
publicPath,
}),
worker(),
dontHashPlugin({ dontHash }),
isProdBuild && terser(bundle.terserOptions(latestBuild)),
isStatsBuild &&
visualizer({
// https://github.com/btd/rollup-plugin-visualizer#options
open: true,
sourcemap: true,
}),
],
},
/**
* @type { import("rollup").OutputOptions }
*/
outputOptions: {
// https://rollupjs.org/guide/en/#outputdir
dir: outputPath,
// https://rollupjs.org/guide/en/#outputformat
format: latestBuild ? "es" : "systemjs",
// https://rollupjs.org/guide/en/#outputexternallivebindings
externalLiveBindings: false,
// https://rollupjs.org/guide/en/#outputentryfilenames
// https://rollupjs.org/guide/en/#outputchunkfilenames
// https://rollupjs.org/guide/en/#outputassetfilenames
entryFileNames:
isProdBuild && !isStatsBuild ? "[name]-[hash].js" : "[name].js",
chunkFileNames:
isProdBuild && !isStatsBuild ? "c.[hash].js" : "[name].js",
assetFileNames:
isProdBuild && !isStatsBuild ? "a.[hash].js" : "[name].js",
// https://rollupjs.org/guide/en/#outputsourcemap
sourcemap: isProdBuild ? true : "inline",
},
};
};
const createAppConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => {
return createRollupConfig(
bundle.config.app({
isProdBuild,
latestBuild,
isStatsBuild,
})
);
};
const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => {
return createRollupConfig(
bundle.config.demo({
isProdBuild,
latestBuild,
isStatsBuild,
})
);
};
const createCastConfig = ({ isProdBuild, latestBuild }) => {
return createRollupConfig(bundle.config.cast({ isProdBuild, latestBuild }));
};
const createHassioConfig = ({ isProdBuild, latestBuild }) => {
return createRollupConfig(bundle.config.hassio({ isProdBuild, latestBuild }));
};
const createGalleryConfig = ({ isProdBuild, latestBuild }) => {
return createRollupConfig(
bundle.config.gallery({ isProdBuild, latestBuild })
);
};
module.exports = {
createAppConfig,
createDemoConfig,
createCastConfig,
createHassioConfig,
createGalleryConfig,
};
+16
View File
@@ -0,0 +1,16 @@
const path = require("path");
const fs = require("fs");
// Helper function to map recursively over files in a folder and it's subfolders
module.exports.mapFiles = function mapFiles(startPath, filter, mapFunc) {
const files = fs.readdirSync(startPath);
for (let i = 0; i < files.length; i++) {
const filename = path.join(startPath, files[i]);
const stat = fs.lstatSync(filename);
if (stat.isDirectory()) {
mapFiles(filename, filter, mapFunc);
} else if (filename.indexOf(filter) >= 0) {
mapFunc(filename);
}
}
};
+80 -181
View File
@@ -1,48 +1,46 @@
const webpack = require("webpack");
const fs = require("fs");
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const WorkboxPlugin = require("workbox-webpack-plugin");
const ManifestPlugin = require("webpack-manifest-plugin");
const WorkerPlugin = require("worker-plugin");
const paths = require("./paths.js");
const { babelLoaderConfig } = require("./babel.js");
let version = fs
.readFileSync(path.resolve(paths.polymer_dir, "setup.py"), "utf8")
.match(/\d{8}\.\d+/);
if (!version) {
throw Error("Version not found");
}
version = version[0];
const bundle = require("./bundle");
const createWebpackConfig = ({
entry,
outputRoot,
outputPath,
publicPath,
defineOverlay,
isProdBuild,
latestBuild,
isStatsBuild,
dontHash,
}) => {
if (!dontHash) {
dontHash = new Set();
}
const ignorePackages = bundle.ignorePackages({ latestBuild });
return {
mode: isProdBuild ? "production" : "development",
devtool: isProdBuild ? "source-map" : "inline-cheap-module-source-map",
devtool: isProdBuild
? "cheap-module-source-map"
: "eval-cheap-module-source-map",
entry,
node: false,
module: {
rules: [
babelLoaderConfig({ latestBuild }),
{
test: /\.js$|\.ts$/,
exclude: bundle.babelExclude(),
use: {
loader: "babel-loader",
options: bundle.babelOptions({ latestBuild }),
},
},
{
test: /\.css$/,
use: "raw-loader",
},
{
test: /\.(html)$/,
use: {
loader: "html-loader",
options: {
exportAsEs6Default: true,
},
},
},
],
},
optimization: {
@@ -52,59 +50,61 @@ const createWebpackConfig = ({
parallel: true,
extractComments: true,
sourceMap: true,
terserOptions: {
safari10: true,
ecma: latestBuild ? undefined : 5,
},
terserOptions: bundle.terserOptions(latestBuild),
}),
],
},
plugins: [
new ManifestPlugin(),
new webpack.DefinePlugin({
__DEV__: !isProdBuild,
__BUILD__: JSON.stringify(latestBuild ? "latest" : "es5"),
__VERSION__: JSON.stringify(version),
__DEMO__: false,
__STATIC_PATH__: "/static/",
"process.env.NODE_ENV": JSON.stringify(
isProdBuild ? "production" : "development"
),
...defineOverlay,
new WorkerPlugin(),
new ManifestPlugin({
// Only include the JS of entrypoints
filter: (file) => file.isInitial && !file.name.endsWith(".map"),
}),
new webpack.DefinePlugin(
bundle.definedVars({ isProdBuild, latestBuild, defineOverlay })
),
new webpack.IgnorePlugin({
checkResource(resource, context) {
// Only use ignore to intercept imports that we don't control
// inside node_module dependencies.
if (
!context.includes("/node_modules/") ||
// calling define.amd will call require("!!webpack amd options")
resource.startsWith("!!webpack") ||
// loaded by webpack dev server but doesn't exist.
resource === "webpack/hot"
) {
return false;
}
let fullPath;
try {
fullPath = resource.startsWith(".")
? path.resolve(context, resource)
: require.resolve(resource);
} catch (err) {
console.error(
"Error in Home Assistant ignore plugin",
resource,
context
);
throw err;
}
return ignorePackages.some((toIgnorePath) =>
fullPath.startsWith(toIgnorePath)
);
},
}),
// Ignore moment.js locales
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
// Color.js is bloated, it contains all color definitions for all material color sets.
new webpack.NormalModuleReplacementPlugin(
/@polymer\/paper-styles\/color\.js$/,
new RegExp(bundle.emptyPackages({ latestBuild }).join("|")),
path.resolve(paths.polymer_dir, "src/util/empty.js")
),
// Ignore roboto pointing at CDN. We use local font-roboto-local.
new webpack.NormalModuleReplacementPlugin(
/@polymer\/font-roboto\/roboto\.js$/,
path.resolve(paths.polymer_dir, "src/util/empty.js")
),
// Ignore mwc icons pointing at CDN.
new webpack.NormalModuleReplacementPlugin(
/@material\/mwc-icon\/mwc-icon-font\.js$/,
path.resolve(paths.polymer_dir, "src/util/empty.js")
),
].filter(Boolean),
],
resolve: {
extensions: [".ts", ".js", ".json", ".tsx"],
alias: {
react: "preact-compat",
"react-dom": "preact-compat",
// Not necessary unless you consume a module using `createClass`
"create-react-class": "preact-compat/lib/create-react-class",
// Not necessary unless you consume a module requiring `react-dom-factories`
"react-dom-factories": "preact-compat/lib/react-dom-factories",
},
extensions: [".ts", ".js", ".json"],
},
output: {
filename: ({ chunk }) => {
const dontHash = new Set();
if (!isProdBuild || dontHash.has(chunk.name)) {
return `${chunk.name}.js`;
}
@@ -114,141 +114,40 @@ const createWebpackConfig = ({
isProdBuild && !isStatsBuild
? "chunk.[chunkhash].js"
: "[name].chunk.js",
path: path.resolve(
outputRoot,
latestBuild ? "frontend_latest" : "frontend_es5"
),
publicPath: latestBuild ? "/frontend_latest/" : "/frontend_es5/",
// For workerize loader
path: outputPath,
publicPath,
// To silence warning in worker plugin
globalObject: "self",
},
};
};
const createAppConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => {
const config = createWebpackConfig({
entry: {
app: "./src/entrypoints/app.ts",
authorize: "./src/entrypoints/authorize.ts",
onboarding: "./src/entrypoints/onboarding.ts",
core: "./src/entrypoints/core.ts",
compatibility: "./src/entrypoints/compatibility.ts",
"custom-panel": "./src/entrypoints/custom-panel.ts",
"hass-icons": "./src/entrypoints/hass-icons.ts",
},
outputRoot: paths.root,
isProdBuild,
latestBuild,
isStatsBuild,
});
if (latestBuild) {
// Create an object mapping browser urls to their paths during build
const translationMetadata = require("../build-translations/translationMetadata.json");
const workBoxTranslationsTemplatedURLs = {};
const englishFP = translationMetadata.translations.en.fingerprints;
Object.keys(englishFP).forEach((key) => {
workBoxTranslationsTemplatedURLs[
`/static/translations/${englishFP[key]}`
] = `build-translations/output/${key}.json`;
});
config.plugins.push(
new WorkboxPlugin.InjectManifest({
swSrc: "./src/entrypoints/service-worker-hass.js",
swDest: "service_worker.js",
importWorkboxFrom: "local",
include: [/\.js$/],
templatedURLs: {
...workBoxTranslationsTemplatedURLs,
"/static/icons/favicon-192x192.png":
"public/icons/favicon-192x192.png",
"/static/fonts/roboto/Roboto-Light.woff2":
"node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff2",
"/static/fonts/roboto/Roboto-Medium.woff2":
"node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff2",
"/static/fonts/roboto/Roboto-Regular.woff2":
"node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff2",
"/static/fonts/roboto/Roboto-Bold.woff2":
"node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff2",
},
})
);
}
return config;
return createWebpackConfig(
bundle.config.app({ isProdBuild, latestBuild, isStatsBuild })
);
};
const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => {
return createWebpackConfig({
entry: {
main: path.resolve(paths.demo_dir, "src/entrypoint.ts"),
compatibility: path.resolve(
paths.polymer_dir,
"src/entrypoints/compatibility.ts"
),
},
outputRoot: paths.demo_root,
defineOverlay: {
__VERSION__: JSON.stringify(`DEMO-${version}`),
__DEMO__: true,
},
isProdBuild,
latestBuild,
isStatsBuild,
});
return createWebpackConfig(
bundle.config.demo({ isProdBuild, latestBuild, isStatsBuild })
);
};
const createCastConfig = ({ isProdBuild, latestBuild }) => {
const entry = {
launcher: path.resolve(paths.cast_dir, "src/launcher/entrypoint.ts"),
};
if (latestBuild) {
entry.receiver = path.resolve(paths.cast_dir, "src/receiver/entrypoint.ts");
}
return createWebpackConfig({
entry,
outputRoot: paths.cast_root,
isProdBuild,
latestBuild,
});
return createWebpackConfig(bundle.config.cast({ isProdBuild, latestBuild }));
};
const createHassioConfig = ({ isProdBuild, latestBuild }) => {
if (latestBuild) {
throw new Error("Hass.io does not support latest build!");
}
const config = createWebpackConfig({
entry: {
entrypoint: path.resolve(paths.hassio_dir, "src/entrypoint.js"),
},
outputRoot: "",
isProdBuild,
latestBuild,
});
config.output.path = paths.hassio_root;
config.output.publicPath = paths.hassio_publicPath;
return config;
return createWebpackConfig(
bundle.config.hassio({ isProdBuild, latestBuild })
);
};
const createGalleryConfig = ({ isProdBuild, latestBuild }) => {
if (!latestBuild) {
throw new Error("Gallery only supports latest build!");
}
const config = createWebpackConfig({
entry: {
entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"),
},
outputRoot: paths.gallery_root,
isProdBuild,
latestBuild,
});
return config;
return createWebpackConfig(
bundle.config.gallery({ isProdBuild, latestBuild })
);
};
module.exports = {
+10
View File
@@ -0,0 +1,10 @@
const rollup = require("../build-scripts/rollup.js");
const env = require("../build-scripts/env.js");
const config = rollup.createCastConfig({
isProdBuild: env.isProdBuild(),
latestBuild: true,
isStatsBuild: env.isStatsBuild(),
});
module.exports = { ...config.inputOptions, output: config.outputOptions };
+7 -2
View File
@@ -45,8 +45,13 @@
(function() {
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
if (!isS101) {
_ls("/static/polyfills/custom-elements-es5-adapter.js");
_ls("<%= es5LauncherJS %>");
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5LauncherJS %>");
};
<% } else { %>
_ls("<%= es5LauncherJS %>");
<% } %>
}
})();
</script>
+7 -2
View File
@@ -36,8 +36,13 @@
(function() {
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
if (!isS101) {
_ls("/static/polyfills/custom-elements-es5-adapter.js");
_ls("<%= es5LauncherJS %>");
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5LauncherJS %>");
};
<% } else { %>
_ls("<%= es5LauncherJS %>");
<% } %>
}
})();
</script>
+2 -4
View File
@@ -1,5 +1,3 @@
import "../../../src/resources/ha-style";
import "../../../src/resources/roboto";
import "../../../src/components/ha-iconset-svg";
import "../../../src/resources/hass-icons";
import "~app/resources/ha-style";
import "~app/resources/roboto";
import "./layout/hc-connect";
+38 -34
View File
@@ -1,49 +1,53 @@
import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-listbox/paper-listbox";
import { Auth, Connection } from "home-assistant-js-websocket";
import {
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
html,
CSSResult,
css,
} from "lit-element";
import { Connection, Auth } from "home-assistant-js-websocket";
import "@polymer/iron-icon";
import "@polymer/paper-listbox/paper-listbox";
import "@polymer/paper-item/paper-icon-item";
import "../../../../src/components/ha-icon";
import {
enableWrite,
askWrite,
saveTokens,
} from "../../../../src/common/auth/token_storage";
import {
ensureConnectedCastSession,
castSendShowLovelaceView,
} from "../../../../src/cast/receiver_messages";
import "../../../../src/layouts/loading-screen";
import { CastManager } from "../../../../src/cast/cast_manager";
import {
LovelaceConfig,
getLovelaceCollection,
} from "../../../../src/data/lovelace";
import "./hc-layout";
import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config";
castSendShowLovelaceView,
ensureConnectedCastSession,
} from "../../../../src/cast/receiver_messages";
import {
askWrite,
enableWrite,
saveTokens,
} from "../../../../src/common/auth/token_storage";
import { atLeastVersion } from "../../../../src/common/config/version";
import { toggleAttribute } from "../../../../src/common/dom/toggle_attribute";
import "../../../../src/components/ha-icon";
import {
getLegacyLovelaceCollection,
getLovelaceCollection,
LovelaceConfig,
} from "../../../../src/data/lovelace";
import "../../../../src/layouts/loading-screen";
import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config";
import "./hc-layout";
import "@material/mwc-button/mwc-button";
@customElement("hc-cast")
class HcCast extends LitElement {
@property() public auth!: Auth;
@property() public connection!: Connection;
@property() public castManager!: CastManager;
@property() private askWrite = false;
@property() private lovelaceConfig?: LovelaceConfig | null;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (this.lovelaceConfig === undefined) {
return html`
<loading-screen></loading-screen>>
`;
return html` <loading-screen></loading-screen>> `;
}
const error =
@@ -73,14 +77,12 @@ class HcCast extends LitElement {
`
: ""}
${error
? html`
<div class="card-content">${error}</div>
`
? html` <div class="card-content">${error}</div> `
: !this.castManager.status
? html`
<p class="center-item">
<mwc-button raised @click=${this._handleLaunch}>
<iron-icon icon="hass:cast"></iron-icon>
<ha-icon icon="hass:cast"></ha-icon>
Start Casting
</mwc-button>
</p>
@@ -118,7 +120,7 @@ class HcCast extends LitElement {
${this.castManager.status
? html`
<mwc-button @click=${this._handleLaunch}>
<iron-icon icon="hass:cast-connected"></iron-icon>
<ha-icon icon="hass:cast-connected"></ha-icon>
Manage
</mwc-button>
`
@@ -133,7 +135,9 @@ class HcCast extends LitElement {
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
const llColl = getLovelaceCollection(this.connection);
const llColl = atLeastVersion(this.connection.haVersion, 0, 107)
? getLovelaceCollection(this.connection)
: getLegacyLovelaceCollection(this.connection);
// We first do a single refresh because we need to check if there is LL
// configuration.
llColl.refresh().then(
@@ -238,7 +242,7 @@ class HcCast extends LitElement {
color: var(--secondary-text-color);
}
mwc-button iron-icon {
mwc-button ha-icon {
margin-right: 8px;
height: 18px;
}
+39 -38
View File
@@ -1,35 +1,35 @@
import {
LitElement,
customElement,
property,
TemplateResult,
html,
CSSResult,
css,
} from "lit-element";
import {
getAuth,
createConnection,
Auth,
getAuthOptions,
ERR_HASS_HOST_REQUIRED,
ERR_INVALID_HTTPS_TO_HTTP,
Connection,
ERR_CANNOT_CONNECT,
ERR_INVALID_AUTH,
} from "home-assistant-js-websocket";
import "@polymer/iron-icon";
import "@material/mwc-button";
import "@polymer/paper-input/paper-input";
import {
Auth,
Connection,
createConnection,
ERR_CANNOT_CONNECT,
ERR_HASS_HOST_REQUIRED,
ERR_INVALID_AUTH,
ERR_INVALID_HTTPS_TO_HTTP,
getAuth,
getAuthOptions,
} from "home-assistant-js-websocket";
import {
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
} from "lit-element";
import { CastManager, getCastManager } from "../../../../src/cast/cast_manager";
import { castSendShowDemo } from "../../../../src/cast/receiver_messages";
import {
loadTokens,
saveTokens,
} from "../../../../src/common/auth/token_storage";
import "../../../../src/components/ha-icon";
import "../../../../src/layouts/loading-screen";
import { CastManager, getCastManager } from "../../../../src/cast/cast_manager";
import "./hc-layout";
import { castSendShowDemo } from "../../../../src/cast/receiver_messages";
import { registerServiceWorker } from "../../../../src/util/register-service-worker";
import "./hc-layout";
const seeFAQ = (qid) => html`
See <a href="./faq.html${qid ? `#${qid}` : ""}">the FAQ</a> for more
@@ -61,16 +61,22 @@ const INTRO = html`
@customElement("hc-connect")
export class HcConnect extends LitElement {
@property() private loading = false;
// If we had stored credentials but we cannot connect,
// show a screen asking retry or logout.
@property() private cannotConnect = false;
@property() private error?: string | TemplateResult;
@property() private auth?: Auth;
@property() private connection?: Connection;
@property() private castManager?: CastManager | null;
private openDemo = false;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (this.cannotConnect) {
const tokens = loadTokens();
return html`
@@ -92,9 +98,7 @@ export class HcConnect extends LitElement {
}
if (this.castManager === undefined || this.loading) {
return html`
<loading-screen></loading-screen>
`;
return html` <loading-screen></loading-screen> `;
}
if (this.castManager === null) {
@@ -127,20 +131,16 @@ export class HcConnect extends LitElement {
@keydown=${this._handleInputKeyDown}
></paper-input>
</p>
${this.error
? html`
<p class="error">${this.error}</p>
`
: ""}
${this.error ? html` <p class="error">${this.error}</p> ` : ""}
</div>
<div class="card-actions">
<mwc-button @click=${this._handleDemo}>
Show Demo
<iron-icon
<ha-icon
.icon=${this.castManager.castState === "CONNECTED"
? "hass:cast-connected"
: "hass:cast"}
></iron-icon>
></ha-icon>
</mwc-button>
<div class="spacer"></div>
<mwc-button @click=${this._handleConnect}>Authorize</mwc-button>
@@ -184,7 +184,7 @@ export class HcConnect extends LitElement {
this.castManager = null;
}
);
registerServiceWorker(false);
registerServiceWorker(this, false);
}
private async _handleDemo() {
@@ -211,7 +211,8 @@ export class HcConnect extends LitElement {
if (value === "") {
this.error = "Please enter a Home Assistant URL.";
return;
} else if (value.indexOf("://") === -1) {
}
if (value.indexOf("://") === -1) {
this.error =
"Please enter your full URL, including the protocol part (https://).";
return;
@@ -315,7 +316,7 @@ export class HcConnect extends LitElement {
color: darkred;
}
mwc-button iron-icon {
mwc-button ha-icon {
margin-left: 8px;
}
+18 -20
View File
@@ -1,28 +1,31 @@
import {
customElement,
LitElement,
TemplateResult,
html,
CSSResult,
css,
property,
} from "lit-element";
import {
Auth,
Connection,
HassUser,
getUser,
HassUser,
} from "home-assistant-js-websocket";
import {
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
} from "lit-element";
import "../../../../src/components/ha-card";
@customElement("hc-layout")
class HcLayout extends LitElement {
@property() public subtitle?: string | undefined;
@property() public auth?: Auth;
@property() public connection?: Connection;
@property() public user?: HassUser;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<ha-card>
<div class="layout">
@@ -37,11 +40,7 @@ class HcLayout extends LitElement {
this.auth.data.hassUrl.indexOf("//") + 2
)}</a
>
${this.user
? html`
${this.user.name}
`
: ""}
${this.user ? html` ${this.user.name} ` : ""}
</div>
`
: ""}
@@ -50,13 +49,12 @@ class HcLayout extends LitElement {
</div>
</ha-card>
<div class="footer">
<a href="./faq.html">Frequently Asked Questions</a> Found a bug? Let
@balloob know
<!-- <a
<a href="./faq.html">Frequently Asked Questions</a> Found a bug?
<a
href="https://github.com/home-assistant/home-assistant-polymer/issues"
target="_blank"
>Let us know!</a
> -->
>
</div>
`;
}
+1
View File
@@ -1 +1,2 @@
/* eslint-disable no-undef */
export const castContext = cast.framework.CastReceiverContext.getInstance();
+1 -1
View File
@@ -1,4 +1,4 @@
import { Entity, convertEntities } from "../../../../src/fake_data/entity";
import { convertEntities, Entity } from "../../../../src/fake_data/entity";
export const castDemoEntities: () => Entity[] = () =>
convertEntities({
+1 -1
View File
@@ -1,6 +1,6 @@
import {
LovelaceConfig,
LovelaceCardConfig,
LovelaceConfig,
} from "../../../../src/data/lovelace";
import { castContext } from "../cast_context";
+5 -4
View File
@@ -1,9 +1,10 @@
import "../../../src/resources/custom-card-support";
/* eslint-disable no-undef */
import { CAST_NS } from "~app/cast/const";
import { HassMessage } from "~app/cast/receiver_messages";
import "~app/resources/custom-card-support";
import { castContext } from "./cast_context";
import { ReceivedMessage } from "./types";
import { HassMessage } from "../../../src/cast/receiver_messages";
import { HcMain } from "./layout/hc-main";
import { CAST_NS } from "../../../src/cast/const";
import { ReceivedMessage } from "./types";
const controller = new HcMain();
document.body.append(controller);
+8 -6
View File
@@ -1,22 +1,23 @@
import { HassElement } from "../../../../src/state/hass-element";
import "./hc-lovelace";
import { customElement, TemplateResult, html, property } from "lit-element";
import { customElement, html, property, TemplateResult } from "lit-element";
import { mockHistory } from "../../../../demo/src/stubs/history";
import { LovelaceConfig } from "../../../../src/data/lovelace";
import {
MockHomeAssistant,
provideHass,
} from "../../../../src/fake_data/provide_hass";
import { HassElement } from "../../../../src/state/hass-element";
import { HomeAssistant } from "../../../../src/types";
import { LovelaceConfig } from "../../../../src/data/lovelace";
import { castDemoEntities } from "../demo/cast-demo-entities";
import { castDemoLovelace } from "../demo/cast-demo-lovelace";
import { mockHistory } from "../../../../demo/src/stubs/history";
import "./hc-lovelace";
@customElement("hc-demo")
class HcDemo extends HassElement {
@property() public lovelacePath!: string;
@property() private _lovelaceConfig?: LovelaceConfig;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._lovelaceConfig) {
return html``;
}
@@ -28,6 +29,7 @@ class HcDemo extends HassElement {
></hc-lovelace>
`;
}
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
this._initialize();
+8 -11
View File
@@ -1,20 +1,21 @@
import {
LitElement,
TemplateResult,
html,
customElement,
CSSResult,
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
} from "lit-element";
import { HomeAssistant } from "../../../../src/types";
@customElement("hc-launch-screen")
class HcLaunchScreen extends LitElement {
@property() public hass?: HomeAssistant;
@property() public error?: string;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<div class="container">
<img
@@ -22,11 +23,7 @@ class HcLaunchScreen extends LitElement {
/>
<div class="status">
${this.hass ? "Connected" : "Not Connected"}
${this.error
? html`
<p>Error: ${this.error}</p>
`
: ""}
${this.error ? html` <p>Error: ${this.error}</p> ` : ""}
</div>
</div>
`;
+11 -9
View File
@@ -1,17 +1,17 @@
import {
LitElement,
TemplateResult,
html,
customElement,
CSSResult,
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
} from "lit-element";
import { LovelaceConfig } from "../../../../src/data/lovelace";
import "../../../../src/panels/lovelace/views/hui-view";
import "../../../../src/panels/lovelace/views/hui-panel-view";
import { HomeAssistant } from "../../../../src/types";
import { Lovelace } from "../../../../src/panels/lovelace/types";
import "../../../../src/panels/lovelace/views/hui-panel-view";
import "../../../../src/panels/lovelace/views/hui-view";
import { HomeAssistant } from "../../../../src/types";
import "./hc-launch-screen";
@customElement("hc-lovelace")
@@ -22,7 +22,7 @@ class HcLovelace extends LitElement {
@property() public viewPath?: string | number;
protected render(): TemplateResult | void {
protected render(): TemplateResult {
const index = this._viewIndex;
if (index === undefined) {
return html`
@@ -39,12 +39,14 @@ class HcLovelace extends LitElement {
mode: "storage",
language: "en",
saveConfig: async () => undefined,
deleteConfig: async () => undefined,
setEditMode: () => undefined,
};
return this.lovelaceConfig.views[index].panel
? html`
<hui-panel-view
.hass=${this.hass}
.lovelace=${lovelace}
.config=${this.lovelaceConfig.views[index]}
></hui-panel-view>
`
+68 -40
View File
@@ -1,27 +1,33 @@
import {
getAuth,
createConnection,
getAuth,
UnsubscribeFunc,
} from "home-assistant-js-websocket";
import { customElement, TemplateResult, html, property } from "lit-element";
import { HassElement } from "../../../../src/state/hass-element";
import {
HassMessage,
ConnectMessage,
ShowLovelaceViewMessage,
GetStatusMessage,
ShowDemoMessage,
} from "../../../../src/cast/receiver_messages";
import {
LovelaceConfig,
getLovelaceCollection,
} from "../../../../src/data/lovelace";
import "./hc-launch-screen";
import { castContext } from "../cast_context";
import { customElement, html, property, TemplateResult } from "lit-element";
import { CAST_NS } from "../../../../src/cast/const";
import {
ConnectMessage,
GetStatusMessage,
HassMessage,
ShowDemoMessage,
ShowLovelaceViewMessage,
} from "../../../../src/cast/receiver_messages";
import { ReceiverStatusMessage } from "../../../../src/cast/sender_messages";
import { loadLovelaceResources } from "../../../../src/panels/lovelace/common/load-resources";
import { atLeastVersion } from "../../../../src/common/config/version";
import { isNavigationClick } from "../../../../src/common/dom/is-navigation-click";
import {
fetchResources,
getLegacyLovelaceCollection,
getLovelaceCollection,
LegacyLovelaceConfig,
LovelaceConfig,
} from "../../../../src/data/lovelace";
import { loadLovelaceResources } from "../../../../src/panels/lovelace/common/load-resources";
import { HassElement } from "../../../../src/state/hass-element";
import { castContext } from "../cast_context";
import "./hc-launch-screen";
let resourcesLoaded = false;
@customElement("hc-main")
export class HcMain extends HassElement {
@@ -35,6 +41,8 @@ export class HcMain extends HassElement {
private _unsubLovelace?: UnsubscribeFunc;
private _urlPath?: string | null;
public processIncomingMessage(msg: HassMessage) {
if (msg.type === "connect") {
this._handleConnectMessage(msg);
@@ -45,16 +53,14 @@ export class HcMain extends HassElement {
} else if (msg.type === "show_demo") {
this._handleShowDemo(msg);
} else {
// tslint:disable-next-line: no-console
// eslint-disable-next-line no-console
console.warn("unknown msg type", msg);
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (this._showDemo) {
return html`
<hc-demo .lovelacePath=${this._lovelacePath}></hc-demo>
`;
return html` <hc-demo .lovelacePath=${this._lovelacePath}></hc-demo> `;
}
if (
@@ -76,6 +82,7 @@ export class HcMain extends HassElement {
.hass=${this.hass}
.lovelaceConfig=${this._lovelaceConfig}
.viewPath=${this._lovelacePath}
@config-refresh=${this._generateLovelaceConfig}
></hc-lovelace>
`;
}
@@ -84,15 +91,17 @@ export class HcMain extends HassElement {
super.firstUpdated(changedProps);
import("../second-load");
window.addEventListener("location-changed", () => {
if (location.pathname.startsWith("/lovelace/")) {
this._lovelacePath = location.pathname.substr(10);
const panelPath = `/${this._urlPath || "lovelace"}/`;
if (location.pathname.startsWith(panelPath)) {
this._lovelacePath = location.pathname.substr(panelPath.length);
this._sendStatus();
}
});
document.body.addEventListener("click", (ev) => {
const panelPath = `/${this._urlPath || "lovelace"}/`;
const href = isNavigationClick(ev);
if (href && href.startsWith("/lovelace/")) {
this._lovelacePath = href.substr(10);
if (href && href.startsWith(panelPath)) {
this._lovelacePath = href.substr(panelPath.length);
this._sendStatus();
}
});
@@ -108,6 +117,7 @@ export class HcMain extends HassElement {
if (this.hass) {
status.hassUrl = this.hass.auth.data.hassUrl;
status.lovelacePath = this._lovelacePath!;
status.urlPath = this._urlPath;
}
if (senderId) {
@@ -163,8 +173,17 @@ export class HcMain extends HassElement {
this._error = "Cannot show Lovelace because we're not connected.";
return;
}
if (!this._unsubLovelace) {
const llColl = getLovelaceCollection(this.hass!.connection);
if (msg.urlPath === "lovelace") {
msg.urlPath = null;
}
if (!this._unsubLovelace || this._urlPath !== msg.urlPath) {
this._urlPath = msg.urlPath;
if (this._unsubLovelace) {
this._unsubLovelace();
}
const llColl = atLeastVersion(this.hass.connection.haVersion, 0, 107)
? getLovelaceCollection(this.hass!.connection, msg.urlPath)
: getLegacyLovelaceCollection(this.hass!.connection);
// We first do a single refresh because we need to check if there is LL
// configuration.
try {
@@ -173,14 +192,20 @@ export class HcMain extends HassElement {
this._handleNewLovelaceConfig(lovelaceConfig)
);
} catch (err) {
// eslint-disable-next-line
console.log("Error fetching Lovelace configuration", err, msg);
// Generate a Lovelace config.
this._unsubLovelace = () => undefined;
const { generateLovelaceConfigFromHass } = await import(
"../../../../src/panels/lovelace/common/generate-lovelace-config"
);
this._handleNewLovelaceConfig(
await generateLovelaceConfigFromHass(this.hass!)
);
await this._generateLovelaceConfig();
}
}
if (!resourcesLoaded) {
resourcesLoaded = true;
const resources = atLeastVersion(this.hass.connection.haVersion, 0, 107)
? await fetchResources(this.hass!.connection)
: (this._lovelaceConfig as LegacyLovelaceConfig).resources;
if (resources) {
loadLovelaceResources(resources, this.hass!.auth.data.hassUrl);
}
}
this._showDemo = false;
@@ -191,15 +216,18 @@ export class HcMain extends HassElement {
this._sendStatus();
}
private async _generateLovelaceConfig() {
const { generateLovelaceConfigFromHass } = await import(
"../../../../src/panels/lovelace/common/generate-lovelace-config"
);
this._handleNewLovelaceConfig(
await generateLovelaceConfigFromHass(this.hass!)
);
}
private _handleNewLovelaceConfig(lovelaceConfig: LovelaceConfig) {
castContext.setApplicationState(lovelaceConfig.title!);
this._lovelaceConfig = lovelaceConfig;
if (lovelaceConfig.resources) {
loadLovelaceResources(
lovelaceConfig.resources,
this.hass!.auth.data.hassUrl
);
}
}
private _handleShowDemo(_msg: ShowDemoMessage) {
+1 -2
View File
@@ -1,5 +1,4 @@
import "web-animations-js/web-animations-next-lite.min";
import "../../../src/resources/hass-icons";
import "../../../src/resources/roboto";
import "../../../src/components/ha-iconset-svg";
import "../../../src/resources/ha-style";
import "./layout/hc-lovelace";
+4 -7
View File
@@ -1,11 +1,8 @@
const { createCastConfig } = require("../build-scripts/webpack.js");
const { isProdBuild } = require("../build-scripts/env.js");
// File just used for stats builds
const latestBuild = true;
const { isProdBuild, isStatsBuild } = require("../build-scripts/env.js");
module.exports = createCastConfig({
isProdBuild,
latestBuild,
isProdBuild: isProdBuild(),
isStatsBuild: isStatsBuild(),
latestBuild: true,
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 83 KiB

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