mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix error in recurrence calculation of Habitica integration (#142759)
Fix error in rrule calculation of Habitica integration
This commit is contained in:
parent
c1c5776d85
commit
33a185dade
@ -74,7 +74,7 @@ def build_rrule(task: TaskData) -> rrule:
|
||||
|
||||
bysetpos = None
|
||||
if rrule_frequency == MONTHLY and task.weeksOfMonth:
|
||||
bysetpos = task.weeksOfMonth
|
||||
bysetpos = [i + 1 for i in task.weeksOfMonth]
|
||||
weekdays = weekdays if weekdays else [MO]
|
||||
|
||||
return rrule(
|
||||
|
@ -624,6 +624,49 @@
|
||||
"isDue": false,
|
||||
"id": "6e53f1f5-a315-4edd-984d-8d762e4a08ef"
|
||||
},
|
||||
{
|
||||
"repeat": {
|
||||
"m": false,
|
||||
"t": false,
|
||||
"w": false,
|
||||
"th": false,
|
||||
"f": false,
|
||||
"s": false,
|
||||
"su": true
|
||||
},
|
||||
"challenge": {},
|
||||
"group": {
|
||||
"completedBy": {},
|
||||
"assignedUsers": []
|
||||
},
|
||||
"_id": "369afeed-61e3-4bf7-9747-66e05807134c",
|
||||
"frequency": "monthly",
|
||||
"everyX": 1,
|
||||
"streak": 1,
|
||||
"nextDue": ["2024-12-14T23:00:00.000Z", "2025-01-18T23:00:00.000Z"],
|
||||
"yesterDaily": true,
|
||||
"history": [],
|
||||
"completed": false,
|
||||
"collapseChecklist": false,
|
||||
"type": "daily",
|
||||
"text": "Monatliche Finanzübersicht erstellen",
|
||||
"notes": "Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.",
|
||||
"tags": [],
|
||||
"value": -0.9215181434950852,
|
||||
"priority": 1,
|
||||
"attribute": "str",
|
||||
"byHabitica": false,
|
||||
"startDate": "2024-04-04T22:00:00.000Z",
|
||||
"daysOfMonth": [],
|
||||
"weeksOfMonth": [0],
|
||||
"checklist": [],
|
||||
"reminders": [],
|
||||
"createdAt": "2024-04-04T22:00:00.000Z",
|
||||
"updatedAt": "2024-04-04T22:00:00.000Z",
|
||||
"userId": "5f359083-ef78-4af0-985a-0b2c6d05797c",
|
||||
"isDue": false,
|
||||
"id": "369afeed-61e3-4bf7-9747-66e05807134c"
|
||||
},
|
||||
{
|
||||
"repeat": {
|
||||
"m": false,
|
||||
|
@ -66,7 +66,8 @@
|
||||
"564b9ac9-c53d-4638-9e7f-1cd96fe19baa",
|
||||
"f2c85972-1a19-4426-bc6d-ce3337b9d99f",
|
||||
"2c6d136c-a1c3-4bef-b7c4-fa980784b1e1",
|
||||
"6e53f1f5-a315-4edd-984d-8d762e4a08ef"
|
||||
"6e53f1f5-a315-4edd-984d-8d762e4a08ef",
|
||||
"369afeed-61e3-4bf7-9747-66e05807134c"
|
||||
],
|
||||
"habits": ["1d147de6-5c02-4740-8e2f-71d3015a37f4"]
|
||||
},
|
||||
|
@ -87,6 +87,20 @@
|
||||
'summary': 'Fitnessstudio besuchen',
|
||||
'uid': '2c6d136c-a1c3-4bef-b7c4-fa980784b1e1',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Klicke um den Namen Deines aktuellen Projekts anzugeben & setze einen Terminplan!',
|
||||
'end': dict({
|
||||
'date': '2024-09-23',
|
||||
}),
|
||||
'location': None,
|
||||
'recurrence_id': None,
|
||||
'rrule': 'FREQ=MONTHLY;BYSETPOS=4;BYDAY=SU',
|
||||
'start': dict({
|
||||
'date': '2024-09-22',
|
||||
}),
|
||||
'summary': 'Arbeite an einem kreativen Projekt',
|
||||
'uid': '6e53f1f5-a315-4edd-984d-8d762e4a08ef',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Klicke um Änderungen zu machen!',
|
||||
'end': dict({
|
||||
@ -563,6 +577,20 @@
|
||||
'summary': 'Fitnessstudio besuchen',
|
||||
'uid': '2c6d136c-a1c3-4bef-b7c4-fa980784b1e1',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'end': dict({
|
||||
'date': '2024-10-07',
|
||||
}),
|
||||
'location': None,
|
||||
'recurrence_id': None,
|
||||
'rrule': 'FREQ=MONTHLY;BYSETPOS=1;BYDAY=SU',
|
||||
'start': dict({
|
||||
'date': '2024-10-06',
|
||||
}),
|
||||
'summary': 'Monatliche Finanzübersicht erstellen',
|
||||
'uid': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Klicke um Änderungen zu machen!',
|
||||
'end': dict({
|
||||
|
@ -1193,6 +1193,81 @@
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
'byHabitica': False,
|
||||
'challenge': dict({
|
||||
'broken': None,
|
||||
'id': None,
|
||||
'shortName': None,
|
||||
'taskId': None,
|
||||
'winner': None,
|
||||
}),
|
||||
'checklist': list([
|
||||
]),
|
||||
'collapseChecklist': False,
|
||||
'completed': False,
|
||||
'counterDown': None,
|
||||
'counterUp': None,
|
||||
'createdAt': '2024-04-04T22:00:00+00:00',
|
||||
'date': None,
|
||||
'daysOfMonth': list([
|
||||
]),
|
||||
'down': None,
|
||||
'everyX': 1,
|
||||
'frequency': 'monthly',
|
||||
'group': dict({
|
||||
'assignedDate': None,
|
||||
'assignedUsers': list([
|
||||
]),
|
||||
'assignedUsersDetail': dict({
|
||||
}),
|
||||
'assigningUsername': None,
|
||||
'completedBy': dict({
|
||||
'date': None,
|
||||
'userId': None,
|
||||
}),
|
||||
'id': None,
|
||||
'managerNotes': None,
|
||||
'taskId': None,
|
||||
}),
|
||||
'history': list([
|
||||
]),
|
||||
'id': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
'isDue': False,
|
||||
'nextDue': list([
|
||||
'2024-12-14T23:00:00+00:00',
|
||||
'2025-01-18T23:00:00+00:00',
|
||||
]),
|
||||
'notes': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'priority': 1,
|
||||
'reminders': list([
|
||||
]),
|
||||
'repeat': dict({
|
||||
'f': False,
|
||||
'm': False,
|
||||
's': False,
|
||||
'su': True,
|
||||
't': False,
|
||||
'th': False,
|
||||
'w': False,
|
||||
}),
|
||||
'startDate': '2024-04-04T22:00:00+00:00',
|
||||
'streak': 1,
|
||||
'tags': list([
|
||||
]),
|
||||
'text': 'Monatliche Finanzübersicht erstellen',
|
||||
'type': 'daily',
|
||||
'up': None,
|
||||
'updatedAt': '2024-04-04T22:00:00+00:00',
|
||||
'userId': '5f359083-ef78-4af0-985a-0b2c6d05797c',
|
||||
'value': -0.9215181434950852,
|
||||
'weeksOfMonth': list([
|
||||
0,
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
@ -3465,6 +3540,81 @@
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
'byHabitica': False,
|
||||
'challenge': dict({
|
||||
'broken': None,
|
||||
'id': None,
|
||||
'shortName': None,
|
||||
'taskId': None,
|
||||
'winner': None,
|
||||
}),
|
||||
'checklist': list([
|
||||
]),
|
||||
'collapseChecklist': False,
|
||||
'completed': False,
|
||||
'counterDown': None,
|
||||
'counterUp': None,
|
||||
'createdAt': '2024-04-04T22:00:00+00:00',
|
||||
'date': None,
|
||||
'daysOfMonth': list([
|
||||
]),
|
||||
'down': None,
|
||||
'everyX': 1,
|
||||
'frequency': 'monthly',
|
||||
'group': dict({
|
||||
'assignedDate': None,
|
||||
'assignedUsers': list([
|
||||
]),
|
||||
'assignedUsersDetail': dict({
|
||||
}),
|
||||
'assigningUsername': None,
|
||||
'completedBy': dict({
|
||||
'date': None,
|
||||
'userId': None,
|
||||
}),
|
||||
'id': None,
|
||||
'managerNotes': None,
|
||||
'taskId': None,
|
||||
}),
|
||||
'history': list([
|
||||
]),
|
||||
'id': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
'isDue': False,
|
||||
'nextDue': list([
|
||||
'2024-12-14T23:00:00+00:00',
|
||||
'2025-01-18T23:00:00+00:00',
|
||||
]),
|
||||
'notes': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'priority': 1,
|
||||
'reminders': list([
|
||||
]),
|
||||
'repeat': dict({
|
||||
'f': False,
|
||||
'm': False,
|
||||
's': False,
|
||||
'su': True,
|
||||
't': False,
|
||||
'th': False,
|
||||
'w': False,
|
||||
}),
|
||||
'startDate': '2024-04-04T22:00:00+00:00',
|
||||
'streak': 1,
|
||||
'tags': list([
|
||||
]),
|
||||
'text': 'Monatliche Finanzübersicht erstellen',
|
||||
'type': 'daily',
|
||||
'up': None,
|
||||
'updatedAt': '2024-04-04T22:00:00+00:00',
|
||||
'userId': '5f359083-ef78-4af0-985a-0b2c6d05797c',
|
||||
'value': -0.9215181434950852,
|
||||
'weeksOfMonth': list([
|
||||
0,
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
@ -4608,6 +4758,81 @@
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
'byHabitica': False,
|
||||
'challenge': dict({
|
||||
'broken': None,
|
||||
'id': None,
|
||||
'shortName': None,
|
||||
'taskId': None,
|
||||
'winner': None,
|
||||
}),
|
||||
'checklist': list([
|
||||
]),
|
||||
'collapseChecklist': False,
|
||||
'completed': False,
|
||||
'counterDown': None,
|
||||
'counterUp': None,
|
||||
'createdAt': '2024-04-04T22:00:00+00:00',
|
||||
'date': None,
|
||||
'daysOfMonth': list([
|
||||
]),
|
||||
'down': None,
|
||||
'everyX': 1,
|
||||
'frequency': 'monthly',
|
||||
'group': dict({
|
||||
'assignedDate': None,
|
||||
'assignedUsers': list([
|
||||
]),
|
||||
'assignedUsersDetail': dict({
|
||||
}),
|
||||
'assigningUsername': None,
|
||||
'completedBy': dict({
|
||||
'date': None,
|
||||
'userId': None,
|
||||
}),
|
||||
'id': None,
|
||||
'managerNotes': None,
|
||||
'taskId': None,
|
||||
}),
|
||||
'history': list([
|
||||
]),
|
||||
'id': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
'isDue': False,
|
||||
'nextDue': list([
|
||||
'2024-12-14T23:00:00+00:00',
|
||||
'2025-01-18T23:00:00+00:00',
|
||||
]),
|
||||
'notes': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'priority': 1,
|
||||
'reminders': list([
|
||||
]),
|
||||
'repeat': dict({
|
||||
'f': False,
|
||||
'm': False,
|
||||
's': False,
|
||||
'su': True,
|
||||
't': False,
|
||||
'th': False,
|
||||
'w': False,
|
||||
}),
|
||||
'startDate': '2024-04-04T22:00:00+00:00',
|
||||
'streak': 1,
|
||||
'tags': list([
|
||||
]),
|
||||
'text': 'Monatliche Finanzübersicht erstellen',
|
||||
'type': 'daily',
|
||||
'up': None,
|
||||
'updatedAt': '2024-04-04T22:00:00+00:00',
|
||||
'userId': '5f359083-ef78-4af0-985a-0b2c6d05797c',
|
||||
'value': -0.9215181434950852,
|
||||
'weeksOfMonth': list([
|
||||
0,
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
@ -5199,6 +5424,81 @@
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
'byHabitica': False,
|
||||
'challenge': dict({
|
||||
'broken': None,
|
||||
'id': None,
|
||||
'shortName': None,
|
||||
'taskId': None,
|
||||
'winner': None,
|
||||
}),
|
||||
'checklist': list([
|
||||
]),
|
||||
'collapseChecklist': False,
|
||||
'completed': False,
|
||||
'counterDown': None,
|
||||
'counterUp': None,
|
||||
'createdAt': '2024-04-04T22:00:00+00:00',
|
||||
'date': None,
|
||||
'daysOfMonth': list([
|
||||
]),
|
||||
'down': None,
|
||||
'everyX': 1,
|
||||
'frequency': 'monthly',
|
||||
'group': dict({
|
||||
'assignedDate': None,
|
||||
'assignedUsers': list([
|
||||
]),
|
||||
'assignedUsersDetail': dict({
|
||||
}),
|
||||
'assigningUsername': None,
|
||||
'completedBy': dict({
|
||||
'date': None,
|
||||
'userId': None,
|
||||
}),
|
||||
'id': None,
|
||||
'managerNotes': None,
|
||||
'taskId': None,
|
||||
}),
|
||||
'history': list([
|
||||
]),
|
||||
'id': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
'isDue': False,
|
||||
'nextDue': list([
|
||||
'2024-12-14T23:00:00+00:00',
|
||||
'2025-01-18T23:00:00+00:00',
|
||||
]),
|
||||
'notes': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'priority': 1,
|
||||
'reminders': list([
|
||||
]),
|
||||
'repeat': dict({
|
||||
'f': False,
|
||||
'm': False,
|
||||
's': False,
|
||||
'su': True,
|
||||
't': False,
|
||||
'th': False,
|
||||
'w': False,
|
||||
}),
|
||||
'startDate': '2024-04-04T22:00:00+00:00',
|
||||
'streak': 1,
|
||||
'tags': list([
|
||||
]),
|
||||
'text': 'Monatliche Finanzübersicht erstellen',
|
||||
'type': 'daily',
|
||||
'up': None,
|
||||
'updatedAt': '2024-04-04T22:00:00+00:00',
|
||||
'userId': '5f359083-ef78-4af0-985a-0b2c6d05797c',
|
||||
'value': -0.9215181434950852,
|
||||
'weeksOfMonth': list([
|
||||
0,
|
||||
]),
|
||||
'yesterDaily': True,
|
||||
}),
|
||||
dict({
|
||||
'alias': None,
|
||||
'attribute': 'str',
|
||||
|
@ -49,6 +49,13 @@
|
||||
'summary': 'Arbeite an einem kreativen Projekt',
|
||||
'uid': '6e53f1f5-a315-4edd-984d-8d762e4a08ef',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Setze dich einmal im Monat hin, um deine Einnahmen und Ausgaben zu überprüfen und dein Budget zu planen.',
|
||||
'due': '2024-12-14',
|
||||
'status': 'needs_action',
|
||||
'summary': 'Monatliche Finanzübersicht erstellen',
|
||||
'uid': '369afeed-61e3-4bf7-9747-66e05807134c',
|
||||
}),
|
||||
dict({
|
||||
'description': 'Wähle eine Programmiersprache aus, die du noch nicht kennst, und lerne die Grundlagen.',
|
||||
'status': 'needs_action',
|
||||
@ -151,7 +158,7 @@
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '4',
|
||||
'state': '5',
|
||||
})
|
||||
# ---
|
||||
# name: test_todos[todo.test_user_to_do_s-entry]
|
||||
|
Loading…
x
Reference in New Issue
Block a user