-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Add brew by weight controls to lamarzocco #158169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds brew by weight (BBW) controls to the La Marzocco integration, enabling users to configure dose modes and weight targets through Home Assistant.
Key Changes:
- Added select entity for BBW dose mode selection (continuous, dose1, dose2)
- Added two number entities for configuring BBW dose weight values (Dose 1 and Dose 2)
- Enhanced test coverage with comprehensive tests for the new entities
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/lamarzocco/select.py |
Added DOSE_MODE_HA_TO_LM mapping constants and new BBW dose mode select entity description with availability check for scale connection |
homeassistant/components/lamarzocco/number.py |
Added two number entity descriptions for BBW dose 1 and dose 2 with weight device class, configurable 5-100g range, and scale connection availability check |
homeassistant/components/lamarzocco/strings.json |
Added translations for BBW entities including entity names and select state options |
homeassistant/components/lamarzocco/icons.json |
Added icons for BBW entities with state-based icons for dose mode select (all-inclusive-box for continuous, numeric boxes for dose1/dose2) |
tests/components/lamarzocco/test_select.py |
Added comprehensive test for BBW dose mode select entity including state verification and service call testing |
tests/components/lamarzocco/test_number.py |
Added parametrized test for both BBW dose number entities with snapshot assertions and service call verification |
tests/components/lamarzocco/fixtures/config_mini.json |
Updated fixture to set scaleConnected to true, enabling BBW entities in tests |
tests/components/lamarzocco/snapshots/test_select.ambr |
Added snapshots for BBW dose mode select entity state and registry entry |
tests/components/lamarzocco/snapshots/test_number.ambr |
Added snapshots for both BBW dose number entities covering state and registry entries |
| import pytest | ||
| from syrupy.assertion import SnapshotAssertion | ||
|
|
||
| from homeassistant.components.lamarzocco.select import DOSE_MODE_HA_TO_LM |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constant DOSE_MODE_HA_TO_LM is being imported from select.py into number.py tests, creating a cross-module dependency. Since this constant is used by both the select and number platforms, it should be moved to const.py to avoid coupling between platform modules. Consider moving both DOSE_MODE_HA_TO_LM and DOSE_MODE_LM_TO_HA from select.py to const.py.
| from homeassistant.components.lamarzocco.select import DOSE_MODE_HA_TO_LM | |
| from homeassistant.components.lamarzocco.const import DOSE_MODE_HA_TO_LM |
Breaking change
Proposed change
Adding select & number entities to control bbw
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: