Add error and alert sensors to Fumis integration#169307
Merged
Merged
Conversation
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds diagnostic enum sensors to the Fumis integration to expose the stove’s currently active error and alert states (with the original device code exposed via a state attribute).
Changes:
- Add new
alertanderrorenum sensors in the Fumis sensor platform, including acodeextra attribute. - Add translations and state-specific icons for the new enum sensor states.
- Extend test coverage with new fixtures/snapshots and an additional test for active error/alert codes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/fumis/sensor.py |
Adds alert/error enum sensors and helper functions to map library codes to HA enum states + extra attributes. |
homeassistant/components/fumis/strings.json |
Adds localized names and state strings for the new enum sensors. |
homeassistant/components/fumis/icons.json |
Adds default and state-specific icons for alert/error states. |
tests/components/fumis/test_sensor.py |
Adds a new test for active error/alert sensors and updates conditional entity creation expectations. |
tests/components/fumis/snapshots/test_sensor.ambr |
Updates snapshots to include the new sensors and their states/attributes. |
tests/components/fumis/fixtures/info_error_alert.json |
Adds a fixture representing a device reporting an active error and alert. |
| assert state.state == "low_fuel" | ||
| assert state.attributes["code"] == "A001" | ||
|
|
||
|
|
There was a problem hiding this comment.
Add a test case that feeds an unmapped/unknown alert/error code and asserts the enum sensor state becomes unknown (and the code attribute behaves as intended) to cover the PR’s stated behavior for unknown codes.
Suggested change
| @pytest.mark.parametrize("device_fixture", ["info_unknown_error_alert"]) | |
| @pytest.mark.usefixtures("entity_registry_enabled_by_default", "init_integration") | |
| async def test_sensors_unknown_error_and_alert( | |
| hass: HomeAssistant, | |
| entity_registry: er.EntityRegistry, | |
| ) -> None: | |
| """Test error and alert sensors with unmapped codes.""" | |
| error_entity_id = entity_registry.async_get_entity_id( | |
| "sensor", "fumis", f"{UNIQUE_ID}_error" | |
| ) | |
| assert error_entity_id is not None | |
| assert (error_state := hass.states.get(error_entity_id)) | |
| assert error_state.state == STATE_UNKNOWN | |
| assert error_state.attributes["code"] == "E999" | |
| alert_entity_id = entity_registry.async_get_entity_id( | |
| "sensor", "fumis", f"{UNIQUE_ID}_alert" | |
| ) | |
| assert alert_entity_id is not None | |
| assert (alert_state := hass.states.get(alert_entity_id)) | |
| assert alert_state.state == STATE_UNKNOWN | |
| assert alert_state.attributes["code"] == "A999" |
edenhaus
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Add error and alert enum sensors to the Fumis integration. These sensors show the currently active error or alert on the stove, with the original device error code (like
E101orA001) available as a state attribute.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: