Skip to content
Michal Zaniewicz edited this page Nov 18, 2026 · 28 revisions

Librus Synergia fires Home Assistant bus events for new and changed items, for building your own automations. The ready-made blueprints wrap most of them, and each kind also has an event entity (New grade, New absence, ...) you can pick in the automation editor without knowing the event name.

Common rules

  • Every event carries entry_id and student (the child's name), so one automation can serve several children, and (versions after 0.12.37) device_id, the student's device - the logbook shows the event on that device's page too.
  • Nothing fires on the very first sync after setup: that run only records what's already there. What has been announced is saved, so something that arrives while Home Assistant is off still fires once it's back. Since 0.12.35, events found while Home Assistant is still starting are held until it has started (automations armed), then fired in order, a few seconds after the start - before, they could be lost.
  • Subject, teacher and category ids come with their resolved names (subject_id + subject, ...), so an automation doesn't need its own lookup.
  • id is Librus's id of the item (a string for some kinds).

In the automation editor

Versions after 0.12.37, on Home Assistant 2025.12 or newer: every event above is also a Librus trigger in the automation editor's list (New grade, Timetable change, New absence, ...), so you don't need the event name. Pick the student as the target (none: every student) and narrow it down:

Trigger Filters
New grade kind (ordinary, proposed, semester/final, text, descriptive, point, behaviour), subject, grade at most / at least (4- counts as 3.75; grades without a number never match a threshold)
New behaviour note positive / negative / neutral
New absence only unexcused
New lateness (since 0.12.48) subject
New message mailbox
New Agenda entry category words (sprawdzian, kartkówka - matched in the category and the text), subject
New homework subject
Timetable change cancelled / substitution / room change / moved, subject
Grade changed or removed changed / removed, subject (0.12.40+)
Agenda entry changed changed / removed
Justification decided accepted / rejected / other status
Forecast grade changed up / down, subject
School library lent / returned
Weekly AI summary ready version (parent / student)
New announcement, New school trip, New school document, Sent message read, Badge earned -

A subject filter takes part of the name, several separated by commas; case and Polish letters don't matter. In the actions, the event's data is in trigger ({{ trigger.subject }}, {{ trigger.value }}, {{ trigger.student }}); the Librus item id is trigger.item_id, because trigger.id is the automation's own trigger id.

In YAML:

triggers:
  - trigger: librus_synergia.new_grade
    target:
      device_id: <the student's device>
    options:
      grade_at_most: 2
conditions:
  - condition: librus_synergia.school_day
    options:
      day: tomorrow

Conditions read the student's own entities, so they say what the dashboard shows: School day (today / tomorrow), At school, Test within 24 hours, Lucky number is yours (today's number is the register number), Absences to justify. With several students, Students says whether any or all of them must match.

New items

Event Fires for Data
librus_synergia_new_grade A new grade, including a text, descriptive, point and behaviour grade subject_id, subject, value, teacher, category, weight, counts_to_average, comments (list), date, semester, improves (the value of the grade a correction replaces), average_before / average_after (the subject's average without and with this refresh's new grades, ordinary grades only - 0.12.22+), kind (normal / semester_proposition / semester / final_proposition / final / text / descriptive / point / behaviour). A descriptive grade also has skill (the skill it is for, the same as its category) and counts_to_average: false. The new descriptive grading some schools use for grade 1 from 2026 fires it too, also with kind: descriptive. A point grade (versions after 0.12.26) has the points as value, plus points, max_points and percentage; since 0.12.54 its comments holds the teacher's comments (before that it was always empty). A behaviour grade (versions after 0.12.26) has no subject; value is the short form (bdb, or the points), name the full name (bardzo dobre), month the month it is for (2026-10)
librus_synergia_new_note A new behaviour note positive, sentiment (positive / negative / neutral), teacher, text
librus_synergia_new_absence A new real absence (not "present"/"late") date, type, excused, lesson_no
librus_synergia_new_late The student is marked late ("Spóźnienie"; since 0.12.48) - Librus counts a lateness as present, so new_absence never covers it date, type, lesson_no, subject_id, subject
librus_synergia_new_announcement A new notice-board announcement subject, content (first 500 characters; 0.12.24+)
librus_synergia_new_message A new Wiadomości message in the inbox, or (versions after 0.12.26) in the substitutions, alerts or justifications mailbox sender, topic, mailbox (inbox / substitutions / alerts / justifications, versions after 0.12.26)
librus_synergia_new_homework A new Agenda entry (test, trip, meeting, ...) subject_id, subject, category, date, content (first 200 characters)
librus_synergia_new_homework_assignment A new real homework assignment ("zadanie domowe") topic, text (first 500 characters), date, due_date, teacher, subject_id, subject (worked out from the teacher; empty when that teacher teaches more than one subject)
librus_synergia_new_school_trip A new school trip destination, route, transport, date_from, date_to, coordinator
librus_synergia_new_school_document A new document the school shares with parents name, added, url
librus_synergia_library_changed The school library lent the student a book, or got one back action (lent / returned), id, title, author, lent_on

