Aqara Roller Shade Driver E1

Hey,
I’ve updated my zigbee dongle to the latest version 20230507
And that hasn’t resolved my issue

The device reports a change in position 100 to 0 without out the motor ever running

info  2023-12-09 11:42:19: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":105,"motor_state":"pause","position":100,"power_outage_count":18,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
info  2023-12-09 11:42:21: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":109,"motor_state":"pause","position":0,"power_outage_count":18,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
info  2023-12-09 11:42:27: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":109,"motor_state":"pause","position":0,"power_outage_count":19,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'

could you help explain the other things you have done to stop this from happening.

it’s really causing me a headache

1 Like

I’ve managed to solve all the problems.
Just updated conbee II to the latest version, restarted HA, re-paired and it worked!

So before you start looking around for a solution make sure you have updated conbee II stick.
Then, make sure you are running the latest HA version (I don’t know on which version, but the quirk was included very recently). So if you are running a pretty old version of HA it won’t work for sure (unless if you start playing with custom quirks etc etc etc)

Hey, sorry for delay with response.
As I see, you use zigbee2mqtt, but I use ZHA, most probably it affects the final result.

In my case, the issue with resetting roller position to 0 was related to WindowCoveringRollerE1 cluster, which didn’t update the value of current_position_lift_percentage and it was always 0.

By some reason, ZHA polled data from this cluster and reset device state to zero, accordingly.

I would suggest trying the following things:

  1. Try to enable some kind of debug logs for zigbee2mqtt and inspect logs for similar issue with WindowCoveringRollerE1.
  2. Also, to check value of WindowCoveringRollerE1.current_position_lift_percentage you could find your device in settings, then (for ZHA):
    Device Info > 3 dots (right from “reconfigure button”) > Manage Zigbee Device >
    select WindowCoveringRollerE1 from cluster and select attribute current_position_lift_percentage > Read Attribute.
    After that, you will see the current value of this attribute.


If your roller have position in real life different from the value of current_position_lift_percentage, so it could be the issue, but I don’t know for sure.

In my case, ZHA just stopped polling position from WindowCoveringRollerE1 after updating firmware and start polling from the AnalogOutputRollerE1 cluster, which has correct data.

P.S.
I didn’t dig deeper to understand why it happened

1 Like

For those who don’t mind using the Aqara hub. Just add devices to the hub and add to HA via matter integration. Quick, seamless and easy.

Hello guys,

I also have the problem that the entity does not update after the motor has moved. That’s why I also created an additional automation for updating a template entity with the values from the motor. The motor is connected via Z2MQTT Addon.
Perhaps these instructions will help someone.

What is needed:

  • Helpers:

    • Switches (input_boolean):
      Curtain Opening
      Curtain Closing
      Curtain Stopping
    • Number (input_number):
      Curtain Position
  • Template entity in the configuration.yaml:

cover:
  - platform: template
	covers:
  	curtain_window:
    	device_class: curtain
    	friendly_name: "Curtain Window"
    	unique_id: "curtainWindow1"
    	position_template: "{{ states('input_number.curtain_position') }}"
    	open_cover:
      		service: input_boolean.turn_on
      		target:
        			entity_id: input_boolean.curtain_opening
    	close_cover:
      		service: input_boolean.turn_on
      		target:
        			entity_id: input_boolean.curtain_closing
    	stop_cover:
      		service: input_boolean.turn_on
      		target:
        		entity_id: input_boolean.curtain_stopping
    	set_cover_position:
      		service: input_number.set_value
      		target:
        			entity_id: input_number.curtain_position
      		data:
        			value: "{{ position }}”
  • Add the automation and replace some fields:
    • Replace this letters:
      AQARAROLLERSHADE_NAME → your entity of the roller shade in HA. Should be in the MQTT integration.

    • FRIENDLY_NAME_Z2MQTT → this is the name that you have defined as the display name in the Z2MQTT configuration

    • Add this automation (do not forget to replace the letters and doublecheck, whether the entity names of the helpers are the same):

alias: Curtain Update
description: ""
trigger:
  - platform: homeassistant
	event: start
  - platform: state
	entity_id:
  	- input_boolean.curtain_opening
	id: OPENING
	to: "on"
  - platform: state
	entity_id:
  	- input_boolean.curtain_closing
	id: CLOSING
	to: "on"
  - platform: state
	entity_id:
  	- input_number.curtain_position
	id: POSITION
  - platform: state
	entity_id:
  	- input_boolean.curtain_stopping
	to: "on"
	id: STOPPING
