Hi!
I suppose this one is pretty easy to solve but I can’t figure out how.
I want to read a json structure from an url and then send a push notification with a selected value using a json path.
I have tried this, which do not work. I also need to solve how to extract a single value from the returned json. Now the url returns a json structure, where I only want one of the values.
automation.yaml
- alias: BTC Price
trigger:
platform: time
at: '06:01:00'
action:
service: notify.ios_phone
data_template:
message: "BTC Price: {{ states('rest_command.btc_price') }} NOK"
configuration.yaml
rest_command:
btc_price:
url: "https://api.coinbase.com/v2/prices/BTC-NOK/buy"
method: 'GET'