Hi,
Sorry for being late.
Started with a py script to verify the functionality.
Created a .star file
Created a .sh file that runs pixlet render and pixlet push.
HA is running on one rPI and another one runs .sh file
Python script:
from requests import get
url = āhttps://YOUR IP/api/states/sensor.lumi_lumi_weather_5307_temperatureā
headers = {
āAuthorizationā: āYour Unique Codeā,
ācontent-typeā: āapplication/jsonā,
}
response = get(url, headers=headers)
data = response.json()
temp = data[āstateā]
print(ātemp:%sā
%(temp))
Something like this is what the .star file like
load(ārender.starā, ārenderā)
load(āhttp.starā, āhttpā)
url_in = āhttps://YOUR IP/api/states/sensor.lumi_lumi_weather_5307_temperatureā
headers = {
āAuthorizationā: āYour Unique Codeā,
ācontent-typeā: āapplication/jsonā,
}
def main(config):
font = config.get(āfontā, ā5x8ā)
response = http.get(url_in, headers=headers)
data = response.json()
temp_in = data[āstateā]
return render.Root(
child = render.Column(
expanded=True,
main_align="left",
cross_align="left",
children =[
render.Text("Inne: %s" % temp_in, font = font,), #vit