condition: []
action:
  - choose:
  	- conditions:
      	- condition: trigger
        	id:
          	- OPENING
    	sequence:
      	- device_id: c8a063ee429fa095a18224e2368dd76a
        	domain: cover
        	entity_id: bdb5909fd41cae3eff714d4d3946453e
        	type: open
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: state
              	entity_id: cover.AQARAROLLERSHADE_NAME
              	state: open
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
          	payload: "{\"state\": \"\"}"
      	- service: input_number.set_value
        	metadata: {}
        	data:
          	value: >-
            	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
            	float(0) }}
        	target:
          	entity_id: input_number.curtain_position
      	- service: input_boolean.turn_off
        	metadata: {}
        	data: {}
        	target:
          	entity_id: input_boolean.curtain_opening
  	- conditions:
      	- condition: trigger
        	id:
          	- CLOSING
    	sequence:
      	- device_id: c8a063ee429fa095a18224e2368dd76a
        	domain: cover
        	entity_id: bdb5909fd41cae3eff714d4d3946453e
        	type: close
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: state
              	entity_id: cover.AQARAROLLERSHADE_NAME
              	state: closed
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
          	payload: "{\"state\": \"\"}"
      	- service: input_number.set_value
        	metadata: {}
        	data:
          	value: >-
            	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
            	float(0) }}
        	target:
          	entity_id: input_number.curtain_position
      	- service: input_boolean.turn_off
        	metadata: {}
        	data: {}
        	target:
          	entity_id: input_boolean.curtain_closing
  	- conditions:
      	- condition: and
        	conditions:
          	- condition: trigger
            	id:
              	- POSITION
          	- condition: state
            	entity_id: input_boolean.curtain_opening
            	state: "off"
          	- condition: state
            	entity_id: input_boolean.curtain_closing
            	state: "off"
          	- condition: state
            	entity_id: input_boolean.curtain_stopping
            	state: "off"
    	sequence:
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/set
          	payload: >-
            	{"position": {{ states("input_number.curtain_position") | int
            	}}}
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 1
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: template
              	value_template: >-
                	{{ states('input_number.curtain_position') | int  ==
                	state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') | int
                	}}
  	- conditions:
      	- condition: trigger
        	id:
          	- STOPPING
    	sequence:
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/set
          	payload: "{\"state\": \"STOP\"}"
      	- repeat:
          	sequence:
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id: input_boolean.curtain_closing
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id: input_boolean.curtain_opening
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id:
                  	- input_boolean.curtain_stopping
          	until:
            	- condition: and
              	conditions:
                	- condition: state
                  	entity_id: input_boolean.curtain_opening
                  	state: "off"
                	- condition: state
                  	entity_id: input_boolean.curtain_closing
                  	state: "off"
                	- condition: state
                  	entity_id: input_boolean.curtain_stopping
                  	state: "off"
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 1
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: input_number.set_value
              	metadata: {}
              	data:
                	value: >-
                  	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
                  	float(0) }}
              	target:
                	entity_id: input_number.curtain_position
          	until:
            	- condition: template
              	value_template: >-
                	{{ states('input_number.curtain_position') | int  ==
                	state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') | int
                	}}
	default:
  	- service: mqtt.publish
    	metadata: {}
    	data:
      	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
      	payload: "{\"state\": \"\"}"
  	- service: mqtt.publish
    	metadata: {}
    	data:
      	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
      	payload: "{\"battery\": \"\"}"
mode: restart
1 Like

I have just got one of these and so far so good. I have mine inverted so open is closed and close is open but otherwise seems to be doing all the things.

If anyone has advice on how to change open to closed and vice versa, so the icon represents what is actually happening that, would be awesome. Otherwise pretty happy.

I recently bought this Aqara device and had the same issues as described above. I can confirm that after updating firmware on my Sonoff zigbee stick and removing/re-pairing in Zigbee2MQTT (this step is important!) all the problems are gone now and the device is working as expected.

Aye confirmation here also using Sonoff Zigbee 3.0 Plus stick. You need to update the firmware, otherwise the device will ultimately lose connection and you cannot even repair it.

Updating firmware fixed the pairing process, and now I can also see the temperature and battery levels, which were previously “Unknown” and always at 0.3c

Thanks, I just ran into the same issue. I had a new Sonoff Zigbee 3.0 USB Dongle Plus stick, but it still had the old firmware (Z-Stack 20210708). I flashed the new firmware (Z-Stack 20240710) onto it, thanks to a guide from here: How to update Sonoff Zigbee 3.0 (ZBDongle-P) USB firmware using a Mac : Dennis van Dalen

