I’ve been doing housekeeping and working on streamlining/combining inefficient code I wrote when I was new to HA.
I use curl quite a bit to get sensor data from text files stored on other computers on my network. I’m interested in whatever method uses the fewest resources on my slow RPi3B.
Is there any performance difference between these two methods of getting the contents of a text file?
- platform: command_line
command: "curl 'http://192.168.0.2:8888/airpods/airpods-case.txt'"
scan_interval: 300
name: Airpods case
unit_of_measurement: '%'
- platform: command_line
command: python3 -c "import requests; print(requests.get('http://192.168.0.2:8888/airpods/airpods-case.txt').text)"
name: Airpods case
Thanks.