• Bod

    Thank you, working perfectly now.

    You are all amazingly helpful. Couldn't have solved this so quickly without all your help.

    posted in Pythonista read more
  • Bod

    Right, I've figured where the KM value is & I've added a new line of code which takes the KM and divides by 1.6 which should give me a rough mileage conversion.

    Just need to figure out how to round it up neatly now.

    result = requests.get(url, headers=headers).json()
      convert = ({result['remaining_range']/1.6})
      if result['charging']:
        minutes = result['remaining_time']
        remaining = fuzzy_duration(minutes)
        status = f"done charging in {remaining}"
        status = "is not charging"
      return f"{carname} can go {convert} miles. Battery is {result['charge_level']}% full and {status}."

    I notice there is a programming tool called 'round', but I can't seem to get it to work.

    I tried convert = round ({result['remaining_range']/1.6})

    posted in Pythonista read more
  • Bod

    Ah !!! ... Thank you so very much.

    I didn't even see the + sign. Doh !!!

    It's working now, so all I have to do is alter the code to display miles instead of km.
    This should be fairly simple (i hope).

    posted in Pythonista read more
  • Bod

    That instruction is in there at the bottom of the script, but it only actions 'if shortcuts.is_shortcut():'

    I'm totally new to this, so don't really know what it is looking for to make the statement true.

    posted in Pythonista read more
  • Bod

    I've recently bought myself a lovely Zoe R110 ZE40 electric car, and stumbled across this on the web.


    I really liked the idea of having Siri tell me the status of my car, so bought & downloaded Pythonista 3 to my iPhone X and then shifted over to the beta so that I could use shortcuts.

    I have very little programming knowledge, but have the script running on my iPhone just fine. The thing is I am struggling with the shortcut, as when I tap on the shortcut I created it just open Pythonista and then a text displays the results.

    Anyone know how too make Siri say the results please?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!