Skip to content

More flexibility for week-type signals #1265

@melange396

Description

@melange396

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions