mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Don't show wrong info in logbook (#17439)
This commit is contained in:
parent
2a9ef7d91f
commit
3e60d2e850
@ -261,7 +261,11 @@ export const DOMAINS_TOGGLE = new Set([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
/** Domains that have a dynamic entity image / picture. */
|
/** Domains that have a dynamic entity image / picture. */
|
||||||
export const DOMAINS_WITH_DYNAMIC_PICTURE = new Set(["camera", "media_player"]);
|
export const DOMAINS_WITH_DYNAMIC_PICTURE = new Set([
|
||||||
|
"camera",
|
||||||
|
"image",
|
||||||
|
"media_player",
|
||||||
|
]);
|
||||||
|
|
||||||
/** Temperature units. */
|
/** Temperature units. */
|
||||||
export const UNIT_C = "°C";
|
export const UNIT_C = "°C";
|
||||||
|
@ -46,7 +46,10 @@ export const computeAttributeValueDisplay = (
|
|||||||
// If invalid URL, exception will be raised
|
// If invalid URL, exception will be raised
|
||||||
const url = new URL(attributeValue);
|
const url = new URL(attributeValue);
|
||||||
if (url.protocol === "http:" || url.protocol === "https:")
|
if (url.protocol === "http:" || url.protocol === "https:")
|
||||||
return html`<a target="_blank" rel="noreferrer" href=${attributeValue}
|
return html`<a
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href=${attributeValue}
|
||||||
>${attributeValue}</a
|
>${attributeValue}</a
|
||||||
>`;
|
>`;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
|
@ -157,7 +157,6 @@ export const createHistoricState = (
|
|||||||
attributes: {
|
attributes: {
|
||||||
// Rebuild the historical state by copying static attributes only
|
// Rebuild the historical state by copying static attributes only
|
||||||
device_class: currentStateObj?.attributes.device_class,
|
device_class: currentStateObj?.attributes.device_class,
|
||||||
event_type: currentStateObj?.attributes.event_type,
|
|
||||||
source_type: currentStateObj?.attributes.source_type,
|
source_type: currentStateObj?.attributes.source_type,
|
||||||
has_date: currentStateObj?.attributes.has_date,
|
has_date: currentStateObj?.attributes.has_date,
|
||||||
has_time: currentStateObj?.attributes.has_time,
|
has_time: currentStateObj?.attributes.has_time,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user