Zigbee Commands To Configure the Start And Stop Limits for a Zemismart ZM25 Zigbee Blind Motor
If you use Home Assistant and Zigbee2MQTT, you can use the following script to configure the motor limits for your Zemismart Zigbee blinds.
alias: Update Zemismart ZM25 Blind Motor Limit
fields:
entity_id:
required: true
description: Entity ID of your cover entity
example: cover.blinds
selector:
entity:
filter:
domain: cover
limit:
required: true
description: "Type of limit: upper, lower, middle"
default: upper
selector:
select:
options:
- upper
- middle
- lower
action:
required: true
description: Set or unset limit
default: set
selector:
select:
options:
- set
- unset
mode: single
icon: mdi:blinds
sequence:
- service: mqtt.publish
data:
qos: 0
retain: false
topic: >-
zigbee2mqtt/{{ states[entity_id].attributes.friendly_name
}}/set/tuya_data_point_test
payload_template: >-
bool,{{"103" if limit == "upper" else ("105" if limit == "lower" else
"104")}},{{"1" if action == "set" else "0"}}
After you create the script, you can call it from the Developer Tools page:
Or in an automation:
service: script.update_zemismart_zm25_blind_motor_limit
data:
entity_id: cover.blinds
limit: upper
action: set
Here is a script to reverse the direction of the motor if your blinds are going the wrong way.
alias: Configure Zemismart ZM25 Blind Motor Options
fields:
entity_id:
required: true
description: Entity ID of your cover entity
example: cover.blinds
selector:
entity:
filter:
domain: cover
reverse_direction:
required: true
description: If the motor should turn in the opposite direction
default: false
selector:
boolean:
mode: single
icon: mdi:blinds
sequence:
- service: mqtt.publish
data:
qos: 0
retain: false
topic: >-
zigbee2mqtt/{{ states[entity_id].attributes.friendly_name
}}/set
payload_template: >-
{ "options": { "reverse_direction": {{"true" if reverse_direction else "false"}} } }
Note: I originally wrote this on the Home Assistant Community forums. Leave a comment on the forum thread if you have any questions: