mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-20 09:06:34 +00:00

* Add timer card and badge * Disable interval on disconnect * Tests! * One more test case * Remove padStart * Remove state from timer state card
5 lines
162 B
JavaScript
5 lines
162 B
JavaScript
export default function durationToSeconds(duration) {
|
|
const parts = duration.split(':').map(Number);
|
|
return (parts[0] * 3600) + (parts[1] * 60) + parts[2];
|
|
}
|