Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tempf2tempc function missing #249

Closed
BertLindeman opened this issue Apr 2, 2023 · 3 comments
Closed

tempf2tempc function missing #249

BertLindeman opened this issue Apr 2, 2023 · 3 comments

Comments

@BertLindeman
Copy link
Contributor

Running the current PyQtPiClock from the master repo with the Config-Example-Berlin
Probably related to issue #185

Traceback (most recent call last):
  File "PyQtPiClock.py", line 1050, in wxfinished_tm2
    s += '%.0f' % tempf2tempc(f['values']['temperature']) + u'°C'
NameError: global name 'tempf2tempc' is not defined
Traceback (most recent call last):
  File "PyQtPiClock.py", line 1150, in wxfinished_tm3
    '%.0f' % tempf2tempc(f['values']['temperatureMin']) + u'°C'
NameError: global name 'tempf2tempc' is not defined

Also seen:

  File "PyQtPiClock_newissue.py", line 1152, in wxfinished_tm3
    s += Config.LRain + '%.0f' % inches2mm(paccum) + 'mm/hr '
NameError: global name 'inches2mm' is not defined

Added similar functions near line 300, and tested OK, but probbly there are now duplicates.

def tempm(f):
    return (f - 32) / 1.8


def tempf2tempc(f):
    return (f - 32) / 1.8


def inches2mm(f):
    return f * 0.621371192


def speedm(f):
    return f * 0.621371192

Maybe related: The forcast squares on the right side have English text not translated to German.

@SerBrynden
Copy link
Contributor

n0bel copied my functions for Tomorrow.io but didn't test it to notice that I renamed the functions for unit conversions. ;-)

Not sure about the language translation yet. I'm on the road right now and can't take a look.

@n0bel
Copy link
Owner

n0bel commented Apr 2, 2023

fixed all these issues in 6080cd9

@BertLindeman
Copy link
Contributor Author

Speedy Gonzales 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants