Window shutters

Good evening together,

I have problem with the node-red.
I would like to make an automation, that after sunset the shutters go down, but:

  1. When the temperature is above the 5 degrees, than go the shutters only 78% down
  2. When the temperature is under 5 degrees, than go the shutters 100% down

I have already made an automation but it don’t work correctly because in spite of that the shutters are already in the 78% position, every X minutes (10-20 minutes?) the node-red try to position the shutters new (what you can of course hear).
Other thing is, that during the day when I close the shutter, it will be from node-red opened. Yes, the node-red should open the shutters after sunrise, but nothing do anymore until next sunset.

As attachment You can see how I made it.

When I think correctly, the best way would be to use first sunrise/sunset and then the temperature but the “events-state” don’t have entrance. Can I use something else for the temperature?

Thank You in advance,
kamil

I’d like to help but I’m a bit unclear on some of the details of the use case and have a number of questions about the configuration of those nodes. I think to start it would be helpful if you included an export of your automation so others could import and poke around to better understand what’s currently happening. If you don’t know how to do that, here’s a how-to from node-red’s user guide on the topic.

Also just to clarify the use case while I’m at it, it sounds these are the possible states you want to track and the associated value of your shutters in each of those states:

  1. Sunset to Sunrise and <= 5 degrees = 100% down
  2. Sunset to Sunrise and > 5 degrees = 78% down
  3. Sunrise to Sunset and <= 5 degrees = ?% down
  4. Sunrise to Sunset and > 5 degrees = ?% down

Can you please clarify #3 and #4? You mention that you want Node RED to open the shutters in the morning but you don’t specify how much. I’m also guessing you want to factor in the temperature there but you don’t specify.

And finally if I’m reading correctly, you want to make sure you can manually override it. So if you close the shutters during the day then Node RED does not modify them any more until sunset. Also I’m guessing that if for whatever reason you open them at night you also would not want Node RED to touch them until sunrise, is that correct?

[{"id":"d1737020.171948","type":"tab","label":"Rollos","disabled":false,"info":""},{"id":"4eded2cf.5ab284","type":"server-state-changed","z":"d1737020.171948","name":"Temperatur draußen unter 5 Grad","server":"ad8e5e9e.dec0c","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.temperatur_aussen_temperature","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"5","halt_if_type":"num","halt_if_compare":"lte","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":170,"y":120,"wires":[["30167752.012478"],["67915eca.7c6568","204d8bac.7497b4"]]},{"id":"30167752.012478","type":"within-time-switch","z":"d1737020.171948","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"0,1,2,3,9,10,11","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":460,"y":100,"wires":[["dd8ae5f5.bb907"],[]]},{"id":"dd8ae5f5.bb907","type":"api-call-service","z":"d1737020.171948","name":"Alle Rollos auf 0%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.alle_rollos_shuttergroup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":710,"y":100,"wires":[[]]},{"id":"67915eca.7c6568","type":"within-time-switch","z":"d1737020.171948","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":460,"y":160,"wires":[["52340733.227a9"],["bdc4e5e9.9eb83"]]},{"id":"52340733.227a9","type":"api-call-service","z":"d1737020.171948","name":"Küchen und Schlafzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":160,"wires":[[]]},{"id":"7e170f20.cc67c","type":"api-call-service","z":"d1737020.171948","name":"Wohnzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rollo_links","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":740,"y":280,"wires":[[]]},{"id":"204d8bac.7497b4","type":"within-time-switch","z":"d1737020.171948","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"5,6,0","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":460,"y":260,"wires":[["7e170f20.cc67c"],[]]},{"id":"bdc4e5e9.9eb83","type":"api-call-service","z":"d1737020.171948","name":"Küchen Rollo auf 100%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.kuche_rollo","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":220,"wires":[[]]},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"c147288e.624ad","type":"position-config","name":"Neuss","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]

Can you make that a code block by putting triple backticks before and after? I can’t import that because when I copy it formatting is being included from the forum. See #11 here if you need help (I know it talks about YAML but same thing applies to JSON).

Good morning @CentralCommand

first thank You for Your replies.
I have changed the code, sorry, it was my first time and You know, the mens don’t read manuals :wink:

  1. Correct
  2. Correct
  3. Here should do node-red nothing. I want to decide alone when I open the shutters
  4. Here should node-red totally open the shutters (0%)

By the way. I’m using HomematicIP for me shutters. I don’t know why, but by HomeAssistant and Node-Red are not the same as HM IP and Alexa directly. By HM IP and Alexa 100% = totally down and by HA and Node-Red 100% = totally top

Yes, I would like have a option to override it. For an example when the sun shine, I would like to put shutter down without that the Node-Red after few minutes move the shutter back to 100% (totally top).

Blockquote
Also I’m guessing that if for whatever reason you open them at night you also would not want Node RED to touch them until sunrise, is that correct?

Exactly.

Ok so here’s the first problem I see.

Based on this configuration, here’s what’s going to happen:

  1. When the temperature goes above 5 for 1 minute it will send a message to the top output of Temperatur draußen unter 5 Grad. It will not send another message to the top output until the temperature drops below 5 and then goes back above for 1 minute.
  2. Any time the temperature changes and its new state is <= 5 it will send a message to the bottom output of Temperatur draußen unter 5 Grad. Note that it will do this immediately, it will not wait to see if it is in the state for 1 minute. And it will do it literally any time it changes state, even if the temperature has not gone back above 5 since the last time.
  3. Nothing will happen at sunset and sunrise since nothing is listening for that event.

While you can do what you want purely in Node RED, I personally feel this is a situation where you would be better capturing a bit of additional state in HA in order to trigger off it. What we can do here is we can make a simple template sensor in HA that sets itself equal to the state HA thinks the shutters should be in like this:

sensor:
- platform: template
  sensors:
    shutter_state:
      friendly_name: Shutter state
      value_template: >-
        {% set sun_up = is_state('sun.sun', 'above_horizon') %}
        {% set warm = states('sensor.temperatur_aussen_temperature') | float > 5 %}
        {% if sun_up and warm %}
          100
        {% elif sun_up and not warm %}
          -1
        {% elif not sun_up and warm %}
          27
        {% else %}
          0
        {% endif %}

So this sensor will listen for sunrise and sunset events as well as changes in temperature. It’s state will be equal to the state we want the cover to be in most of the time except if the sun is up and temperature is below 5 degrees, then it will be -1 to denote manual mode.

Then we can leverage that in a flow like this:

[{"id":"8f7f781f.52e1d8","type":"trigger-state","z":"d1737020.171948","name":"Shutter state change","server":"cc03735a.94933","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.shutter_state","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is_not","comparatorValueDatatype":"prevEntity","comparatorValue":"state","propertyValue":"new_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":">=","comparatorValueDatatype":"num","comparatorValue":"0","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"num","x":220,"y":320,"wires":[["b04cf620.855f6"],[]]},{"id":"b04cf620.855f6","type":"switch","z":"d1737020.171948","name":"Cover state","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"100","vt":"num"},{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":320,"wires":[["e0d4324d.4c2d"],["d01d1225.b43e58"],["e1f1203d.03cb78"]],"outputLabels":["open","closed","specific position"]},{"id":"c7d7b62f.dde3c8","type":"api-call-service","z":"d1737020.171948","name":"Küchen und Schlafzimmer Rollo auf 100%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":260,"wires":[[]]},{"id":"daa2ddd2.13a5e8","type":"api-call-service","z":"d1737020.171948","name":"Alle Rollos auf 0%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.alle_rollos_shuttergroup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":810,"y":320,"wires":[[]]},{"id":"94a86ed4.0df428","type":"api-call-service","z":"d1737020.171948","name":"Küchen und Schlafzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"{    \"position\": payload}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":880,"y":380,"wires":[[]]},{"id":"e0d4324d.4c2d","type":"delay","z":"d1737020.171948","name":"1/12hr","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"12","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":630,"y":260,"wires":[["c7d7b62f.dde3c8"]]},{"id":"d01d1225.b43e58","type":"delay","z":"d1737020.171948","name":"1/12hr","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"12","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":630,"y":320,"wires":[["daa2ddd2.13a5e8"]]},{"id":"e1f1203d.03cb78","type":"delay","z":"d1737020.171948","name":"1/12hr","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"12","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":630,"y":380,"wires":[["94a86ed4.0df428"]]},{"id":"cc03735a.94933","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

This flow will basically just listen for changes in the sensor and set the cover accordingly (unless the state is -1, then it ignores it). I also added rate limit nodes to each of the 4 paths to prevent any particular path from calling the service more then once a day.

Idk if this is a perfect solution. It seems like you have a few covers for instance which I wasn’t expecting, so you might need to adjust the right side of the flow if you want specific events to only move specific shutters. But yea I guess the point is personally I find it really helpful to leverage a template sensor in situations like these, where you actually want to listen for two different state change events (temperature and sunrise/sunset in this case).

Also the other piece of advice I’d give is be careful with the blocked (i.e. lower) output on events: state and trigger: state nodes. It fires way more then you think. Basically the node listens for state changes on the entity you picked and literally any time its condition doesn’t pass a message comes out the blocked node. It’s very different from the allowed output which only fires when your condition first becomes true and then not again until it becomes false first.

Realized I should probably mention the alternative. So if you don’t like the template sensor idea then what you’ll probably need is 3 nodes on the left side firing your flows:

  1. An events:state node listening for when the temperature goes above 5 for 1 minute
  2. An events:state node listening for when the temperature goes below 5 for 1 minute
  3. A sun events node. Which you’ll then have to filter to only let messages through when they are a sunrise or sunset event (there are other sun events you’ll need to ignore)

All 3 of these can then feed into your flows which set the shutters. In order to limit the amount of events each of those 3 allows through you can introduce one of Node RED’s form of rate limiting such as:

  1. A rate limit node like I have in my example above (delay node set to rate limit) which limits the amount of messages allowed through in a given time period
  2. A trigger node which in “wait for reset” mode. This will only allow a single event through until something resets it. You can then reset it at sunrise and sunset
  3. A state machine node. This is the most complex but you can use this to only allow specific transitions to occur. Like if you only want the shutter to go from 78% closed to 100% closed at night but never from 100% back to 78% in the same night. Requires a bit more work/planning to get correct though.

Hi Mike / @CentralCommand

first thank You that You take so much time to help me!

My idea with the 1 minute was that when the temperature for some reason go for a short time under 5 degrees, the shutters don’t go directly down. But I think so often will be the temperature don’t updated?

You have wrote “above 5 for 1 minute”. Have I made a mistake? It should be under 5 for 1 minute.

I would like to do all in red-node only for this reason, that I want to learn the node-red and I like to have all on one place.

Thank You for the flow example. The limitation for only 1 time in 12 hours I don’t thing good, because it can happens, that the temperature go first at 11:00pm under 5 degrees. Or I don’t understand again correctly?

Once again me.

I’ve tried something different now

[{"id":"a30116f2.59553","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":160,"y":160,"wires":[["43cbfd79.d87b24"],["f4677fad.a0fcf"]]},{"id":"c147288e.624ad","type":"position-config","name":"Neuss","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]

and the shutters go down during the day. Could You tell me why?

You’re right, my bad, I accidently flipped the logic. My point was to make you aware of how the lower output works. You’re right that it will only go down if the temperature dips below 5 for a full minute. But the second it goes above 5 it will pop right back up. And it will also keep sending events telling the shutter to go to 0% down every single time the temperature changes at all (even a fraction of a degree) when it is above 5. That’s how the blocked (lower) output works, it sends an output every single time the state of the tracked entity changes and the conditional fails.

This is why I recommended 3 separate triggering nodes, one which watches when the temperature goes below 5 for a minute, one which watches when the temperature goes above 5 for a minute, and another which watches for sunset sunrise. I think using the blocked (lower) output on an events:state node is going to end up causing you problems with it firing too many times.

Yea I understand, it can get tricky to maintain when logic is spread all over. I guess the way I view it I see Node RED as my automation engine and HA as my state machine. Thinking about your problem my first impression was that it would be easiest to express “the position my shutter should be in” as state calculated from environmental conditions such as sun and temperature. This way HA will ensure that sensor is always correct based on available conditions and you can use history and logbook to see how and why it changed over time to debug.

But it can also be fully event driven and done purely in Node RED as flows, that works fine as well. And then yea you do get to see exactly how it all works right in one place instead of flipping between Node RED and YAML.

Yes that’s true. I was trying to figure out a way to limit the amount of times it automatically moved the shutter since it sounded like you could hear it move and didn’t want to hear it move all the time. I think the challenge you’ll have with your current flow is if the temperature is hovering right around 5 degrees. The automation will have a hard time with that since the temperature will likely fluctuate above and below making your shutter move up and down too often.

What I was thinking of with the 12 hour block was that what you really wanted it was for it kind of follow this progression:

  1. Open it up as soon as it sees it is a warm day. Leave it alone until sunset after that so you can manage it (i.e. don’t do anything for the rest of the daytime)
  2. Mostly close it once the sun goes down and its warm. Leave it alone after that until sunrise unless it gets colder, then close it fully. Maximum of two automated movements on any given night, other then that leave it alone and ignore any fluctuations.

If that doesn’t work for you though then the rate limit blocker can be adjusted down or removed entirely. If you do remove it entirely though just be careful about the “temp hovering around 5 degrees situation” as that would likely be frustrating hearing it go up and down every minute or so.

This export is just a single within-time node. Did you mean to export the flow?

Hi Mike,

sorry for the long delay but I didn’t have time to answer You.
I have tried a little bit… What do You think about this method:

So when the temperature go below 5 degrees, it will be only one time the message sent. First after “msg.reset” can be send message once again. How we can see, it works (temp. is from 12:25 and it was at 8:39 last time changed). The main problem is here: why the shutters go down even though we have a day??? Today at 8:39 was already by us bright and the shutters went down.
Next question would be, how can I block the tigger with number 2 with the tigger 1 (I don’t want, that when the shutters go down to 0%, at 2:00 am go to 27% when the temperature go above 5 degrees).

And here the whole flow (I hope):

[{"id":"c70e6ef0.37d27","type":"tab","label":"Rollos ersatz","disabled":false,"info":""},{"id":"505d8cc7.37bd54","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Schlafzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1040,"y":120,"wires":[[]]},{"id":"10dc5e6e.823062","type":"api-call-service","z":"c70e6ef0.37d27","name":"Wohnzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rollo_links","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":180,"wires":[[]]},{"id":"f4677fad.a0fcf","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Wohnzimmer Rollo auf 100%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.kuche_rollo, cover.rollo_links","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1040,"y":260,"wires":[[]]},{"id":"a30116f2.59553","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":150,"y":200,"wires":[["43cbfd79.d87b24","1ebbc1cb.06f966"],["70598897.367cf8","8b7dc871.6f625"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"43cbfd79.d87b24","type":"trigger-state","z":"c70e6ef0.37d27","name":"Temp draußen unter 5 Grad","server":"ad8e5e9e.dec0c","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.temperatur_aussen_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":4,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":"<=","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"},{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":">","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"}],"outputinitially":false,"state_type":"str","x":400,"y":60,"wires":[[],[],["999b9efb.abb64"],["eb667754.daeb8"]],"icon":"font-awesome/fa-thermometer-2"},{"id":"f1b2ba69.040f08","type":"api-call-service","z":"c70e6ef0.37d27","name":"Alle Rollos auf 0%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.alle_rollos_shuttergroup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":40,"wires":[[]]},{"id":"2dbf1abd.2b5576","type":"weekday","z":"c70e6ef0.37d27","name":"weekend","sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":true,"x":940,"y":180,"wires":[["10dc5e6e.823062"],[]]},{"id":"eb667754.daeb8","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":730,"y":120,"wires":[["505d8cc7.37bd54","2dbf1abd.2b5576"]]},{"id":"70598897.367cf8","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":140,"wires":[["eb667754.daeb8","999b9efb.abb64"]]},{"id":"999b9efb.abb64","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":730,"y":40,"wires":[["f1b2ba69.040f08"]]},{"id":"8b7dc871.6f625","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":730,"y":260,"wires":[["f4677fad.a0fcf"]]},{"id":"1ebbc1cb.06f966","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":180,"wires":[["8b7dc871.6f625"]]},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"c147288e.624ad","type":"position-config","name":"Neuss","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

Hello,

OK, the above solution don’t work. I have changed the sequence to:


Now I have the problem, that even though the temperature is above the 5 degrees, all shutters go down. What I make wrong by the temperature exits? :frowning:

Also I still don’t know, how can I block the second tigger with the first one :frowning:

Can somebody help me?

[{"id":"c70e6ef0.37d27","type":"tab","label":"Rollos ersatz","disabled":false,"info":""},{"id":"505d8cc7.37bd54","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Schlafzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1300,"y":120,"wires":[[]]},{"id":"10dc5e6e.823062","type":"api-call-service","z":"c70e6ef0.37d27","name":"Wohnzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rollo_links","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1420,"y":180,"wires":[[]]},{"id":"f4677fad.a0fcf","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Wohnzimmer Rollo auf 100%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.kuche_rollo, cover.rollo_links","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1300,"y":260,"wires":[[]]},{"id":"a30116f2.59553","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":"","endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":440,"y":40,"wires":[["999b9efb.abb64","1ebbc1cb.06f966"],["8b7dc871.6f625","70598897.367cf8"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"43cbfd79.d87b24","type":"trigger-state","z":"c70e6ef0.37d27","name":"Temp draußen unter 5 Grad","server":"ad8e5e9e.dec0c","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.temperatur_aussen_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":4,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":"<=","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"},{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":">","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"}],"outputinitially":false,"state_type":"str","x":140,"y":120,"wires":[[],[],["a30116f2.59553"],["b9c61c95.74258"]],"icon":"font-awesome/fa-thermometer-2"},{"id":"f1b2ba69.040f08","type":"api-call-service","z":"c70e6ef0.37d27","name":"Alle Rollos auf 0%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.alle_rollos_shuttergroup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1230,"y":40,"wires":[[]]},{"id":"2dbf1abd.2b5576","type":"weekday","z":"c70e6ef0.37d27","name":"weekend","sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":true,"x":1200,"y":180,"wires":[["10dc5e6e.823062"],[]]},{"id":"eb667754.daeb8","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":120,"wires":[["505d8cc7.37bd54","2dbf1abd.2b5576"]]},{"id":"70598897.367cf8","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":120,"wires":[["eb667754.daeb8","999b9efb.abb64"]]},{"id":"999b9efb.abb64","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":40,"wires":[["f1b2ba69.040f08"]]},{"id":"8b7dc871.6f625","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":260,"wires":[["f4677fad.a0fcf"]]},{"id":"1ebbc1cb.06f966","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":160,"wires":[["8b7dc871.6f625"]]},{"id":"b9c61c95.74258","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":"","endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":440,"y":240,"wires":[["eb667754.daeb8","1ebbc1cb.06f966"],["8b7dc871.6f625","70598897.367cf8"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"c147288e.624ad","type":"position-config","name":"Neuss","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]