Add target flow level and mode end time sensors to Duco integration#169298
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds two new Duco BOX-node sensor entities to expose the box’s actual target airflow percentage and the remaining time in timed ventilation modes.
Changes:
- Add
target_flow_level(% measurement) andtime_state_remain(seconds, duration) sensor descriptions forNodeType.BOX. - Add new entity name strings (and an icon for
target_flow_level). - Update Duco sensor snapshot tests to cover the newly added entities.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| homeassistant/components/duco/sensor.py | Registers the two new BOX-scoped sensors sourced from node.ventilation.*. |
| homeassistant/components/duco/strings.json | Adds English source strings for the new sensor translation keys. |
| homeassistant/components/duco/icons.json | Adds an icon mapping for the new target_flow_level sensor. |
| tests/components/duco/snapshots/test_sensor.ambr | Updates snapshots to include registry/state for the two new sensor entities. |
cabae80 to
46cddf2
Compare
46cddf2 to
74f5075
Compare
|
@erwindouna @joostlek Would this also be a candidate for inclusion in the current beta? It adds two sensors that are directly tied to the initial release of the integration, and having them in from the start keeps it as complete as possible. One of the sensors ( I am not entirely sure what the criteria are for including changes during the beta phase, so happy to hear your thoughts. |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
…mp sensor Replace the countdown sensor (seconds remaining) with a timestamp sensor (absolute end time) to avoid stale values between polls. The library already exposes time_state_end as a Unix timestamp; 0 indicates no active timer, which maps to None (unknown state) in Home Assistant. Truncate to minute precision to suppress poll-drift noise in the activity log. Addresses review feedback from joostlek.
eaf09d5 to
89539a4
Compare
Proposed change
Adds two new sensor entities to the Duco integration for the BOX node:
target_flow_level): the actual airflow target as reported by the Duco box, in percent (0–100 %). UsesSensorStateClass.MEASUREMENTandPERCENTAGEas unit. Useful because the fan entity exposes abstract speed levels (33 / 66 / 100 %) that do not match the real firmware-configured airflow percentages.time_state_remain): the number of seconds remaining in the current timed ventilation mode. UsesSensorDeviceClass.DURATIONandUnitOfTime.SECONDS. Returns 0 when no timer is active.Both sensors are scoped to
NodeType.BOXand read fromnode.ventilation.flow_lvl_tgtresp.node.ventilation.time_state_remain, which are already fetched by the coordinator.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.