psyciknz
(Psyciknz)
1
I have a JSON file I want to pull from the internet and parse some information from it.
It’s not just a simple json path - since I’m not sure if a restful sensor can do it:
$..[?(@.name == 'ZM Wellington')].mjh_master
So i looked at a python_script which would have updates and input_text entity. But I see there’s no requests package when executing in python.
So Then I tried a command line sensor to execute the python (with a home assistant api command to update the input_text).
What woudl be the preferred way to do it, I am considering a custom component
mekaneck
(Rick Auch)
2
If you know jq, there is probably a way to do what you want with a command line sensor using curl and jq. Here’s a thread walking through it:
psyciknz
(Psyciknz)
3
I think i ended up with a command line sensor that called a python script that returned the text I wanted to add