From 63fa08b9dc8eb1833528f2e873032adfa333d0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn=20Gonz=C3=A1lez?= Date: Fri, 3 Jul 2020 23:27:11 +0200 Subject: [PATCH] Fix period hours in electric-car tariff --- dist/pvpc-hourly-pricing-card.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/pvpc-hourly-pricing-card.js b/dist/pvpc-hourly-pricing-card.js index 5a36b5b..f3a1bee 100644 --- a/dist/pvpc-hourly-pricing-card.js +++ b/dist/pvpc-hourly-pricing-card.js @@ -597,12 +597,12 @@ class PVPCHourlyPricingCard extends LitElement { break; case 'electric_car': const hours = new Date().getHours(); - if (hours >= 13 && hours < 23) { + if (hours >= 1 && hours < 7) { + period = 'super-valley'; + } else if (hours >= 13 && hours < 23) { period = 'peak'; - } else if (hours >= 1 && hours < 3) { - period = 'valley'; } else { - period = 'super-valley'; + period = 'valley'; } break; default: