MMM GoogleTask implementation - MMRIZE/MMM-CalendarExt3 GitHub Wiki
This cannot be done by the CX3 module itself; you need MMM-ModuleMonkeyPatch
.
{
module: "MMM-ModuleMonkeyPatch",
config: {
patches: [
{
module: "MMM-GoogleTasks",
method: "socketNotificationReceived",
patch: function (original, args) {
const [notification, payload] = args
const ret = original(notification, payload)
const tasks = this.tasks || []
const items = tasks.map((item) => {
const symbolMap = {
'needsAction': 'circle',
'completed': 'check',
'canceled': 'times',
}
const startDate = (item?.due) ? new Date(item.due) : new Date()
return {
title: item.title,
startDate: startDate.valueOf(),
endDate: (item?.completed) ? new Date(item.completed) : new Date(startDate.valueOf()),
description: item.notes,
location: item.selfLink,
symbol: [ symbolMap[item.status] ],
calendarName: 'GoogleTasks',
color: 'red',
fullDayEvent: true
}
})
this.sendNotification('CALENDAR_EVENTS', items)
return ret
}
}
]
}
}
But, MMM-GoogleTasks lost the time information of due
, so I can not revive the exact due
time. MMM-GoogleTasks is missing the details of events. (e.g. fullday event or not, due time, ...) So this patching is limited.