Add mqtt cover support for IS_CLOSING and IS_OPENING#30248
Closed
docsapro wants to merge 1 commit into
Closed
Conversation
Hello, Sorry Its probably not the way I should do that, but I am very new to Github and HomeAssistant, please forgive me :-) Also I am not programmer so I would like to ask if someone can do a change for me. I'm also not sure if I will phrase that correctly. Sorry about that if its the case. I will try to provide the max info. Is it possible for someone to add the support of additional states (OPENING and CLOSING and STOPPED) with the usage of an additional MQTT topic. I think this a supported feature of the platform/entity ? with is_opening or is_closing ? (https://developers.home-assistant.io/docs/en/entity_cover.html#supported-features) There would be 3 different payloads which would define the "direction" of the shutter. here is an example of my homebridge equivalent with tasmota shutter if it helps to understand : shutter2/tele/RESULT this topic from my tasmota provides this JSON message { "Shutter1": { "Position": 100, "direction": 0 } } So, with direction being 1, 0 or -1 I can know if it goes up, down or if it is stopped in Homebridge ( Homebridge can do that with "PostionStateValue" : https://www.npmjs.com/package/homebridge-mqttthing#window-covering ), this works : "getPositionState": { "topic": "shutter2/tele/RESULT", "apply": "return JSON.parse(message).Shutter1.direction;" } }, "positionStateValues": [ 1, -1, 0 "getPositionState": { "topic": "shutter2/tele/RESULT", "apply": "return JSON.parse(message).Shutter1.direction;" } }, "positionStateValues": [ 1, -1, 0 ] Thank you very much 👍
Contributor
|
Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration ( |
Member
|
Feature and enhancement requests should go in the Feature Requests section of our community forum. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Sorry Its probably not the way I should do that, but I am very new to Github and HomeAssistant, please forgive me :-)
Also I am not programmer so I would like to ask if someone can do a change for me.
I'm also not sure if I will phrase that correctly. Sorry about that if its the case. I will try to provide the max info.
Is it possible for someone to add the support of additional states (OPENING and CLOSING and STOPPED) with the usage of an additional MQTT topic. I think this a supported feature of the platform/entity ? with is_opening or is_closing ? (https://developers.home-assistant.io/docs/en/entity_cover.html#supported-features)
There would be 3 different payloads which would define the "direction" of the shutter.
here is an example of my homebridge equivalent with tasmota shutter if it helps to understand :
shutter2/tele/RESULT this topic from my tasmota provides this JSON message
{
"Shutter1": {
"Position": 100,
"direction": 0
}
}
So, with direction being 1, 0 or -1 I can know if it goes up, down or if it is stopped
in Homebridge ( Homebridge can do that with "PostionStateValue" : https://www.npmjs.com/package/homebridge-mqttthing#window-covering ),
this works :
"getPositionState": {
"topic": "shutter2/tele/RESULT",
"apply": "return JSON.parse(message).Shutter1.direction;"
}
},
"positionStateValues": [
1,
-1,
0 "getPositionState": {
"topic": "shutter2/tele/RESULT",
"apply": "return JSON.parse(message).Shutter1.direction;"
}
},
"positionStateValues": [
1,
-1,
0
]
Thank you very much 👍
Breaking Change:
Description:
Related issue (if applicable): fixes #
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.If the code does not interact with devices: