DIY Zigbee Roller & Venetian blinds automation

After an unscheduled reboot and restart of Hassio in the evening I discovered that the status of the blinds was incorrectly set to open. After reading this forum and the help from @ Schneider Cover template last state after reboot I found the solution:

1. Create boolean:

input_boolean.yaml

 lux_west_left:
    name: "Status lux west left"  
    icon: mdi:glassdoor      
  
  lux_west_right:
    name: "Status lux west right"  
    icon: mdi:glassdoor

2. Modify the covers

#########################################################
#                                                       #
#        ZIGBEE LUXAFLEX WEST                           #
#                                                       #
#########################################################

  - platform: template
    covers:
      lux_west_left:
        value_template: "{{ is_state('input_boolean.lux_west_left', 'on') }}"
        entity_id: input_boolean.lux_west_left
        friendly_name: "Lux west left"
        open_cover:
          service: script.open_west_left
        close_cover:
          service: script.close_west_left
        stop_cover:
          service: switch.turn_off
          data:
            entity_id: 
              - switch.0x00124b001d863d78_switch_bottom_right
              - switch.0x00124b001d863d78_switch_bottom_left
          
  - platform: template
    covers:
      lux_west_right:
        value_template: "{{ is_state('input_boolean.lux_west_right', 'on') }}"
        entity_id: input_boolean.lux_west_right
        friendly_name: "Lux west right"
        open_cover:
          service: script.open_west_right
        close_cover:
          service: script.close_west_right
        stop_cover:
          service: switch.turn_off
          data:
            entity_id: 
              - switch.0x00124b001d863d78_switch_top_right
              - switch.0x00124b001d863d78_switch_top_left      
       
#########################################################
#                                                       #
#            END OF CONFIGURATION FILE                  #
#                                                       #
#########################################################   

Now you need to test your system by a restart/reboot and check if the boolean has the correct value.

I have added the booleans input_boolean.lux_west_left and input_boolean.lux_west_left to Lovelace:

Screenshot 2020-02-26 at 10.09.39

This way it is very easy to correct the status of the boolean. If the ‘boolean-switch’ in Lovelace is on, than the blinds are open. So make sure the status of the boolean mirrors the actual status of the blinds.

1 Like