Skip to content

About

Home Assistant integration for Class Charts to track school timetables & homework

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

🏫 Class Charts for Home Assistant

Version Platform hacs_badge

A modern, UI-configurable integration that brings your Class Charts school timetable and homework tracking directly into Home Assistant.


πŸ›  Features

  • πŸ‘¨β€πŸ« Multi Pupil Support: During setup the integration creates separate sensors for each child.
  • πŸ“… Timetable Calendar: See lessons, teachers, and room numbers.
  • πŸ“… Homework Calendar: Track assignments and due dates.
  • 🎭 Behaviour Tracking: Keep track of student conduct.
  • πŸ“… Native Calendar Support: Syncs your entire school timetable to the HA Calendar.
  • βš™οΈ UI Configuration: No YAML required. Setup and adjust settings directly in the UI.
  • πŸ“ Homework Tracking: Detailed sensors for outstanding, completed, and total tasks.
  • πŸ‘¨β€πŸ« Lesson Monitoring: Know exactly what lesson is on now and what's coming up next.
  • πŸ”„ Adjustable Date Range: Sync 1 to 30 days of lessons via the "Configure" menu.
  • βš™οΈ Set Update Interval: Configure the data synchronization rate.
  • πŸ“… Total Outstanding Homework: A dedicated Total Outstanding Homework sensor, All homework pending regardless of when it is due & bypassing the default "current week" boundary.

πŸ“¦ Installation

Option 1: HACS (Recommended)

  1. Open HACS > Integrations.
  2. Click the three dots (top right) > Custom repositories.
  3. Paste your Repo URL: https://github.com/skid88/Classcharts
  4. Category: Integration.
  5. Download and Restart Home Assistant.

Option 2: Manual

  1. Copy the classcharts folder to your /config/custom_components/ directory.
  2. Restart Home Assistant.

βš™οΈ Configuration

  1. Go to Settings > Devices & Services.
  2. Click Add Integration > Search for Class Charts.
  3. Enter your Email, Password, and Pupil ID.
  4. To change settings later, click Configure on the integration card.

βš™οΈ Options

This integration supports a dynamic Options Flow. You can adjust how the integration behaves at any time:

  1. Navigate to Settings > Devices & Services.
  2. Find Class Charts and click Configure.

Available Settings

Option Default Description
Refresh Interval 24 How often (in minutes) the integration updates data from Class Charts.
Days to Fetch 14 How many days into the future to look for events/homework.
Show Completed Homework True Toggle to show/hide homework assignments marked as "Completed" in Class Charts.
Show "No School True Toggle to inject placeholder events on empty weekend days and holiday slots.

Calendars

Class Charts Timetable

A daily view of school lessons.

  • Summary: Subject Name
  • Location: Room Number
  • Description: Teacher Name

Class Charts Homework

A view of all homework assignments.

  • Summary: Subject and Assignment title.
  • Description: Full task description (HTML formatting removed for readability).
  • Filtering: Use the Configuration menu to hide completed tasks to keep your "To-Do" list clear.

Behaviour Tracking

  • Keep track of student conduct, achievements, and recent awards directly in your dashboard.Behaviour Balance: A net score sensor (Positive points minus Negative points).Total Points: A cumulative sensor for all positive points earned.Recent Activity Feed: Detailed logs of recent behaviour events, including the reason, the teacher involved, and the timestamp.Top Achievements: Automatically identifies and lists the most frequent reasons for positive awards.

Screenshot Screenshot

Available Entities

Calendars

Entity ID Description
calendar.class_charts_[student_name]_timetable Your daily school timetable (Lessons, Rooms, Teachers).
calendar.class_charts_[student_name]_homework Due dates for all assignments as calendar events.

Homework Sensors

Entity ID Description
sensor.class_charts_[student_name]_outstanding_homework Count of active homework. Includes a list in attributes.
sensor.class_charts_[student_name]_homework_due Count of homework tasks due this week.
sensor.class_charts_[student_name]_completed_homework Total number of tasks marked as completed.
sensor.class_charts_alice_browne_total_outstanding_homework All uncompleted homework tasks (bypassing the default "current week" API boundary).

Lesson Monitoring

Entity ID Description
sensor.class_charts_[student_name]_current_lesson The subject you should be in right now.
sensor.class_charts_[student_name]_next_lesson The subject coming up next.

Behavior Sensors

Entity ID Friendly Name Native State Description
sensor.class_charts_[student_name]_behaviour_balance Behavior Balance int Net total score (Positive points minus Negative incidents).
sensor.class_charts_[student_name]_behaviour_positive Behavior Positive int Running total of all positive praise points earned.
sensor.class_charts_[student_name]_behaviour_negative Behavior Negative int Running total of all negative discipline/incident points.

State Attributes

All behavior sensors expose the following diagnostic and historical data in their state attributes:

  • recent_activity (list): A collection of the 10 most recent behavior incidents or praise logs.

Screenshot Screenshot

🎨 Dashboard: Homework List

Use a Markdown Card to display your assignments beautifully:

## πŸ“ Outstanding Homework
{% set items = state_attr('sensor.class_charts_alice_browne_outstanding_homework', 'homework_list') or [] %}
{% set today = today_at("00:00").replace(tzinfo=None) %}
{% set next_week = today + timedelta(days=14) %}
{% set active_homework = namespace(count=0) %}

### Homework Due This Week

{% if items | length == 0 %}
βœ… No homework found!
{% else %}
  {% for item in items %}
    {# Use the clean YYYY-MM-DD key for python math #}
    {% set due_date = as_datetime(item.due_date).replace(tzinfo=None) %}
    
    {% if due_date >= today and due_date <= next_week %}
      {% set active_homework.count = active_homework.count + 1 %}
**{{ item.subject }}** -  {{ item.title }}
Due: {{ item.due_date_formatted }}

    {% endif %}
  {% endfor %}

  {% if active_homework.count == 0 %}
βœ… All caught up for the next 7 days!
  {% endif %}
{% endif %}

🎨 Custom Markdown Card (Listing All Unticked Tasks)

Because the integration now maps granular ticked and completed fields and extends the list size, you can build a comprehensive markdown card to list upcoming homework:

## πŸ“š Total Outstanding Homework
{% set hw_list = state_attr('sensor.class_charts_alice_browne_outstanding_homework', 'homework_list') or [] -%}
{% set outstanding = hw_list | selectattr('ticked', 'eq', 'no') | list -%}

{% if outstanding | count > 0 -%}
{% for item in outstanding -%}
{% set subject_name = item.subject if item and item.subject and item.subject != 'None' else 'General' -%}
- **{{ subject_name }}**: {{ item.title }}  
  _(Due: {{ item.due_date_formatted }})_
{% if not loop.last %}
---
{% endif %}
{%- endfor %}
{% else -%}
πŸŽ‰ All homework is completed!
{%- endif %}

βš–οΈ Disclaimer

This is a personal, open-source project and is completely unofficial. This integration is independently developed and maintained. It is not endorsed, supported, affiliated, or associated with Class Charts or its parent company, Edukey Education Ltd / Tes Global.

  • Use at your own risk: This software is provided "as is" without any guarantees or warranties.
  • No official support: Please do not contact Class Charts technical support regarding issues with this Home Assistant integration. If you find a bug or want to request a feature, please open an issue directly in this GitHub repository.
  • Trademarks: All product names, logos, and brands are property of their respective owners.

🀝 Support

If you encounter any issues or have feature requests, please open an Issue on this repository.


πŸ“ License

This project is for personal use and is not an official Class Charts product.

About

Home Assistant integration for Class Charts to track school timetables & homework

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages