Migrate voice command dialog#4150
Conversation
| <ha-start-voice-button | ||
| .hass="${this.hass}" | ||
| ></ha-start-voice-button> | ||
| <paper-icon-button |
There was a problem hiding this comment.
We should make sure it's only shown when the conversation integration is loaded.
| hass="[[hass]]" | ||
| can-listen="{{canListen}}" | ||
| ></ha-start-voice-button> | ||
| <paper-icon-button |
| [[computeTitle(views, defaultView, locationName)]] | ||
| </div> | ||
| <ha-start-voice-button hass="[[hass]]"></ha-start-voice-button> | ||
| <paper-icon-button |
| }, | ||
| "dialogs": { | ||
| "voice_command": { | ||
| "did_not_hear": "<Home Assistant did not hear anything>", |
There was a problem hiding this comment.
Let's move < and > out of the translations
balloob
left a comment
There was a problem hiding this comment.
Awesome! Ok to merge when comments addressed.
|
|
||
| protected firstUpdated(changedProperties: PropertyValues) { | ||
| super.updated(changedProperties); | ||
| this._conversation = isComponentLoaded(this.hass, "conversation"); |
There was a problem hiding this comment.
This is not correct. We should check it on every render. If a user installs Almond, we want this icon to show up. You could memoize it though on hass.config.components.
There was a problem hiding this comment.
We might want to create a new isComponentLoaded that takes hass.config.components and so is better to memoize.
There was a problem hiding this comment.
Do we need to optimise it for states and shopping list or is checking it on every change of hass ok?
There was a problem hiding this comment.
I just care about Lovelace right now.
| private _debouncedConfigChanged: () => void; | ||
|
|
||
| private _conversation = memoizeOne((_components) => | ||
| isComponentLoaded(this.hass, "conversation") |
|
Going to merge this so I can use it in my demo :) |
And add text input to also support browsers that don't support speech to text.