After that, I had to remove the roller shade and pair it again. Now I can see the temperature, battery level, and the correct charging status. Hopefully this also fixes the issue where it sometimes suddenly shows as open in HA even though it’s actually closed.

I had HA 2025.3.4 supervised with sonoff Z-Stack 20221226. Everything was great, but after update to newer HA version the Number Current position of roller shade is unavailable, and some new entites like a speed appeared. Now i stay with ha 2025.3.4 for working Number Current position reason. Any suggestions?

@Next there is official Sonoff Web Flasher - https://dongle.sonoff.tech/sonoff-dongle-flasher
Just update your Sonoff dongle

I flashet sonoff dongle-p to latest firmware 20240710. Same thing.
20240710+2025.8.3 Number Current position is unavailable.
20240710+2025.3.4 Number Current position is available.

I did the same thing (upgrade the dongle-p). No change.

I don’t want to downgrade HAOS so I’ve just been putting up with it…for now.

Hi everyone,

I’d like to share an automation I use for my curtains.
This is a work around till it will be fixed (it only work when its controlled via Home Assistant – UI or automations).

The goal is to keep the cover entity and an input_number in sync, so you can:

  • Control the curtain from the UI slider (input_number). (make this helper input_number.livingroom_curtain_number)
  • Have the current position automatically stored when the curtain is moving.
  • Avoid unnecessary movements by using a small tolerance (5%).
alias: Curtain - sync cover & input_number
description: >
  Stops the curtain after 35s and stores the position, 
  also controls the curtain from input_number (with tolerance).
mode: parallel
max: 10

triggers:
  # When curtain starts moving
  - platform: state
    entity_id: cover.livingroom_curtain
    to: opening
    for: "00:00:01"
    id: curtain_moving
  - platform: state
    entity_id: cover.livingroom_curtain
    to: closing
    for: "00:00:01"
    id: curtain_moving

  # When input_number changes (slider in UI)
  - platform: state
    entity_id: input_number.livingroom_curtain_number
    id: input_changed

variables:
  mapping:
    cover.livingroom_curtain: input_number.livingroom_curtain_number
  reverse_mapping:
    input_number.livingroom_curtain_number: cover.livingroom_curtain

actions:
  - choose:
      # Curtain is moving → stop after 35s and store position
      - conditions:
          - condition: trigger
            id: curtain_moving
        sequence:
          - delay: "00:00:35"
          - action: cover.stop_cover
            target:
              entity_id: "{{ trigger.entity_id }}"
          - delay: "00:00:05"
          - action: input_number.set_value
            target:
              entity_id: "{{ mapping[trigger.entity_id] }}"
            data:
              value: "{{ state_attr(trigger.entity_id, 'current_position') | int }}"

      # Input_number changed → move curtain if difference > 5%
      - conditions:
          - condition: trigger
            id: input_changed
          - condition: template
            value_template: >
              {% set desired = states(trigger.entity_id) | int %}
              {% set cover = reverse_mapping[trigger.entity_id] %}
              {% set current = state_attr(cover, 'current_position') | int %}
              {{ (desired - current) | abs > 5 }}
        sequence:
          - action: cover.set_cover_position
            target:
              entity_id: "{{ reverse_mapping[trigger.entity_id] }}"
            data:
              position: "{{ states(trigger.entity_id) | int }}"

find out you can refresh state of the cover when you read following attribute

if a action like read zha attribute exist, we could do some magic with automatons.

1 Like

that would be nice ,

I don’t understand why the function has disappeared, because it has worked in zha previously.,

Now I’ve got it! When you press stop, you always get the current position.

As soon as you open/close the roller blind or change position, the status is set to opening/closing. This is automatically changed again after a certain amount of time. From opening to open and from closing to close. Each change takes a different amount of time. About 15 seconds per 10%. So it can take a little longer when opening completely. I don’t know if the roller blind sends the status afterwards or if it’s a ZHA thing. It doesn’t matter! In any case, you can press stop afterwards and get the final position.

So you only need one automation. It waits for the status to jump to open/closed with the action “stop roller blind.” Voila!

the only thing im missing is battery state

Yes I know :slight_smile: see the automation above. :slight_smile:

but you don’t need any helper or delay. just wait until the state changes automatically and let the automation press stop. auto state change varies. in my case for a 1 meter: 10% change = 15 seconds, 1m and full opening/closing 2.5 minutes. its much longer then roller needs but you don’t need a complex automation

can i see your automation ?