diff --git a/README.md b/README.md index e4072c7..dc1b5b0 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ You should see your display update with the current price! ``` @reboot sleep 10; cd /home/$USER/octopus-agile-pi-prices; /usr/bin/python3 octoprice_main_inky.py > /home/$USER/cron.log */30 * * * * sleep 20; cd /home/$USER/octopus-agile-pi-prices; /usr/bin/python3 octoprice_main_inky.py > /home/$USER/cron.log - 05 16 * * * cd /home/$USER/octopus-agile-pi-prices; /usr/bin/python3 store_prices.py -r -t > /home/$USER/cron.log + 25 16 * * * cd /home/$USER/octopus-agile-pi-prices; /usr/bin/python3 store_prices.py -r -t > /home/$USER/cron.log ``` Substituting the tariff and region as before. diff --git a/octoprice_main_inky.py b/octoprice_main_inky.py index 4a09066..045d485 100644 --- a/octoprice_main_inky.py +++ b/octoprice_main_inky.py @@ -351,7 +351,7 @@ #lowest_price_next_24h = min(i for i in prices if i > 0) lowest_price_next_24h = min(i for i in prices) if (lowest_price_next_24h < 0): - chart_base_loc = 104 + lowest_price_next_24h*pixels_per_h - 2 # if we have any negative prices, shift the base of the graph up! + chart_base_loc = chart_base_loc + lowest_price_next_24h*pixels_per_h - 2 # if we have any negative prices, shift the base of the graph up! print("lowest price Position:", prices.index(lowest_price_next_24h)) print("low Value:", lowest_price_next_24h) @@ -395,9 +395,9 @@ time_of_cheapest = the_now_local + datetime.timedelta(minutes=min_offset) print("cheapest at " + str(time_of_cheapest)) print("which is: "+ str(time_of_cheapest.time())[0:5]) - time_of_cheapest_formatted = "at " + (str(time_of_cheapest.time())[0:5]) - font = ImageFont.truetype(FredokaOne, 16) - draw.text((right_column,101), time_of_cheapest_formatted, inky_display.BLACK, font) + time_of_cheapest_formatted = "Updated " + (str(the_now_local.time())[0:5]) + font = ImageFont.truetype(FredokaOne, 11) + draw.text((right_column,105), time_of_cheapest_formatted, inky_display.BLACK, font) # render the actual image onto the display