Hallo zusammen,
kann bitte jemand sagen wie man Alexa dazu bringt die Jalousie in eine x-beliebige Position Öffnet oder Schließt “cover.set_cover_position”.
100% - 0% Öffnet oder Schließt habe ich durch 2 Scripte in Node-Red “node-red-contrib-amazon-echo-oztourer” gelöst.
service: cover.open_cover / close_cover / stop_cover
data: {}
target:
entity_id: cover.jalousie
[{"id":"91923098b4091249","type":"amazon-echo-device","z":"8420e9a7e90a44c7","name":"Jalousie","topic":"","x":860,"y":560,"wires":[["db868ba155fd4bab"]]},{"id":"337cec9def3bee14","type":"api-call-service","z":"8420e9a7e90a44c7","name":"Jalousie Öffnen","server":"1612d3ca.3c79fc","version":5,"debugenabled":false,"domain":"script","service":"turn_on","areaId":[],"deviceId":["1eebf0ecf632b0a4ee1d5c3a4189622e"],"entityId":["script.jalousie_offnen"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1220,"y":580,"wires":[[]]},{"id":"04fd65d55025682a","type":"api-call-service","z":"8420e9a7e90a44c7","name":"Jalousie Schließen","server":"1612d3ca.3c79fc","version":5,"debugenabled":false,"domain":"script","service":"turn_on","areaId":[],"deviceId":["1eebf0ecf632b0a4ee1d5c3a4189622e"],"entityId":["script.jalousie_schliesen"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1230,"y":640,"wires":[[]]},{"id":"db868ba155fd4bab","type":"switch","z":"8420e9a7e90a44c7","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1050,"y":600,"wires":[["337cec9def3bee14"],["04fd65d55025682a"]]},{"id":"1612d3ca.3c79fc","type":"server","name":"My Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]
Mit “node-red-contrib-amazon-echo-oztourer” kann man auch die Licht Helligkeit “{{ brightness }}” von light.intitäten steuern, das selbe soll/kann man auch irgendwie von cover zu light umwandeln.
if (msg.payload === "off") msg.payload = {
"service": "turn_off"
};
else if (msg.colormode === "hs")
msg.payload = {
"service": "turn_on",
data: {
"rgb_color": msg.rgb,
"brightness": msg.bri
}
};
else
msg.payload = {
"service": "turn_on",
data: {
"color_temp": msg.ct,
"brightness": msg.bri
}
};
return msg;
light:
- platform: template
lights:
jalousie:
friendly_name: "Jalousie"
level_template: "{{ state_attr('cover.jalousie', 'current_position') }}"
turn_on:
service: script.jalousie_offnen
turn_off:
service: script.jalousie_schliesen
set_level:
service: script.jalousie_automatisch_position
data:
brightness: "{{ brightness }}"
ich bekomme das aber nicht richtig hin.
Vielen dank für jede Hilfe!