Skip to content

Commit b1a414c

Browse files
authored
Merge pull request #4903 from home-assistant/dev
20200217.0
2 parents ecc6fcf + 46a596c commit b1a414c

File tree

103 files changed

+4323
-2043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4323
-2043
lines changed

build-scripts/babel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module.exports.babelLoaderConfig = ({ latestBuild }) => {
3434
},
3535
],
3636
"@babel/plugin-proposal-optional-chaining",
37+
"@babel/plugin-proposal-nullish-coalescing-operator",
3738
[
3839
require("@babel/plugin-proposal-decorators").default,
3940
{ decoratorsBeforeExport: true },

build-scripts/gulp/webpack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const handler = (done) => (err, stats) => {
5757

5858
gulp.task("webpack-watch-app", () => {
5959
// we are not calling done, so this command will run forever
60-
webpack(bothBuilds(createAppConfig, { isProdBuild: false })).watch(
60+
webpack(createAppConfig({ isProdBuild: false, latestBuild: true })).watch(
6161
{},
6262
handler()
6363
);
-48.1 KB
Loading

demo/src/configs/teachingbirds/lovelace.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
395395
cards: [
396396
{
397397
entity: "script.air_cleaner_quiet",
398-
type: "entity-button",
398+
type: "button",
399399
name: "AC bed",
400400
tap_action: {
401401
action: "call-service",
@@ -408,7 +408,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
408408
},
409409
{
410410
entity: "script.air_cleaner_auto",
411-
type: "entity-button",
411+
type: "button",
412412
name: "AC bed",
413413
tap_action: {
414414
action: "call-service",
@@ -421,7 +421,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
421421
},
422422
{
423423
entity: "script.air_cleaner_turbo",
424-
type: "entity-button",
424+
type: "button",
425425
name: "AC bed",
426426
tap_action: {
427427
action: "call-service",
@@ -434,7 +434,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
434434
},
435435
{
436436
entity: "script.ac_off",
437-
type: "entity-button",
437+
type: "button",
438438
name: "AC",
439439
tap_action: {
440440
action: "call-service",
@@ -447,7 +447,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
447447
},
448448
{
449449
entity: "script.ac_on",
450-
type: "entity-button",
450+
type: "button",
451451
name: "AC",
452452
tap_action: {
453453
action: "call-service",
@@ -658,7 +658,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
658658
action: "call-service",
659659
service: "script.goodnight",
660660
},
661-
type: "entity-button",
661+
type: "button",
662662
icon: "mdi:weather-night",
663663
},
664664
{
@@ -670,7 +670,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
670670
},
671671
service: "scene.turn_on",
672672
},
673-
type: "entity-button",
673+
type: "button",
674674
icon: "mdi:coffee-outline",
675675
},
676676
{
@@ -682,7 +682,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
682682
},
683683
service: "scene.turn_on",
684684
},
685-
type: "entity-button",
685+
type: "button",
686686
icon: "mdi:television-classic",
687687
},
688688
],
@@ -743,7 +743,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
743743
},
744744
service: "light.toggle",
745745
},
746-
type: "entity-button",
746+
type: "button",
747747
icon: "mdi:page-layout-footer",
748748
},
749749
{
@@ -755,7 +755,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
755755
},
756756
service: "light.toggle",
757757
},
758-
type: "entity-button",
758+
type: "button",
759759
icon: "mdi:page-layout-header",
760760
},
761761
],

