Repository navigation
Releases
openGym 0.12.0
What's new since 0.11.4
Three new features. No migration, existing entity IDs unchanged; a few entities are added on setup.
New
Event entities
event.opengym_workout_finished,event.opengym_personal_record,event.opengym_weigh_inand — on instances with a coach —event.opengym_coach_result.- The state is the time of the last event; details (name, volume, sets, duration, records, weight) arrive as attributes.
- Selectable in the automation editor without YAML. They listen to the same HA events the webhooks and coach results already use, so nothing arrives on a second path.
Training recommendation
sensor.opengym_training_recommendation: only recovered muscle groups qualify, using the same recovery model as the muscle card. Of those, the ones furthest below their weekly target and longest untrained come first, and the routine that hits exactly those — without loading the fatigued ones — is picked.- State is e.g. "upper back, biceps and calves", rest or free choice; the
textattribute holds the full sentence for notifications. - Voice: "What should I train today?" / "Was soll ich heute trainieren?"
Coach by voice and service
opengym.coach_askandopengym.coach_debriefreturn the answer as a response and wait up towaitseconds (default 60).- Every result also fires
opengym_coach_answer/opengym_coach_debrief, updatesevent.opengym_coach_resultand lands in the logbook. - With
notify: true, a late answer shows up as a Home Assistant notification. - Voice: "Ask the coach whether …" / "Frag den Coach, ob …" and "How was my last workout?" / "Wie war mein letztes Training?" If the answer takes longer than ~25 s, Assist says so and the answer arrives as a notification.
- New option Coach: evaluate every new workout (off by default, it consumes the coach's daily quota).
- openGym rejections (busy, daily limit, missing consent) are shown with openGym's own message.
- Questions started in the openGym app stay there: Home Assistant only fetches and closes answers to its own questions.
Also fixed
- Muscle groups with a weekly target of 0–0 would still have been recommended.
- If openGym re-issued a task id, the integration would have returned a stale result.
Testing
python -m unittest discover tests: green (newtests/test_v012.py— recommendation, event attributes, coach texts).pytest tests_ha: 33 tests green against a real Home Assistant core, 10 of them new (tests_ha/test_features_012.py): event entities over real webhook calls, instances without a coach, recommendation sensor and voice command, coach question via service including closing the answer, app-originated answers left alone, late answer as notification, rejection (409) and failure, coach by voice, automatic evaluation after a new workout, and the en/de sentences end-to-end through the built-in voice agent.- The README test confirms every entity ID named there exists on a fresh install.
openGym 0.11.4
What's new since 0.11.3
Four bugs from the audit of 0.11.3, all fixed with a regression test that fails on the old code. No new features, no migration; entity IDs unchanged.
Fixed
- Options dialog on Home Assistant 2024.11.0–2024.11.3:
OpenGymOptionsFlowreadself.config_entry, which a plainOptionsFlowonly exposes from 2024.12.0. On our declared minimum version, opening Configure threw an AttributeError and nothing opened. The flow now keeps the entry core hands it inasync_get_options_flow(entry)— deliberately notOptionsFlowWithConfigEntry, which core reports as a deprecated pattern. - Muscle recovery never said "recovering":
muscle_daysstopped scanning when it had dates for 14 groups, while openGym's map fills 18 slugs. Muscles trained only in older sessions stayed at 999 days —calvesandadductorsreported "never trained" even after a leg day. - Set totals disagreed between entities: the muscle-balance state summed all 18 map slugs, the
weekly_sets_*sensors only the 14 with entities. Once serratus/obliques/hip-flexors/tibialis got sets, the card's total and the sensors drifted apart. Balance state, 12-week history and the card now share one basis; the per-muscle attributes keep openGym's full map for the body diagram. - Unsigned webhook deliveries were silent: an entry without a signing secret accepted every delivery without verification. It now raises a repair ("deliveries arrive unsigned", en/de) with the steps to fix it, instead of running unauthenticated in the background.
Also
- Logbook: icon fallback instead of a KeyError when openGym ships a new event type.
- Device triggers: a missing
testkey (YAML automations, setups before 0.11) now filters test deliveries like the UI default. - Update entity reads
client.base_urlinstead of the private_url; dead weight removed (unusedLOOKAHEAD_DAYS,snapshot._rev, unused constants and imports).
Testing
- 109 logic tests + 21 tests against a real Home Assistant core, both green; 10 of them new for this release.
openGym 0.11.3
What's new since 0.11.2
The hardening release after a deep review of the whole integration — every Python module and the 1800-line muscle card read line by line, every suspicious spot re-proved with executable counter-checks. No new features, no migration; entity IDs unchanged.
Fixed
- Pairing twice is now impossible: the config flow's unique id is the hashed openGym user id, so adding the same account a second time aborts with "already configured" instead of creating a duplicate integration entry.
- Cleaner errors:
trigger_test_eventwithout a webhook connection in openGym shows a readable "No webhook connection found" dialog instead of a generic "Unexpected error". weekStarteverywhere: openGym's "week starts on Sunday" setting moved only the week streak — week volume, workout counts, weekly muscle sets, the week/plan cards and the history heatmap disagreed with it. Every weekly window now follows the setting.- Statistics import: the whole history was re-fed into the recorder on every revision bump, even when only settings or the plan changed. A history fingerprint now skips imports that would not change anything.
total_lifting: deleting a workout in openGym made thetotal_increasingcounter book a negative jump in long-term statistics; it is a plain measurement now.
Housekeeping
- Removed dead weight: the unused
PRESENCE_MAX_AGEconstant and the never-readpending_eventslist.
Testing
- 100 logic tests + 21 tests against a real Home Assistant core, both green; 9 of them new for this release (stable unique id with abort on second pairing, clean service error, statistics-once, weekStart windows,
total_liftingstate class).
openGym 0.11.2
What's new since 0.11.1
A small follow-up: singular/plural wording in the cards and voice answers, plus two test hardenings. No behaviour changes beyond the wording fixes — no migration needed, entity IDs unchanged.
Fixed
- Singular/plural: the next-workout card and Assist said "1 exercises, 1 sets" for a single exercise or set. Both now say "1 exercise" / "1 set" (and the German "1 Übung" / "1 Satz").
- Entity names: added a test that fails if any entity would come up without a translated name (e.g. after a missing translation key).
- Tests: run in a fixed time zone so the suite no longer depends on the machine's local time.
Testing
- 95 logic tests + 19 tests against a real Home Assistant core, both green.
openGym 0.11.1
What's new since 0.11.0
A hardening release before going live in production: everything that broke or reported wrong numbers in real-world testing. No new features, no migration — existing entity IDs keep working.
Fixed
- WebSocket errors:
opengym:detailandopengym:progressanswered with a hard error while the first poll hadn't finished; muscle details and the progress card now show a clean "not ready" message. - Weigh-in units: a pound weigh-in on a kilogram profile (or vice versa) switched the whole profile's unit and flipped every weight sensor. Units are now converted to the profile's unit and never overwritten — in the service, the device action and voice alike.
- Voice safety: open-ended weight sentences like "record …" could capture unrelated commands; every sentence now requires a weight or unit, and typos are spoken back instead of failing silently.
- 1RM consistency: sensor, progress card and long-term statistics now use the same Epley calculation and skip warm-up and unticked sets.
- Time zones: "today", rest days, week values and the week rollover used the container's date (often UTC in Docker) instead of Home Assistant's — up to two hours off around midnight. Now all of them follow HA's time zone.
- Volume sensor:
volume_this_weekwastotal_increasing, which produced negative gaps in long-term statistics at every Monday reset; now a plain measurement. - Presence attributes: a
nullexercise index from openGym could make the active-workout sensor unavailable. - Auto webhook: a connection created without a revealed secret was re-created on every reload, piling up duplicates in openGym.
- Week card: several workouts on one day now merge into one entry.
- History calendar: descriptions use Home Assistant's language, umlauts included.
- Coach: exercise ids are compared as text (number vs. string no longer drops changes).
- Progress card: accounts without strength data showed "unreachable" instead of an empty card.
- Rest-timer slider: only restores a value you actually set in Home Assistant after a restart; otherwise it keeps following openGym's setting.
- Update entity: robust against malformed answers; "v1.2.3" is treated as "1.2.3".
Documentation
- README modernised: Quick Start section, architecture overview, grouped troubleshooting, Markdown tables (rendered correctly on GitHub).
Testing
- 90 logic tests + 13 tests against a real Home Assistant core, both green.
openGym v0.11.0 — Voice control, statistics & progress
Major feature release: openGym can now be controlled by voice, appears in the logbook and brings your complete training history into Home Assistant's long-term statistics. There is also a fourth card. Nothing needs to be migrated, existing entity IDs stay the same.
✨ New (#24)
🗣️ Voice control (Assist): works in German and English with no setup, for example:
- "When is my next workout?" / "Wann ist mein nächstes Training?"
- "How often did I work out this week?" / "Wie oft habe ich diese Woche trainiert?"
- "When did I last work out?" / "Wann habe ich zuletzt trainiert?"
- "Log 80.4 kilos" / "Trag 80,4 Kilo ein" (pounds are converted)
- "Start a 90 second rest" and "Stop the rest" / "Starte 90 Sekunden Pause" und "Stoppe die Pause"
The integration creates the sentences itself in config/custom_sentences/. If you customize a file yourself, delete its first line and it will be left untouched. Can be disabled in the options.
📖 Logbook: finished workouts, new records and weigh-ins appear as readable entries, e.g. "openGym finished Push (12,400 kg volume, 18 sets, 54 min)".
📈 Long-term statistics: body weight, volume per training day and the estimated 1RM of your 8 most-performed exercises are imported retroactively back to your first workout. This way the statistics graph card also shows the time before installation. Can be disabled in the options.
📊 Progress card custom:opengym-progress-card: 1RM history per exercise, body weight with goal line and a timeline of your records.
🎛️ New controls:
select.opengym_today_s_routinepicks today's routine or a rest day and writes it to the plan.number.opengym_rest_timer_durationsets the rest-timer length (15 s to 10 min).
🔧 Improved
- Entity names in your language: names now follow Home Assistant's language (German/English). Entity IDs stay English so automations and cards keep working.
- Code split: the evaluation logic now lives in its own module
state.py. - More tests: CI additionally tests against a real Home Assistant, including the spoken sentences.
- README: new sections on voice control, statistics, progress card and development. The documented muscle entity IDs are corrected (e.g.
shouldersinstead ofdeltoids).
- Update entity: fresh installs now get
update.opengym_opengym_instance. Existing installations keepupdate.opengym_opengym_instanz. - After the update, restart Home Assistant once and clear the browser cache (Ctrl+F5) so the new card appears.
- Voice control with an AI agent (e.g. an LLM): enable "Prefer handling commands locally" in the voice assistant's settings.
openGym v0.10.2 — HACS preparation (brand images)
Small maintenance release in preparation for inclusion in the HACS default store.
🔧 Changed
- Brand images in hassfest-compliant sizes (#20):
icon.png,dark_icon.pngandlogo.pngare now 256 px.- The 512-px versions sit next to them as
@2x. - hassfest requires these sizes; the HACS check for new repositories treats deviations as errors.
- A new test checks the image sizes against the same rules.
Functionally there are no changes compared to v0.10.1. All the novelties there: routine icons, exercise names instead of IDs, no unnecessary "unavailable" entities, week streak, new setup guide and a modernized README.
After the update, hard-reload the browser (Ctrl+F5) so the cards load 0.10.2.
openGym v0.10.1 — Icons, exercise names & setup
Bugfix release for the issues noticed on real dashboards after v0.10.0, plus a new setup guide and a revised README.
🐛 Fixed
- Routine icons instead of text: openGym stores icon keys like
pullupordumbbell. The cards now show the matching MDI icon instead of the key (old emojis are converted as well, unknown ones become a dumbbell). The icon is also exposed as theiconattribute innext_session, the weekly plan andget_routines. - Exercise names instead of IDs: instead of
2291you now get "Latzug mit weitem Griff am Kabelzug" / "Cable Wide Grip Lat Pulldown", depending on the HA language. Based on openGym's full exercise catalog (over 5,600 exercises). This applies to the cards, the attributes (PRs and 1RM now keyed by name), the muscle detail and the calendar description. - Muscles counted correctly: with the full catalog, all library exercises count toward muscle balance, heatmap and fatigue. Previously only 246 exercises were recognized.
- No unnecessary "unavailable" entities:
- The rest timer shows
idleorrunning. - Watch sensors are only created once a watch is paired.
- Live sensors only exist with an admin account.
- The coach buttons remain usable.
- Orphaned entries are cleaned up by the integration itself.
- The rest timer shows
✨ New
- Week streak
sensor.opengym_week_streak: counts consecutive training weeks like openGym, including freezes. The card now shows e.g. "5 weeks" instead of "0 days". - Heatmap: a week with training is never gray anymore.
📖 Documentation
- New setup guide, verified against openGym's source code:
INTEGRATIONS=webhookandINTEGRATIONS_ALLOW_LAN=1(what the switch opens and what stays locked),docker compose up -d, verification viaprintenv- Choosing the openGym and HA URLs
- Pairing code via Settings → Account → "Pair mobile app"; the text in the setup dialog was corrected too
- Card resources in YAML mode and a troubleshooting table
- README revised and HACS-ready (#19): gallery, badges, Open in HACS and Add integration buttons, collapsible tables, FAQ and corrected entity IDs.
⚠️ Update notes
sensor.opengym_rest_timerno longer returns a timestamp as state. The end time is now in theends_atattribute.- The attributes of
sensor.opengym_personal_recordsandsensor.opengym_estimated_1rmare keyed by exercise name instead of ID. - After the update, hard-reload the browser (Ctrl+F5) so the cards load 0.10.1.
openGym v0.10.0 — 12 new features
New features (#17)
- Nearly live: revision check every 30 s (adjustable); the full document is only loaded when it changes
- Live workout: exercise x/y, sets and progress; start and cancel the rest timer from HA
- Reminders: "done today" and "reminder due" sensors (nudge-check)
- Multiple profiles:
entry_idin all services and in the card - Card: PRs of the week, avg. heart rate, weight history with distance to goal weight
- New card
custom:opengym-next-cardfor the next workout - Coach: status, trigger a review, accept and reject suggestions (simple changes)
- Diagnostics: delivery log and repair hint for failed webhooks
- Edit the plan: set a rest day, move a workout, day note (with conflict handling)
- Long-term statistics: 14 muscle sensors for HA statistics
- Watch: heart rate and HR zone (max HR configurable)
Fixes
- Heart rate (
{avg, max}) is now read correctly - German muscle names corrected
Notes: openGym does not expose the rest timer from the app. Live workout requires admin rights. Watch data show the last seen value. Coach and watch entities only appear if the feature is enabled on the instance.
openGym v0.9.0 — New cards
New Lovelace cards (#16)
- Design: modern look using HA theme colors, fitting both light and dark themes. The card adapts to the width and goes two-column from 760 px.
- Header: shows sets, volume, units, streak and the last workout. While a workout is running, a "workout in progress" badge appears.
- Body map: with tooltips and a detail panel (recovery, fatigue, 1RM history), fully operable via keyboard and screen reader.
- Heatmap: a click jumps to the respective week. The muscle list shows the goal status and has "show all".
- Week card: redesigned with progress ring and status per day.
- Visual editor: with the new options
title,show_stats,show_legend,list_limitandaccent. - Missing data: clean displays for missing entities, an unreachable instance and empty weeks.
Fixes
- Week card: no longer crashes on the first update.
- Rebuild: the card only rebuilds when a relevant entity changes, not on every HA update.
- Exercise and routine names: are now escaped (no unfiltered HTML).
- Muscle names: corrected.