-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
MQTT Cover UP/DOWN buttons work upside-down #46104
Comments
mqtt documentation |
Home Assistant internally defines a fully open cover as having position 100, and a fully closed position as having position 0: https://developers.home-assistant.io/docs/core/entity/cover#platform-properties-to-be-implemented-by-deriving-platform-classes With your configuration, you've inverted that such that position 100 received from the blind means closed, which will be translated to position 0 (closed), and position 0 received from the blind means open, which will be translated to position 100 (open). This means that:
This all seems to be OK, and I don't see a problem. There does however seem to be a bug in how the position from HA is sent to the blind. When I drag the slider in HA to (for example) position 20, I expect 80 to be sent to the blind, but it (seemingly incorrectly) sends 20. |
Yes you are right. Sorry. I just tried so many things now, my reported issue was before inverting. |
@jeppper The reason for that behavior is that if a |
Since there doesn't seem to be any problem (except the illogical behavior of the position, which is in line with the documentation), can we close this issue? |
Would the behaviour of the slider be changeable when using a set_position_template? |
Yeah, I'd suggest to drop |
Do you happen to know a template that could make the slider show correctly (left = open, right = closed)? |
I think you can do something like this to invert it:
And don't set either of |
I tried it but the slider shows left = closed and right = open. The movement of the slider to the opposite side when setting is gone though. The arrows shows okay. |
Actually I think it now behaves and looks like when not changing anything. Not inverting in zigbee2mqtt and using templates. |
Yes, and that's exactly what it should do:
With these settings: - platform: "mqtt"
name: "gardin_stue_midt"
availability_topic: "zigbee2mqtt/bridge/state"
command_topic: "zigbee2mqtt/blind_stue_midt/set"
value_template: "{{ 100 - value_json.position }}"
set_position_template: "{ \"position\": {{ 100 - position }} }"
set_position_topic: "zigbee2mqtt/blind_stue_midt/set"
position_topic: "zigbee2mqtt/blind_stue_midt"
|
But the wanted function is: |
Home Assistant defines position 0 as closed and position 100 as open. |
Okay strange. I thought "position_closed and open" was to invert that but I guess I just have to get used to the looks of it. |
No, the purpose of I'll close this issue since it seems there is no problem. |
The problem
Exactly the same issue as in #19409
"My covers handled by MQTT cover component can't be controlled correctly with Home Assistant when cover's position is either 0 or 100 (maximum). When 0 the cover can't be closed with the 'ARROW DOWN' button. When 100 the cover can't be open with the 'ARROW UP' button."
In Zigbee2mqtt i have inverted position so that open = 0, closed = 100.
What is version of Home Assistant Core has the issue?
0.103.6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
MQTT
Link to integration documentation on our website
https://www.home-assistant.io/integrations/cover.mqtt/
Example YAML snippet
Anything in the logs that might be useful for us?
# Put your logs below this line
The text was updated successfully, but these errors were encountered: