Merge pull request #11729 from home-assistant/20220203.1

This commit is contained in:
Paulus Schoutsen 2022-02-18 11:11:24 -08:00 committed by GitHub
commit 41ec65ef3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = home-assistant-frontend name = home-assistant-frontend
version = 20220203.0 version = 20220203.1
author = The Home Assistant Authors author = The Home Assistant Authors
author_email = hello@home-assistant.io author_email = hello@home-assistant.io
license = Apache-2.0 license = Apache-2.0

View File

@ -123,7 +123,11 @@ export const computeStateDisplay = (
domain === "scene" || domain === "scene" ||
(domain === "sensor" && stateObj.attributes.device_class === "timestamp") (domain === "sensor" && stateObj.attributes.device_class === "timestamp")
) { ) {
return formatDateTime(new Date(compareState), locale); try {
return formatDateTime(new Date(compareState), locale);
} catch (_err) {
return compareState;
}
} }
return ( return (

View File

@ -135,7 +135,9 @@ export class HaServiceControl extends LitElement {
let updatedDefaultValue = false; let updatedDefaultValue = false;
if (this._value && serviceData) { if (this._value && serviceData) {
// Set mandatory bools without a default value to false // Set mandatory bools without a default value to false
this._value.data ??= {}; if (!this._value.data) {
this._value.data = {};
}
serviceData.fields.forEach((field) => { serviceData.fields.forEach((field) => {
if ( if (
field.selector && field.selector &&