Closed diijkstra closed 3 years ago
@diijkstra thanks again for your contribution! And sorry for the github actions noise. I was struggeling a little bit when migrating this repo to Github Actions
@tobias-richter don't worry :-) I'm happy that you were able to merge it so fast. Thanks!
This is a hacky way to add support for following commands:
Unfortunately support for TuyaMCU is hard to within current implementation. A response contains list of dictionaries with
fnId
, anddpId
keys (ie.:{"TuyaMCU":[{"fnId":11,"dpId":20},{"fnId":26,"dpId":21},{"fnId":21,"dpId":22},{"fnId":23,"dpId":23},{"fnId":24,"dpId":24}]}
). I've decided to require from user providing multipleTuyaMCU
commands one per onefnId
. To allow removing existing entries a special handling for dpId=0 is added which does not complain when given fnId was not on the list. If response contains other fnId,dpId pairs, they will be left intact. If givenfnId
anddpId
is in multiple entries, both entries will be returned - this will cause update which should resolve conflict.Template command is more readable when written as a dictionary in the yaml. Also there is less of an issue about formatting.
In other words, I've got a new device and had to scramble something for it ;-) Feel free to modify/reject/raise issues. And again, thanks for your work.