FIx selecting service/url path action after choosing default action (#9376)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Bram Kragten 2021-06-08 14:24:58 +02:00 committed by GitHub
parent 226d6216b7
commit 8a33d174d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,18 +33,18 @@ export class HuiActionEditor extends LitElement {
@property() protected hass?: HomeAssistant;
get _navigation_path(): string {
const config = this.config as NavigateActionConfig;
return config.navigation_path || "";
const config = this.config as NavigateActionConfig | undefined;
return config?.navigation_path || "";
}
get _url_path(): string {
const config = this.config as UrlActionConfig;
return config.url_path || "";
const config = this.config as UrlActionConfig | undefined;
return config?.url_path || "";
}
get _service(): string {
const config = this.config as CallServiceActionConfig;
return config.service || "";
return config?.service || "";
}
private _serviceAction = memoizeOne(