-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request]: Cover state should include STATE_OPENING/STATE_CLOSING #23713
Comments
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days |
Still an issue |
Found out the issue: The autoconfiguration state template is wrong: Current {
"availability": [
{
"topic": "zigbee2mqtt/bridge/state",
"value_template": "{{ value_json.state }}"
},
{
"topic": "zigbee2mqtt/Rolläden Wohnzimmer/availability",
"value_template": "{{ value_json.state }}"
}
],
"availability_mode": "all",
"command_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left/set",
"device": {
"configuration_url": "https://zigbee2mqtt.mydomain.de/#/device/0xa4c138018cf95021/info",
"identifiers": [
"zigbee2mqtt_0xa4c138018cf95021"
],
"manufacturer": "Lonsonho",
"model": "Dual curtain/blind module (TS130F_dual)",
"name": "Rolläden Wohnzimmer",
"suggested_area": "Wohnzimmer",
"via_device": "zigbee2mqtt_bridge_0xe0798dfffec7b47c"
},
"device_calss": "shutter",
"name": "Left",
"object_id": "rolläden_wohnzimmer_left",
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.42.0",
"url": "https://www.zigbee2mqtt.io"
},
"position_template": "{{ value_json.position }}",
"position_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left",
"set_position_template": "{ \"position_left\": {{ position }} }",
"set_position_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left/set",
"state_closing": "DOWN",
"state_opening": "UP",
"state_stopped": "STOP",
"state_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left",
"unique_id": "0xa4c138018cf95021_cover_left_zigbee2mqtt",
"value_template": "{% if \"moving_left\" in value_json and value_json.moving_left %} {{ value_json.moving_left }} {% else %} STOP {% endif %}"
} Correct JSON (last line changed) {
"availability": [
{
"topic": "zigbee2mqtt/bridge/state",
"value_template": "{{ value_json.state }}"
},
{
"topic": "zigbee2mqtt/Rolläden Wohnzimmer/availability",
"value_template": "{{ value_json.state }}"
}
],
"availability_mode": "all",
"command_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left/set",
"device": {
"configuration_url": "https://zigbee2mqtt.mydomain.de/#/device/0xa4c138018cf95021/info",
"identifiers": [
"zigbee2mqtt_0xa4c138018cf95021"
],
"manufacturer": "Lonsonho",
"model": "Dual curtain/blind module (TS130F_dual)",
"name": "Rolläden Wohnzimmer",
"suggested_area": "Wohnzimmer",
"via_device": "zigbee2mqtt_bridge_0xe0798dfffec7b47c"
},
"device_calss": "shutter",
"name": "Left",
"object_id": "rolläden_wohnzimmer_left",
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.42.0",
"url": "https://www.zigbee2mqtt.io"
},
"position_template": "{{ value_json.position }}",
"position_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left",
"set_position_template": "{ \"position_left\": {{ position }} }",
"set_position_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left/set",
"state_closing": "DOWN",
"state_opening": "UP",
"state_stopped": "STOP",
"state_topic": "zigbee2mqtt/Rolläden Wohnzimmer/left",
"unique_id": "0xa4c138018cf95021_cover_left_zigbee2mqtt",
"value_template": "{% if \"moving\" in value_json and value_json.moving %} {{ value_json.moving }} {% else %} STOP {% endif %}"
}
replaced with
Manually sending an updated mqtt event fixes this. |
… used in value_template
… used in value_template
Thanks for the PR! |
Hi @Koenkk |
Is your feature request related to a problem? Please describe
I would like to have my covers to show an animation on the custom card https://github.com/Deejayfool/hass-shutter-card.
The card is using the (official) cover states "opening"/"closing" to identify if the cover is currently moving.
My z2m mqtt covers are not providing the moving state in the state of the cover entity, instead they provide additional sensors for the moving state via auto discovery.
Describe the solution you'd like
Implement STATE_OPENING + STATE_CLOSING (see https://developers.home-assistant.io/docs/core/entity/cover/#states) for cover states additionally or instead of the separate sensors.
Describe alternatives you've considered
Custom sensors in ha.. (not very keen of doing all of that)
Additional context
Additionally the state of the cover is currently uppercase despite the HA constatns using lowercase values.
The text was updated successfully, but these errors were encountered: