github delphiki/hass-pronote 2.0.0

latest releases: 2.1.0, 2.0.3, 2.0.2...
9 days ago

New 2.0.0 version!

🚨 BREAKING CHANGES

This new version changes the way the sensors are built.
Due to these changes, some sensors' names won't be backward compatible.
Affected sensors:

v1 name v2 name
sensor.pronote_[...]_timetable_period sensor.pronote_[...]_period_s_timetable
sensor.pronote_[...]_timetable_today sensor.pronote_[...]_today_s_timetable
sensor.pronote_[...]_timetable_tomorrow sensor.pronote_[...]_tomorrow_s_timetable
sensor.pronote_[...]_timetable_next_day sensor.pronote_[...]_next_day_s_timetable
sensor.pronote_[...]_homework_period sensor.pronote_[...]_period_s_homework

What's new:

📆 Periods are now handled!

Period related sensors are now available!
For example, for the Grades, if the current period is "Trimestre 3", you'll get 3 sensors:

Sensor Description
sensor.pronote_LASTNAME_FIRSTNAME_grades the grades sensor for the current period
sensor.pronote_LASTNAME_FIRSTNAME_grades_trimestre_2 the grades from second trimester
sensor.pronote_LASTNAME_FIRSTNAME_grades_trimestre_1 the grades from first trimester

The period related sensors are:

  • Grades
  • Averages
  • Absenses
  • Delays
  • Evaluations
  • Punishments

For all those sensors (and derived based on previous periods), you'll find 2 extra attributes:

Attribute Description Value
period_key the period the sensor is related to timestre_1, semestre_1, ...
is_current_period if the sensor is related to the current period true or false

You'll also find additional sensors with information about the periods:

Sensor Description State
sensor.pronote_LASTNAME_FIRSTNAME_current_period the current period the period name
sensor.pronote_LASTNAME_FIRSTNAME_periods list of all periods returned by Pronote number of periods
sensor.pronote_LASTNAME_FIRSTNAME_active_periods list of previous + current periods number of periods
sensor.pronote_LASTNAME_FIRSTNAME_previous_periods list of previous periods number of periods

⚙️ Define nickname in config flow

The nickname option can now be specified in a extra step during the config flow.
The field is pre-filled with a guessed value.
Pronote only returns the student's full name, so I try to determine the firstname (= nickname) by splitting the full name on spaces and only keeping the last item.
For example, if the full name was DOE SMITH John, the. guessed nickname would be John.

Other

  • student sensor has been replaced with the class sensor, and full_name and nickname are now inherited attributes for all sensors
  • HACS release are now zipped and available in the releases page

Full Changelog: 1.15.5...2.0.0

Don't miss a new hass-pronote release

NewReleases is sending notifications on new releases.