omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Bod

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    Bod

    @Bod

    0
    Reputation
    499
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Bod Unfollow Follow

    Latest posts made by Bod

    • RE: Renault Zoe & Siri integration

      Thank you, working perfectly now.

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

      posted in Pythonista
      Bod
      Bod
    • RE: Renault Zoe & Siri integration

      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}"
        else:
          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
      Bod
      Bod
    • RE: Renault Zoe & Siri integration

      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
      Bod
      Bod
    • RE: Renault Zoe & Siri integration

      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
      Bod
      Bod
    • Renault Zoe & Siri integration

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

      https://adrian.schoenig.me/blog/2019/01/20/hey-siri-preheat-my-car/

      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
      Bod
      Bod