${this.ranges
? html`
${Object.keys(this.ranges).map(
(name) => html`
${name}
`
)}
`
: ""}
`;
}
private _compute24hourFormat() {
return (
new Intl.DateTimeFormat(this.hass.language, {
hour: "numeric",
})
.formatToParts(new Date(2020, 0, 1, 13))
.find((part) => part.type === "hour")!.value.length === 2
);
}
private _setDateRange(ev: CustomEvent