In my configuration.yaml file I am fetching some temperature and humidity data from an api. I am successfully displaying this data on my dashboard.
I want to send the data as a notification but I can’t figure out how to add the variables into a notification message. Any help would be great.
Configuration.yaml
> sensor:
> - platform: rest
> name: Room Temperature
> resource: https://api.thingspeak.com/channels/channel_no/feeds.json?api_key=myapikey&results=2
> value_template: ' {{ float(value_json["feeds"][0]["field1"]) }}'
> unit_of_measurement: "°C"
Automation.yaml
- id: ‘1234’
alias: Temperature
description: ‘’
trigger:
condition:
action:
- service: notify.telegram_bot
metadata: {}
data:
message: Temperature is (variable here)
mode: single