• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

skodaconnect / myskoda / 15323264009
85%

Build:
DEFAULT BRANCH: main
Ran 29 May 2025 11:55AM UTC
Jobs 1
Files 39
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2025 11:54AM UTC coverage: 86.946% (+0.7%) from 86.233%
15323264009

push

github

web-flow
BREAKING CHANGE: MQTT Event model overhaul (#438)

* refactor!: MQTT Event model overhaul

BREAKING CHANGE: this changes all MQTT Event models and will require
clients, including homeassistant-myskoda, to update accordingly.

Main changes:
- "Flatten" event classes. Everything is now in a single object, rather
than having, for e.g., a `EventCharging` with inside a `ServiceEvent`.
So no more `event.event.data`, but just `event.data`
- Use mashumaro descriminators to automatically parse an MQTT payload
into the 'correct' model class. No more generics. There are two
descriminator levels: In `BaseEvent` the `event_type` (`EventType`)
determines if the event is a `VehicleEvent`, `ServiceEvent`,
`OperationEvent` or `AccountEvent`. In `ServiceEvent` the `name`
(`ServiceEventName`) determines the exact Service Event class.
- This means `MySkodaMqttClient._parse_topic()` no longer needs a huge
`if-elif` contraption, inspecting the event_type and topic to pick the
correct class to use. We just create a `BaseEvent` instance if
automatically get the correct subclass.
- `models/event/base.py` provides a helper `event_factory` for this,
using the original topic and payload to return the event object, in just
a few lines of code.
- Group all event model code in a new sub-package,
`myskoda.models.event`.

Fixes #405

* chore!: bump minimum Python version to 3.13

BREAKING CHANGE: will break installations on Pyton < 3.13

Mostly because we want to use https://docs.python.org/3/library/enum.html#enum.EnumType._add_value_alias

* refactor: replace custom deserialization with Enum aliases

2238 of 2574 relevant lines covered (86.95%)

0.87 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
18
85.81
1.65% mqtt.py
118
58.47
-0.05% myskoda.py
Jobs
ID Job ID Ran Files Coverage
1 15323264009.1 29 May 2025 11:55AM UTC 39
86.95
GitHub Action Run
Source Files on build 15323264009
  • Tree
  • List 39
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15323264009
  • e8287226 on github
  • Prev Build on main (#15256584721)
  • Next Build on main (#15329402138)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc