# Status sensor minus of

**URL:** <https://discourse.nodered.org/t/status-sensor-minus-of/70455>\
**Category:** General\
**Created:** [11 November 2022 14:39 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455 "2022-11-11T14:39:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![manustars](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manustars/32/70548_2.png) [@manustars](https://discourse.nodered.org/u/manustars)\
**Post date:** [11 November 2022 14:39 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/1 "2022-11-11T14:39:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2022 15:03 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/2 "2022-11-11T15:03:21Z")

</div>

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%

> [@manustars](#):
>
> the notification must arrive at 2 specific times each day

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.

---

<div class="post-metadata">

**Author:** ![manustars](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manustars/32/70548_2.png) [@manustars](https://discourse.nodered.org/u/manustars)\
**Post date:** [11 November 2022 15:12 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/3 "2022-11-11T15:12:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2022 15:51 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/4 "2022-11-11T15:51:48Z")

</div>

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

> [@manustars](#):
>
> what I can not is send the same notification to ghome only 2 times a day

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.

> [@manustars](#):
>
> tell him the percentage threshold to use of the specific sensor

I have no idea what that means.

---

<div class="post-metadata">

**Author:** ![manustars](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manustars/32/70548_2.png) [@manustars](https://discourse.nodered.org/u/manustars)\
**Post date:** [12 November 2022 06:35 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/5 "2022-11-12T06:35:53Z")

</div>

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

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 November 2022 11:48 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/6 "2022-11-12T11:48:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 January 2023 11:48 UTC](https://discourse.nodered.org/t/status-sensor-minus-of/70455/7 "2023-01-11T11:48:40Z")

</div>

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