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

added notification sensor with homework example #46

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

rine77
Copy link
Owner

@rine77 rine77 commented Nov 28, 2024

this sensor could be used for every EventType, not just homework

@rine77 rine77 linked an issue Nov 28, 2024 that may be closed by this pull request
@rine77 rine77 requested a review from bbirnbach November 28, 2024 14:58
@rine77 rine77 self-assigned this Nov 28, 2024
Copy link
Collaborator

@bbirnbach bbirnbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 Ergänzungen bzw Fragen. Ansonsten funzt es wie es soll.

"""Return additional attributes."""

attributes = {"student": self._student_name}
attributes = {"unique_id": self._unique_id}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das überschreibt sich so gegenseitig, oder? Ist das so gewollt?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attributes ist ein dictionary, es wird gefüllt mit key/value paaren quasi


return attributes

class EventType:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statt dem eigens definierten EventType könnte man auch den aus der api direkt nutzen:
from edupage_api.timeline import EventType

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

das stimmt, hatte nicht gesehen, dass es das in der API gibt. Guter Tipp!

@rine77 rine77 merged commit 121420e into main Nov 29, 2024
4 checks passed
@rine77 rine77 deleted the 9-feature_request-load-messages-and-notifications branch November 29, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature_request] Load messages and notifications
2 participants