Changes

Event Fires when Data
librus_synergia_timetable_changed A lesson today or later newly turns up cancelled or as a substitution date, lesson_no, kind (canceled / substitution), subject_id, subject, hour_from, teacher, change (canceled / substitution / room_change / moved), room_changed, classroom, original_classroom, original_subject, original_teacher, original_date, original_lesson_no
librus_synergia_grade_changed A grade already announced is edited by the teacher (a 1 corrected to a 5, another weight, no longer counting towards the average) or deleted from Librus - 0.12.40+ change (changed / removed) plus the same fields as librus_synergia_new_grade, kind being the grade's kind (every kind: ordinary, point, text, descriptive, behaviour). For changed also changed_fields (from value, points, max_points, weight, counts_to_average) and the old values in previous; a renamed category or a new comment isn't an edit. Ordinary grades also carry average_before / average_after. A grade counts as removed once it is missing from two refreshes in a row; more than five changes of one kind at once (a category reweighted) and a new school year are recorded quietly. Since since 0.12.42 an edit is also kept on the grade itself (changed_at / previous in the grade lists, see Entities)
librus_synergia_agenda_changed An upcoming Agenda entry changes or disappears from Librus kind (changed / removed), date, time_from, content, category_id, category, subject_id, subject; for changed also changed_fields and the old values in previous (e.g. a test moved to another day)
librus_synergia_justification_status The school decides on an absence justification you sent status, previous_status, accepted, rejected, date_from, date_to, justified_absences, message, teachers
librus_synergia_forecast_changed A subject's forecast report-card grade moves up or down (not when you change the thresholds, the average mode or the point scales under Configure) subject_id, subject, old, new, direction (up / down), average, percentage (set only for a point-graded subject - then average is that percentage too), sixes_to_next, ones_to_drop
librus_synergia_message_read A recipient reads a message you sent (sent in the last 30 days; the newest five are checked, at most once an hour) id, topic, receiver, group, read_date, send_date

Other

Event Fires when Data
librus_synergia_achievement_unlocked A badge (or a tier of one) is earned. 20 badges, counted from the whole school year (point grades count as 1-6 grades once point_grade_thresholds gives their subject a scale; not for the correction badge): first 6; 5/10/25 sixes; 5/10/20 good grades in a row; hat-trick (3 sixes in 7 days); a test at 5+; subject average 5.5+ (3+ grades); honours average; a correction to a higher grade; a semester without a 1; 7/30/90 days without an absence; a full month without absence or lateness; 30 school days without being late; 20 lessons of a subject without an absence; 7/30/90 days without a negative note; first praise; 3/5 praises; exemplary or very good behaviour grade; lucky number equal to the register number; 10/25 homework ticked in the to-do list; the finished school year. Badges belong to one school year: each key fires once and isn't taken back until a new school year starts them over (quietly). Only a badge earned in the last 7 days fires; the first sync (also right after updating to 0.12.5) and badges whose data only arrived later (with an older date) are recorded silently. Świadectwo z paskiem is earned only after the school year ends id (e.g. good_grade_streak_10, sixes_25, comeback), title, date (when it was earned; the honours average, lucky number and homework badges get the day they were first seen)
librus_synergia_weekly_summary The weekly AI summary is ready - once per text, so twice with Written to: Parent and student; audience is parent or student manual, headline, status, sections, advice, warning, summary, week_from, week_to, audience, labels

Clone this wiki locally