gallery/src/demos/demo-hui-entity-button-card.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,38 @@ const CONFIGS = [
1515
{
1616
heading: "Basic example",
1717
config: `
18-
- type: entity-button
18+
- type: button
1919
entity: light.bed_light
2020
`,
2121
},
2222
{
2323
heading: "With Name",
2424
config: `
25-
- type: entity-button
25+
- type: button
2626
name: Bedroom
2727
entity: light.bed_light
2828
`,
2929
},
3030
{
3131
heading: "With Icon",
3232
config: `
33-
- type: entity-button
33+
- type: button
3434
entity: light.bed_light
3535
icon: mdi:hotel
3636
`,
3737
},
3838
{
3939
heading: "Without State",
4040
config: `
41-
- type: entity-button
41+
- type: button
4242
entity: light.bed_light
4343
show_state: false
4444
`,
4545
},
4646
{
4747
heading: "Custom Tap Action (toggle)",
4848
config: `
49-
- type: entity-button
49+
- type: button
5050
entity: light.bed_light
5151
tap_action:
5252
action: toggle
@@ -55,21 +55,21 @@ const CONFIGS = [
5555
{
5656
heading: "Running Service",
5757
config: `
58-
- type: entity-button
58+
- type: button
5959
entity: light.bed_light
6060
service: light.toggle
6161
`,
6262
},
6363
{
6464
heading: "Invalid Entity",
6565
config: `
66-
- type: entity-button
66+
- type: button
6767
entity: sensor.invalid_entity
6868
`,
6969
},
7070
];
7171

72-
class DemoEntityButtonEntity extends PolymerElement {
72+
class DemoButtonEntity extends PolymerElement {
7373
static get template() {
7474
return html`
7575
<demo-cards
@@ -97,4 +97,4 @@ class DemoEntityButtonEntity extends PolymerElement {
9797
}
9898
}
9999

100-
customElements.define("demo-hui-entity-button-card", DemoEntityButtonEntity);
100+
customElements.define("demo-hui-button-card", DemoButtonEntity);

package.json

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
1919
"license": "Apache-2.0",
2020
"dependencies": {
21-
"@material/chips": "^3.2.0",
22-
"@material/data-table": "^3.2.0",
23-
"@material/mwc-base": "^0.10.0",
24-
"@material/mwc-button": "^0.10.0",
25-
"@material/mwc-checkbox": "^0.10.0",
26-
"@material/mwc-dialog": "^0.10.0",
27-
"@material/mwc-fab": "^0.10.0",
28-
"@material/mwc-ripple": "^0.10.0",
29-
"@material/mwc-switch": "^0.10.0",
21+
"@material/chips": "^5.0.0",
22+
"@material/data-table": "^5.0.0",
23+
"@material/mwc-base": "^0.13.0",
24+
"@material/mwc-button": "^0.13.0",
25+
"@material/mwc-checkbox": "^0.13.0",
26+
"@material/mwc-dialog": "^0.13.0",
27+
"@material/mwc-fab": "^0.13.0",
28+
"@material/mwc-ripple": "^0.13.0",
29+
"@material/mwc-switch": "^0.13.0",
3030
"@mdi/svg": "4.9.95",
3131
"@polymer/app-layout": "^3.0.2",
3232
"@polymer/app-localize-behavior": "^3.0.1",
@@ -70,15 +70,16 @@
7070
"@polymer/paper-tooltip": "^3.0.1",
7171
"@polymer/polymer": "3.1.0",
7272
"@thomasloven/round-slider": "0.3.7",
73-
"@vaadin/vaadin-combo-box": "^5.0.6",
74-
"@vaadin/vaadin-date-picker": "^4.0.3",
73+
"@vaadin/vaadin-combo-box": "^5.0.10",
74+
"@vaadin/vaadin-date-picker": "^4.0.7",
7575
"@webcomponents/shadycss": "^1.9.0",
7676
"@webcomponents/webcomponentsjs": "^2.2.7",
7777
"chart.js": "~2.8.0",
7878
"chartjs-chart-timeline": "^0.3.0",
7979
"codemirror": "^5.49.0",
8080
"cpx": "^1.5.0",
8181
"deep-clone-simple": "^1.1.1",
82+
"deep-freeze": "^0.0.1",
8283
"es6-object-assign": "^1.1.0",
8384
"fecha": "^3.0.2",
8485
"fuse.js": "^3.4.4",
@@ -108,16 +109,17 @@
108109
"xss": "^1.0.6"
109110
},
110111
"devDependencies": {
111-
"@babel/core": "^7.7.4",
112-
"@babel/plugin-external-helpers": "^7.7.4",
113-
"@babel/plugin-proposal-class-properties": "^7.7.4",
114-
"@babel/plugin-proposal-decorators": "^7.7.4",
115-
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
116-
"@babel/plugin-proposal-optional-chaining": "^7.7.4",
117-
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
118-
"@babel/plugin-transform-react-jsx": "^7.7.4",
119-
"@babel/preset-env": "^7.7.4",
120-
"@babel/preset-typescript": "^7.7.4",
112+
"@babel/core": "^7.8.4",
113+
"@babel/plugin-external-helpers": "^7.8.3",
114+
"@babel/plugin-proposal-class-properties": "^7.8.3",
115+
"@babel/plugin-proposal-decorators": "^7.8.3",
116+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
117+
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
118+
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
119+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
120+
"@babel/plugin-transform-react-jsx": "^7.8.3",
121+
"@babel/preset-env": "^7.8.4",
122+
"@babel/preset-typescript": "^7.8.3",
121123
"@types/chai": "^4.1.7",
122124
"@types/chromecast-caf-receiver": "^3.0.12",
123125
"@types/chromecast-caf-sender": "^1.0.1",
@@ -185,7 +187,15 @@
185187
"resolutions": {
186188
"@webcomponents/webcomponentsjs": "^2.2.10",
187189
"@polymer/polymer": "3.1.0",
188-
"lit-html": "^1.1.2"
190+
"lit-html": "^1.1.2",
191+
"@material/button": "^5.0.0",
192+
"@material/checkbox": "^5.0.0",
193+
"@material/dialog": "^5.0.0",
194+
"@material/fab": "^5.0.0",
195+
"@material/switch": "^5.0.0",
196+
"@material/ripple": "^5.0.0",
197+
"@material/dom": "^5.0.0",
198+
"@material/touch-target": "^5.0.0"
189199
},
190200
"main": "src/home-assistant.js",
191201
"husky": {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="home-assistant-frontend",
5-
version="20200212.0",
5+
version="20200217.0",
66
description="The Home Assistant frontend",
77
url="https://github.com/home-assistant/home-assistant-polymer",
88
author="The Home Assistant Authors",

src/common/const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const DOMAINS_WITH_MORE_INFO = [
4444
"light",
4545
"lock",
4646
"media_player",
47+
"person",
4748
"script",
4849
"sun",
4950
"timer",

src/common/search/search-input.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,43 @@ import {
77
property,
88
} from "lit-element";
99
import { fireEvent } from "../dom/fire_event";
10-
import "@polymer/iron-icon/iron-icon";
1110
import "@polymer/paper-input/paper-input";
1211
import "@polymer/paper-icon-button/paper-icon-button";
13-
import "@material/mwc-button";
12+
import "../../components/ha-icon";
13+
import { classMap } from "lit-html/directives/class-map";
1414

1515
@customElement("search-input")
1616
class SearchInput extends LitElement {
1717
@property() public filter?: string;
18+
@property({ type: Boolean, attribute: "no-label-float" })
19+
public noLabelFloat? = false;
20+
@property({ type: Boolean, attribute: "no-underline" })
21+
public noUnderline = false;
1822

1923
public focus() {
2024
this.shadowRoot!.querySelector("paper-input")!.focus();
2125
}
2226

2327
protected render(): TemplateResult {
2428
return html`
29+
<style>
30+
.no-underline {
31+
--paper-input-container-underline: {
32+
display: none;
33+
height: 0;
34+
}
35+
}
36+
</style>
2537
<div class="search-container">
2638
<paper-input
39+
class=${classMap({ "no-underline": this.noUnderline })}
2740
autofocus
2841
label="Search"
2942
.value=${this.filter}
3043
@value-changed=${this._filterInputChanged}
44+
.noLabelFloat=${this.noLabelFloat}
3145
>
32-
<iron-icon
33-
icon="hass:magnify"
34-
slot="prefix"
35-
class="prefix"
36-
></iron-icon>
46+
<ha-icon icon="hass:magnify" slot="prefix" class="prefix"></ha-icon>
3747
${this.filter &&
3848
html`
3949
<paper-icon-button

0 commit comments

Comments
 (0)