Skip to content

Fix for shutters not closing - #21

Merged
Gamso merged 2 commits into
mainfrom
fix/close_cover_auto
May 28, 2026
Merged

Gamso merged 2 commits into
mainfrom
fix/close_cover_auto

Conversation

@Gamso

@Gamso Gamso commented May 24, 2026 •

Copy link
Copy Markdown
Owner
  • Inspect the targeted review comment context and affected file
  • Run existing lint/build/test commands to capture baseline status
  • Update only the async_check_heat_protection docstring to match current behavior
  • Run targeted tests for the modified area
  • Run final validation checks and report completion

Copilot AI review requested due to automatic review settings May 24, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates HomeShift’s cover heat-protection feature so that, when the outdoor temperature exceeds the configured threshold during the active time window, the integration can close covers by default (instead of calling stop_cover), while also allowing users to configure which cover service is called.

Changes:

  • Add a new configuration option (cover_action) to choose between close_cover (default) and stop_cover.
  • Update CoverManager to call the configured cover service when heat protection triggers.
  • Extend tests and translations to cover the new default behavior and the configurable action.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
custom_components/homeshift/cover_manager.py Uses configurable cover_action when triggering heat protection.
custom_components/homeshift/const.py Adds CONF_COVER_ACTION and DEFAULT_COVER_ACTION.
custom_components/homeshift/config_flow.py Adds a dropdown selector for cover action in the covers step.
tests/test_coordinator_features.py Updates/extends tests to assert default close_cover and optional stop_cover.
custom_components/homeshift/translations/en.json Adds UI strings for the new cover action option and updates descriptions.
custom_components/homeshift/translations/fr.json Adds UI strings for the new cover action option and updates descriptions.
.devcontainer/devcontainer.json Adds forced DNS settings in the devcontainer configuration.

Comment thread custom_components/homeshift/cover_manager.py Outdated
Comment thread custom_components/homeshift/cover_manager.py Outdated
Comment thread custom_components/homeshift/config_flow.py Outdated
Comment thread custom_components/homeshift/translations/en.json Outdated
Comment thread custom_components/homeshift/translations/fr.json Outdated
Comment thread .devcontainer/devcontainer.json Outdated
@Gamso
Gamso force-pushed the fix/close_cover_auto branch from db03787 to a6bda13 Compare May 24, 2026 14:14
Copilot finished work on behalf of Gamso May 24, 2026 14:42
@Gamso
Gamso force-pushed the fix/close_cover_auto branch from 50bbb9c to 0713df4 Compare May 24, 2026 14:50
…rature exceeds the configured threshold during the active time window, the integration can close covers by default (instead of calling stop_cover), while also allowing users to configure which cover service is called.

Changes:
    Add a new configuration option (cover_action) to choose between close_cover (default),  stop_cover and favorite button.
    Add entity is_heat_protection_active.
    Update CoverManager to call the configured cover service when heat protection triggers.
    Extend tests and translations to cover the new default behavior and the configurable action.
@Gamso
Gamso force-pushed the fix/close_cover_auto branch from 0713df4 to 89cd2c1 Compare May 25, 2026 12:47
- Add binary_sensor.py: 'Cover Heat Active' entity (BinarySensorDeviceClass.HEAT)
  shows whether heat protection conditions are currently met (in window + temp > threshold)
- Add CONF_COVER_MY_BUTTON: optional button entity (e.g. Somfy My position)
  that takes priority over the cover action when set
- Remove 'my_position' from the action dropdown — just fill in the button entity
- Fix default action from stop_cover → close_cover
- Add CONF_COVER_ACTION selector (close_cover / stop_cover) with accurate
  descriptions (stop_cover halts movement, My position is a separate button)
- Expose coordinator.is_heat_protection_active() as public method
- 168 tests passing
@Gamso
Gamso merged commit dfd8004 into main May 28, 2026
2 checks passed
@Gamso
Gamso deleted the fix/close_cover_auto branch July 18, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants