Need help with node red and cover lux sensor

Is your installation up to date? home assistant and node red? Check one more thing in the right side hamburger menu choose manage palette. Look for home assistant web socket nodes, if there is an option to update click it then follow the prompts.

If an update was necessary try the flow again after restart.

no, all is up to date

That error, entity not found in cache, usually occurs when node red isn’t connected to HA yet. Can you check the logs on the addon page after you trigger the current state node with one of the missing entities?

Ok, i have do this but nothing is in addon log.
It seems after a deploy, the light sensor are not found,
an inject solve this and give a value

Are either of the 2 flows working now? No?

Open any home assistant node click the pencil next to server

image

Make sure the global option is checked, you may need to restart NR for it to populate.

image

Just in general when deploying flows chose the modified nodes option.

image

i have do the steps. The mesaage wont appear again in addon logs now
But the flow wont work
Other flows like a telegram notify, or turn lights on at a specific timestamp works.

So both sensors now have a value inside node red? Try just the lux sensor to get the shade to operate.

[{"id":"d5a3899a3ad0da93","type":"inject","z":"dc92d257f8d80dcf","name":"Abfragen","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":790,"y":80,"wires":[[]]},{"id":"d95c5194b69fe3c9","type":"server-state-changed","z":"dc92d257f8d80dcf","name":"lux > 5000","server":"6b1110b5.183a4","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.esphome_web_d724cf_lightsensfront","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"5000","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":120,"wires":[["feeae131967e3b7f"],["74372ff648da6aa2"]]},{"id":"feeae131967e3b7f","type":"api-call-service","z":"dc92d257f8d80dcf","name":"Close","server":"","version":5,"debugenabled":false,"domain":"cover","service":"close_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":80,"wires":[["586fd9da58dbe015"]]},{"id":"ea4b51a01ccd5532","type":"api-call-service","z":"dc92d257f8d80dcf","name":"Stop","server":"","version":5,"debugenabled":false,"domain":"cover","service":"stop_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":690,"y":80,"wires":[[]]},{"id":"586fd9da58dbe015","type":"delay","z":"dc92d257f8d80dcf","name":"60% zu","pauseType":"delay","timeout":"8","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":540,"y":80,"wires":[["ea4b51a01ccd5532"]]},{"id":"63704aaa62496f66","type":"api-call-service","z":"dc92d257f8d80dcf","name":"Open","server":"","version":5,"debugenabled":false,"domain":"cover","service":"open_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":570,"y":140,"wires":[[]]},{"id":"74372ff648da6aa2","type":"delay","z":"dc92d257f8d80dcf","name":"Warte 2 min","pauseType":"delay","timeout":"2","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":410,"y":140,"wires":[["63704aaa62496f66"]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"id","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

yes. This flow works. Tested

I’ have switched it for test to notify to telegram.
otherwise the roller blind would move every few minutes.
But it works.
I would have to set the interval for measuring in the sensor to 10 minutes in esphome

Ok lets add the position of the shade so it will only move if the position is > 60 and the lux is over 5000. When it is under 5000 and the shade is < 100.

[{"id":"a790e891dfee9637","type":"server-state-changed","z":"0a325c35fc29f44e","name":"lux > 5000","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.esphome_web_d724cf_lightsensfront","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"5000","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":4360,"wires":[["b3fbd2a8d956b388"],["fea317e5206bda07"]]},{"id":"14b5e30536d8187a","type":"api-call-service","z":"0a325c35fc29f44e","name":"Close","server":"","version":5,"debugenabled":false,"domain":"cover","service":"close_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":570,"y":4320,"wires":[["0a8cbe6df8cf0ec9"]]},{"id":"df7b0dc0e3bc1881","type":"api-call-service","z":"0a325c35fc29f44e","name":"Stop","server":"","version":5,"debugenabled":false,"domain":"cover","service":"stop_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":4320,"wires":[[]]},{"id":"0a8cbe6df8cf0ec9","type":"delay","z":"0a325c35fc29f44e","name":"60% zu","pauseType":"delay","timeout":"8","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":720,"y":4320,"wires":[["df7b0dc0e3bc1881"]]},{"id":"f0d69693a929d062","type":"api-call-service","z":"0a325c35fc29f44e","name":"Open","server":"","version":5,"debugenabled":false,"domain":"cover","service":"open_cover","areaId":[],"deviceId":["672510dd0a42cd4c4f7e6838c9f49128"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":4380,"wires":[[]]},{"id":"4bf963ad2c06e250","type":"delay","z":"0a325c35fc29f44e","name":"Warte 2 min","pauseType":"delay","timeout":"2","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":590,"y":4380,"wires":[["f0d69693a929d062"]]},{"id":"b3fbd2a8d956b388","type":"api-current-state","z":"0a325c35fc29f44e","name":"Cover > 60","server":"","version":3,"outputs":2,"halt_if":"$entity().attributes.current_position > 60","halt_if_type":"jsonata","halt_if_compare":"jsonata","entity_id":"cover,rollo_buro","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"date"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":390,"y":4320,"wires":[["14b5e30536d8187a"],[]]},{"id":"fea317e5206bda07","type":"api-current-state","z":"0a325c35fc29f44e","name":"Cover < 100","server":"","version":3,"outputs":2,"halt_if":"$entity().attributes.current_position < 100","halt_if_type":"jsonata","halt_if_compare":"jsonata","entity_id":"cover,rollo_buro","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"date"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":390,"y":4380,"wires":[["4bf963ad2c06e250"],[]]}]

cool, that works now !
Thank you very much for your help.

I think I’ll test it again with the positions