Skip to content

kotborealis/home-assistant-custom-components-cover-time-based-synced

 
 

Repository files navigation

hacs_badge

Cover Time Based Component Synced version

Cover Time Based Component for your Home-Assistant based on davidramosweb's Cover Time Based Component and nagyrobi's Cover RF Time based, modified to sync state of cover with the state of switches.

What does synced mean?

In the original implementations, covers are supposed to be controller only via Home Assistant. If you use physical switches, it will ignore them and the actual state and the state in Home Assistant will be unsynchronised.

For example, you open covers to 50% in Home Assistant and then close them to 0% using physical switch. In Home Assistant it will still show 50%, but the actual state of covers have been changed.

This component listens to events of cover switches and handles them to calculate state.

Usage

Example configuration.yaml entry

cover:
  - platform: cover_time_based_synced
    devices:
      my_room_cover_time_based:
        name: My Room Cover
        travelling_time_up: 36
        travelling_time_down: 34
        close_switch_entity_id: switch.rf_myroom_cover_down
        open_switch_entity_id: switch.rf_myroom_cover_up
        send_stop_at_ends: False #optional
        aliases: #optional
          - my_room_cover_time_based

All mandatory settings self-explanatory. Optional settings:

  • send_stop_at_ends defaults to False. If set to True, the Stop script will be run after the cover reaches to 0 or 100 (closes or opens completely). This is for people who use interlocked relays in the scripts to drive the covers, which need to be released when the covers reach the end positions.
  • aliases: to override the entity name generated by Home Assistant internally from the (friendly) name.