mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Merge pull request #11729 from home-assistant/20220203.1
This commit is contained in:
commit
41ec65ef3d
@ -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
|
||||||
|
@ -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 (
|
||||||
|
@ -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 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user