Skip to content

Add missing Emma firmware to userdata#863

Merged
bouwew merged 5 commits intomainfrom
emma_firmware
Mar 17, 2026
Merged

Add missing Emma firmware to userdata#863
bouwew merged 5 commits intomainfrom
emma_firmware

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Mar 12, 2026

Summary by CodeRabbit

  • New Features

    • Thermostat devices now show firmware version information in device details.
  • Tests

    • Test fixtures and expected counts updated to reflect the added firmware field and minor test data reflow.
  • Documentation

    • Changelog updated to note the added firmware data and related test improvements.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 18658a85-36b3-48d5-8806-30c22c3c6cef

📥 Commits

Reviewing files that changed from the base of the PR and between 9d7b320 and 6df98a3.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • fixtures/adam_plus_anna_new/data.json
  • fixtures/m_adam_cooling/data.json
  • fixtures/m_adam_heating/data.json
  • tests/data/adam/adam_plus_anna_new.json
  • tests/test_adam.py
  • userdata/adam_plus_anna_new/core.domain_objects.xml
🚧 Files skipped from review as they are similar to previous changes (3)
  • CHANGELOG.md
  • tests/test_adam.py
  • fixtures/m_adam_cooling/data.json

📝 Walkthrough

Walkthrough

Added a firmware timestamp ("2025-11-10T01:00:00+01:00") for the zone_thermostat device id 14df5c4dc8cb4ba69f9d1ac0eaf7c5c6 across fixtures and userdata, updated test fixture formatting, and incremented a test entity count to account for the new field.

Changes

Cohort / File(s) Summary
Firmware field additions in fixture data
fixtures/adam_plus_anna_new/data.json, fixtures/m_adam_cooling/data.json, fixtures/m_adam_heating/data.json
Added "firmware": "2025-11-10T01:00:00+01:00" to the zone_thermostat device (id: 14df5c4dc8cb4ba69f9d1ac0eaf7c5c6).
Test data update with formatting changes
tests/data/adam/adam_plus_anna_new.json
Added firmware field to the zone_thermostat entry and reflowed several one-line arrays into multi-line arrays (gateway modes, regulation modes, preset_modes, zone_profiles, thermostat groups) for readability only.
Test expectation update
tests/test_adam.py
Adjusted entity count assertion in test_connect_adam_plus_anna_new from 230 to 231.
XML configuration update
userdata/adam_plus_anna_new/core.domain_objects.xml
Updated firmware_version values to 2025-11-10T01:00:00+01:00 in two module declarations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • CoMPaTech
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and accurately summarizes the main change: adding missing Emma firmware information to userdata across multiple fixture and test files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch emma_firmware
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Flake8 can be used to improve the quality of Python code reviews.

Flake8 is a Python linter that wraps PyFlakes, pycodestyle and Ned Batchelder's McCabe script.

To configure Flake8, add a '.flake8' or 'setup.cfg' file to your project root.

See Flake8 Documentation for more details.

@coderabbitai coderabbitai bot requested a review from CoMPaTech March 12, 2026 06:52
@coderabbitai coderabbitai bot added the enhancement New feature or request label Mar 12, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/test_adam.py (1)

50-50: Assert Emma’s new firmware exposure directly, not only the total count.

231 will also pass if some unrelated entity is added while Emma’s firmware entity is still missing. One assertion tied to Emma’s firmware would make this test fail on the behavior this PR is actually introducing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/test_adam.py` at line 50, The test currently only asserts
self.entity_items == 231 which can pass even if Emma's firmware entity is
missing; add an explicit assertion that the Emma firmware entity exists in the
collection being validated (e.g., assert there is an entity with identifier/name
"Emma" and type "firmware" in the test's entity list or mapping) in addition to
the total-count check so the test fails when Emma's firmware is absent.
Reference the existing test variables (self.entity_items and the test's entity
collection such as self.entities or self.entity_list) when adding this targeted
assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@userdata/adam_plus_anna_new/core.domain_objects.xml`:
- Line 405: The firmware_version element currently reads
"2025-11-10T01:00:00+01:00" but the export's created_date/modified_date and
gateway clock are "2025-10-11", so verify the raw userdata source for Emma and
either confirm the future firmware timestamp is intentional or update the
firmware_version value to match the export timestamp (e.g., 2025-10-11) across
all derived files; specifically check and correct the firmware_version element
in core.domain_objects.xml (element firmware_version for Emma) and propagate the
corrected value to fixtures/adam_plus_anna_new/data.json,
fixtures/m_adam_cooling/data.json, fixtures/m_adam_heating/data.json and
tests/data/adam/adam_plus_anna_new.json so they remain consistent with the
original export.

---

Nitpick comments:
In `@tests/test_adam.py`:
- Line 50: The test currently only asserts self.entity_items == 231 which can
pass even if Emma's firmware entity is missing; add an explicit assertion that
the Emma firmware entity exists in the collection being validated (e.g., assert
there is an entity with identifier/name "Emma" and type "firmware" in the test's
entity list or mapping) in addition to the total-count check so the test fails
when Emma's firmware is absent. Reference the existing test variables
(self.entity_items and the test's entity collection such as self.entities or
self.entity_list) when adding this targeted assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a05a10a3-8edc-4cb8-9707-7aafc59ff317

📥 Commits

Reviewing files that changed from the base of the PR and between 38a67da and d623b55.

📒 Files selected for processing (6)
  • fixtures/adam_plus_anna_new/data.json
  • fixtures/m_adam_cooling/data.json
  • fixtures/m_adam_heating/data.json
  • tests/data/adam/adam_plus_anna_new.json
  • tests/test_adam.py
  • userdata/adam_plus_anna_new/core.domain_objects.xml

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (457a7c1) to head (6df98a3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #863   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3457      3457           
=========================================
  Hits          3457      3457           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bouwew bouwew marked this pull request as ready for review March 17, 2026 16:34
@bouwew bouwew requested a review from a team as a code owner March 17, 2026 16:34
@sonarqubecloud
Copy link

@bouwew bouwew merged commit 6244aec into main Mar 17, 2026
16 checks passed
@bouwew bouwew deleted the emma_firmware branch March 17, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant