diff --git a/pyproject.toml b/pyproject.toml
index 62a5a7f846..9d88995977 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
-version = "20220629.0"
+version = "20220630.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
diff --git a/src/components/ha-code-editor.ts b/src/components/ha-code-editor.ts
index ff1364a934..152e7a9a6f 100644
--- a/src/components/ha-code-editor.ts
+++ b/src/components/ha-code-editor.ts
@@ -2,6 +2,7 @@ import type {
Completion,
CompletionContext,
CompletionResult,
+ CompletionSource,
} from "@codemirror/autocomplete";
import type { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view";
import { HassEntities } from "home-assistant-js-websocket";
@@ -48,6 +49,9 @@ export class HaCodeEditor extends ReactiveElement {
@property({ type: Boolean, attribute: "autocomplete-entities" })
public autocompleteEntities = false;
+ @property({ type: Boolean, attribute: "autocomplete-icons" })
+ public autocompleteIcons = false;
+
@property() public error = false;
@state() private _value = "";
@@ -160,16 +164,22 @@ export class HaCodeEditor extends ReactiveElement {
),
];
- if (!this.readOnly && this.autocompleteEntities && this.hass) {
- extensions.push(
- this._loadedCodeMirror.autocompletion({
- override: [
- this._entityCompletions.bind(this),
- this._mdiCompletions.bind(this),
- ],
- maxRenderedOptions: 10,
- })
- );
+ if (!this.readOnly) {
+ const completionSources: CompletionSource[] = [];
+ if (this.autocompleteEntities && this.hass) {
+ completionSources.push(this._entityCompletions.bind(this));
+ }
+ if (this.autocompleteIcons) {
+ completionSources.push(this._mdiCompletions.bind(this));
+ }
+ if (completionSources.length > 0) {
+ extensions.push(
+ this._loadedCodeMirror.autocompletion({
+ override: completionSources,
+ maxRenderedOptions: 10,
+ })
+ );
+ }
}
this.codemirror = new this._loadedCodeMirror.EditorView({
diff --git a/src/components/ha-selector/ha-selector-template.ts b/src/components/ha-selector/ha-selector-template.ts
index 1140ec83a7..0761473dd8 100644
--- a/src/components/ha-selector/ha-selector-template.ts
+++ b/src/components/ha-selector/ha-selector-template.ts
@@ -31,6 +31,7 @@ export class HaTemplateSelector extends LitElement {
.readOnly=${this.disabled}
autofocus
autocomplete-entities
+ autocomplete-icons
@value-changed=${this._handleChange}
dir="ltr"
>
diff --git a/src/components/ha-yaml-editor.ts b/src/components/ha-yaml-editor.ts
index a1f24f302f..bfa01b73b9 100644
--- a/src/components/ha-yaml-editor.ts
+++ b/src/components/ha-yaml-editor.ts
@@ -70,6 +70,7 @@ export class HaYamlEditor extends LitElement {
.readOnly=${this.readOnly}
mode="yaml"
autocomplete-entities
+ autocomplete-icons
.error=${this.isValid === false}
@value-changed=${this._onChange}
dir="ltr"
diff --git a/src/panels/config/info/ha-config-info.ts b/src/panels/config/info/ha-config-info.ts
index 8c9e92cd54..459531f6f1 100644
--- a/src/panels/config/info/ha-config-info.ts
+++ b/src/panels/config/info/ha-config-info.ts
@@ -24,6 +24,7 @@ import { haStyle } from "../../../resources/styles";
import type { HomeAssistant, Route } from "../../../types";
import { documentationUrl } from "../../../util/documentation-url";
+const JS_TYPE = __BUILD__;
const JS_VERSION = __VERSION__;
const PAGES: Array<{
@@ -132,7 +133,9 @@ class HaConfigInfo extends LitElement {
${this.hass.localize(
"ui.panel.config.info.frontend_version",
"version",
- JS_VERSION
+ JS_VERSION,
+ "type",
+ JS_TYPE
)}
diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts
index eaa03dc98f..e0f8f99319 100644
--- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts
+++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts
@@ -60,6 +60,7 @@ class HaPanelDevMqtt extends LitElement {
`
- : ""}`,
+ : "—"}`,
width: "113px",
},
actions: {
diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts
index 8f88903446..60071c5fcf 100644
--- a/src/panels/developer-tools/template/developer-tools-template.ts
+++ b/src/panels/developer-tools/template/developer-tools-template.ts
@@ -133,6 +133,7 @@ class HaPanelDevTemplate extends LitElement {
.error=${this._error}
autofocus
autocomplete-entities
+ autocomplete-icons
@value-changed=${this._templateChanged}
dir="ltr"
>
diff --git a/src/panels/lovelace/editor/hui-element-editor.ts b/src/panels/lovelace/editor/hui-element-editor.ts
index e06cb7d83b..4f0483c659 100644
--- a/src/panels/lovelace/editor/hui-element-editor.ts
+++ b/src/panels/lovelace/editor/hui-element-editor.ts
@@ -198,6 +198,7 @@ export abstract class HuiElementEditor extends LitElement {
mode="yaml"
autofocus
autocomplete-entities
+ autocomplete-icons
.hass=${this.hass}
.value=${this.yaml}
.error=${Boolean(this._errors)}
diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts
index ce6c15e99e..e59971d11f 100644
--- a/src/panels/lovelace/hui-editor.ts
+++ b/src/panels/lovelace/hui-editor.ts
@@ -92,6 +92,7 @@ class LovelaceFullConfigEditor extends LitElement {
mode="yaml"
autofocus
autocomplete-entities
+ autocomplete-icons
.hass=${this.hass}
@value-changed=${this._yamlChanged}
@editor-save=${this._handleSave}