Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexibility for week-type signals #1265

Open
melange396 opened this issue Dec 3, 2024 · 0 comments
Open

More flexibility for week-type signals #1265

melange396 opened this issue Dec 3, 2024 · 0 comments
Labels
design enhancement New feature or request

Comments

@melange396
Copy link
Contributor

At least change this:

...[CASES, HOSPITAL_ADMISSION, DEATHS].map((s) => {
// As DEATHS sensor is weekly based, we need to add 6 days to the max date of DEATHS sensor to get the last day of the week.
if (s.name === 'COVID Deaths') {
return s.timeFrame.max.getTime() + 6 * 24 * 60 * 60 * 1000; // add 6 days to the max date of DEATHS sensor to get the last day of the week.
} else {
return s.timeFrame.max;
}

so line 38 is: if (s.name === DEATHS.name) {
(the current "deaths" dashboard signal is weekly)

...or better yet, do deeper inspection and check the time_type of each of those 3 signals.

@melange396 melange396 added enhancement New feature or request design labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant