Status sensor minus of

I know it's trivial, but I can't. I would like to create a flow that sends me a message on telegram and a voice message on google home (for google invoking the tts service of HA) when an ha sensor drops below 20%. the notification must arrive at 2 specific times each day

Welcome to the forum @manustars

Which bit(s) don't you know how to do?

  1. Send telegram message
  2. Send voice message
  3. detect sensor below 20%

Do you mean you only want it to test twice a day? If so then perhaps that is the bit you don't know how to do.

Having asked those questions, note that few here use HA so if you want to use HA nodes then you may be asking in the wrong forum. If you want to use node-red nodes to do it then this is the right place.

the messages to telegram I have already implemented them on other notifications, what I can not is send the same notification to ghome only 2 times a day and tell him the percentage threshold to use of the specific sensor

Please try and answer all the questions carefully. Remember we know nothing about your system other than that which you tell us.

Which don't you know how to do? Send it ghome or only send it two times a day?

If it is the two times a day then do you mean you want it to test it twice a day? If so then you can use node-red-contrib-cron-plus to trigger the test at the times you require.

I have no idea what that means.

you're right, I try to explain better. I have 1 sensor in HA that measures the load percentage of a tank, when this value falls below a set threshold it must send a message on telegram and the same message on ghome in 2 established times and in the message it must report the sensor value.

this an example i try

[{"id":"8030dcb2a33ca05b","type":"tab","label":"Pellet","disabled":false,"info":"","env":[]},{"id":"ASDDFGHJK","type":"api-current-state","z":"8030dcb2a33ca05b","name":"","server":"11a044ea.ff462b","version":3,"outputs":2,"halt_if":"60","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.pellet_serbatoio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":190,"y":200,"wires":[["0d42d4702532281c"],["4e7c457b0afa7457"]]},{"id":"4e7c457b0afa7457","type":"change","z":"8030dcb2a33ca05b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"\"Pellet al \" & $.payload","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":100,"wires":[["02234e7e1599e95c","b2dad826f2083fbb"]]},{"id":"02234e7e1599e95c","type":"function","z":"8030dcb2a33ca05b","name":"Create message","func":"msg.payload = {\n  chatId: '123432123',\n  type: 'message',\n  content: msg.payload\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":340,"wires":[["43660e5ae587d142"]]},{"id":"43660e5ae587d142","type":"telegram sender","z":"8030dcb2a33ca05b","name":"","bot":"e7e2dbbdc747e438","haserroroutput":false,"outputs":1,"x":790,"y":160,"wires":[[]]},{"id":"b2dad826f2083fbb","type":"api-call-service","z":"8030dcb2a33ca05b","name":"","server":"11a044ea.ff462b","version":5,"debugenabled":false,"domain":"tts","service":"google_say","areaId":[],"deviceId":[],"entityId":["media_player.salotto","media_player.studio"],"data":"{\"message\": \"Pellet al {{payload}}.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"str"}],"queue":"none","x":720,"y":80,"wires":[[]]},{"id":"0d42d4702532281c","type":"debug","z":"8030dcb2a33ca05b","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":320,"y":340,"wires":[]},{"id":"987654321","type":"server","name":"Home Assistant","addon":true},{"id":"123456789","type":"telegram bot","botname":"NAMEBOT","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]

As that flow is mostly HA nodes, of which I know nothing, that doesn't help much.

As I said you can use node-red-contrib-cron-plus to give you a trigger twice a day. You could then use a Join node (or flow context) to join that with the current sensor state and decide whether to send the message.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.