Current entity value notification question (gas prices)

Hi everyone, Not sure if this is even possible but I have scrape sensors that are watching gas prices. is it possible to either use an automation or node-red to send me a notification with the current state / value of my gas price entity? I would love to see your examples Thank you

Hi there, you havent explained what type of notification you want but in any case you would be able to use the message like below to get notified with the sensor state value.

service: notify.whatsapp
data:
  message: The Current Gas Price is '{{states('sensor.gas_price')}}'

Please adapt this to your system or if you want more help do explain

My apologies for the lack of information. I am still very new to the date entry side of Node-Red. I am getting an error, here’s a screenshot of my node.
fuel1

Hi there, please copy the below code and then go to node red, click CTRL+I to import code, a window will pop up and you need to paste this code in it and click import. 3 nodes will be imported. Deploy it and try

[{"id":"d136f2410520aa03","type":"inject","z":"51045e07.bbf87","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1280,"wires":[["27039604e1c2b0e8"]]},{"id":"27039604e1c2b0e8","type":"api-current-state","z":"51045e07.bbf87","name":"Fuel Price","server":"d177950.2a5aa68","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.kroger_regular_fuel_price","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":1280,"wires":[["edd3bf2e59be9e68"]]},{"id":"edd3bf2e59be9e68","type":"api-call-service","z":"51045e07.bbf87","name":"Notification","server":"d177950.2a5aa68","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_sm_g975u","entityId":"","data":"{\"message\":\"The Current Gas Price is {{payload}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":1280,"wires":[[]]},{"id":"d177950.2a5aa68","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"credentials":{}}]

Here the second node is a current state sensor which gets the current state of the gas price sensor and passes it to the call service node which takes this payload and adds it to the part of the message.
If you have any issues do ask

1 Like

You rock!! Thanks a ton! I’ll give it a try soon

It works Beautifully!! Thank you sheminasalam!!

1 Like