Missing parenthesis breaks map tooltip format (#15326)

This commit is contained in:
karwosts 2023-02-06 09:45:23 -08:00 committed by GitHub
parent 5548436678
commit 84902bd01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -341,7 +341,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
const p = {} as HaMapPathPoint;
p.point = [latitude, longitude] as LatLngTuple;
const t = new Date(entityState.lu * 1000);
if (config.hours_to_show! ?? DEFAULT_HOURS_TO_SHOW > 144) {
if ((config.hours_to_show! ?? DEFAULT_HOURS_TO_SHOW) > 144) {
// if showing > 6 days in the history trail, show the full
// date and time
p.tooltip = formatDateTime(t, this.hass.locale);