Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"@types/leaflet": "^1.4.3",
"@types/memoize-one": "4.1.0",
"@types/mocha": "^5.2.6",
"@types/webspeechapi": "^0.0.29",
"babel-loader": "^8.0.5",
"chai": "^4.2.0",
"copy-webpack-plugin": "^5.0.2",
Expand Down
6 changes: 2 additions & 4 deletions src/common/config/is_component_loaded.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { HomeAssistant } from "../../types";

/** Return if a component is loaded. */
export default function isComponentLoaded(
export const isComponentLoaded = (
hass: HomeAssistant,
component: string
): boolean {
return hass && hass.config.components.indexOf(component) !== -1;
}
): boolean => hass && hass.config.components.indexOf(component) !== -1;
56 changes: 0 additions & 56 deletions src/components/ha-start-voice-button.js

This file was deleted.

14 changes: 14 additions & 0 deletions src/data/conversation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { HomeAssistant } from "../types";

interface ProcessResults {
card: { [key: string]: { [key: string]: string } };
speech: {
[SpeechType in "plain" | "ssml"]: { extra_data: any; speech: string }
};
}

export const processText = (
hass: HomeAssistant,
text: string
): Promise<ProcessResults> =>
hass.callApi("POST", "conversation/process", { text });
2 changes: 1 addition & 1 deletion src/dialogs/ha-more-info-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "./more-info/more-info-controls";
import "./more-info/more-info-settings";

import { computeStateDomain } from "../common/entity/compute_state_domain";
import isComponentLoaded from "../common/config/is_component_loaded";
import { isComponentLoaded } from "../common/config/is_component_loaded";

import DialogMixin from "../mixins/dialog-mixin";

Expand Down
266 changes: 0 additions & 266 deletions src/dialogs/ha-voice-command-dialog.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/dialogs/more-info/controls/more-info-media_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "../../../components/ha-paper-dropdown-menu";
import HassMediaPlayerEntity from "../../../util/hass-media-player-model";

import { attributeClassNames } from "../../../common/entity/attribute_class_names";
import isComponentLoaded from "../../../common/config/is_component_loaded";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { EventsMixin } from "../../../mixins/events-mixin";
import LocalizeMixin from "../../../mixins/localize-mixin";
import { computeRTLDirection } from "../../../common/util/compute_rtl";
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/more-info/more-info-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "./controls/more-info-content";

import { computeStateName } from "../../common/entity/compute_state_name";
import { computeStateDomain } from "../../common/entity/compute_state_domain";
import isComponentLoaded from "../../common/config/is_component_loaded";
import { isComponentLoaded } from "../../common/config/is_component_loaded";
import { DOMAINS_MORE_INFO_NO_HISTORY } from "../../common/const";
import { EventsMixin } from "../../mixins/events-mixin";
import { computeRTL } from "../../common/util/compute_rtl";
Expand Down
Loading