diff --git a/js/common/util/location.js b/js/common/util/location.js
new file mode 100644
index 0000000000..de86471ee0
--- /dev/null
+++ b/js/common/util/location.js
@@ -0,0 +1,4 @@
+export function hasLocation(stateObj) {
+ return ('latitude' in stateObj.attributes &&
+ 'longitude' in stateObj.attributes);
+}
diff --git a/panels/config/automation/ha-automation-editor.html b/panels/config/automation/ha-automation-editor.html
index 85cffe0585..3cb59bfc8e 100644
--- a/panels/config/automation/ha-automation-editor.html
+++ b/panels/config/automation/ha-automation-editor.html
@@ -16,6 +16,9 @@
+
+
+
@@ -117,6 +120,7 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
return {
hass: {
type: Object,
+ observer: '_updateComponent',
},
narrow: {
@@ -160,7 +164,7 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
isWide: {
type: Boolean,
- observer: 'isWideChanged',
+ observer: '_updateComponent',
},
};
}
@@ -169,6 +173,7 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
super.ready();
this.configChanged = this.configChanged.bind(this);
this._rendered = null;
+ this._renderScheduled = false;
}
disconnectedCallback() {
@@ -184,13 +189,13 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
this.config = config;
this.errors = null;
this.dirty = true;
- this._updateComponent(config);
+ this._updateComponent();
}
automationChanged(newVal, oldVal) {
if (!newVal) return;
if (!this.hass) {
- setTimeout(this.automationChanged.bind(this, newVal, oldVal), 0);
+ setTimeout(() => this.automationChanged(newVal, oldVal), 0);
return;
}
if (oldVal && oldVal.attributes.id === newVal.attributes.id) {
@@ -230,11 +235,6 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
this._updateComponent();
}
- isWideChanged() {
- if (this.config === null) return;
- this._updateComponent();
- }
-
backTapped() {
if (this.dirty &&
// eslint-disable-next-line
@@ -245,11 +245,17 @@ class HaAutomationEditor extends window.hassMixins.EventsMixin(Polymer.Element)
}
_updateComponent() {
- this._rendered = window.AutomationEditor(this.$.root, {
- automation: this.config,
- onChange: this.configChanged,
- isWide: this.isWide,
- }, this._rendered);
+ if (this._renderScheduled || !this.hass || !this.config) return;
+ this._renderScheduled = true;
+ Promise.resolve().then(() => {
+ this._rendered = window.AutomationEditor(this.$.root, {
+ automation: this.config,
+ onChange: this.configChanged,
+ isWide: this.isWide,
+ hass: this.hass,
+ }, this._rendered);
+ this._renderScheduled = false;
+ });
}
saveAutomation() {
diff --git a/panels/dev-service/ha-panel-dev-service.html b/panels/dev-service/ha-panel-dev-service.html
index 34aad313f6..6d9fede93e 100644
--- a/panels/dev-service/ha-panel-dev-service.html
+++ b/panels/dev-service/ha-panel-dev-service.html
@@ -8,9 +8,9 @@
-
-
+
+
@@ -28,7 +28,7 @@
.ha-form {
margin-right: 16px;
- max-width: 500px;
+ max-width: 400px;
}
.description {
@@ -68,6 +68,14 @@
h1 {
white-space: normal;
}
+
+ td {
+ padding: 4px;
+ }
+
+ .error {
+ color: var(--google-red-500);
+ }
@@ -79,69 +87,77 @@
+ key='panel-dev-service-state-domain-service'
+ data='{{domainService}}'>
-
-
- Call a service from a component.
+ The service dev tool allows you to call any available service in Home Assistant.
-
- Select a domain and service to see the description
+
+ Select a service to see the description
-
-
- Select a service to see the description
+
+
+ No description is available
-
+
+ [[_description]]
-
-
-
- No description is available
-
-
- [[_description]]
-
-
- Valid Parameters
-
+
+
+ Parameter |
+ Description |
+ Example |
+
+
+ This service takes no parameters. |
+
+
- Parameter |
- Description |
- Example |
+ [[attribute.key]] |
+ [[attribute.description]] |
+ [[attribute.example]] |
-
-
- [[attribute.key]] |
- [[attribute.description]] |
- [[attribute.example]] |
-
-
-
-
+
+
@@ -151,128 +167,143 @@
diff --git a/panels/dev-state/ha-panel-dev-state.html b/panels/dev-state/ha-panel-dev-state.html
index fb3cbd3120..1e16a7772d 100644
--- a/panels/dev-state/ha-panel-dev-state.html
+++ b/panels/dev-state/ha-panel-dev-state.html
@@ -10,7 +10,7 @@
-
+
@@ -26,9 +26,9 @@
padding: 16px;
}
- ha-entity-dropdown {
+ ha-entity-picker, .state-input, paper-textarea {
display: block;
- max-width: 300px;
+ max-width: 400px;
}
.entities th {
@@ -72,12 +72,18 @@
This will not communicate with the actual device.
-
-
+ allow-custom-entity
+ >
+
Set State
diff --git a/panels/mailbox/ha-panel-mailbox.html b/panels/mailbox/ha-panel-mailbox.html
index 50a177d715..f6096bddd9 100644
--- a/panels/mailbox/ha-panel-mailbox.html
+++ b/panels/mailbox/ha-panel-mailbox.html
@@ -12,8 +12,6 @@