ljmerza / ha-email-sensor

Email Sensor for collecting tracking numbers from over 40 providers.
MIT License
91 stars 24 forks source link

Component breaks all HA sensors #5

Closed danodemano closed 5 years ago

danodemano commented 5 years ago

Tried to install and get this in the logs:

  File "/root/.homeassistant/custom_components/email/sensor.py", line 60
    _LOGGER.error(f'IMAPClient setup_platform error: {err}')
                                                          ^
SyntaxError: invalid syntax

Which not only broke itself but ALL my sensors in HA.

Running HA 0.91.4

ljmerza commented 5 years ago

that's weird. f-strings has been supported since python 3.6 do you know what version you are on?

danodemano commented 5 years ago

I'm on 3.5.3 which is still supported by HA. Guess we found the "problem" :)

ljmerza commented 5 years ago

Ah ok i pushed the change to format()

danodemano commented 5 years ago

Thanks! Another error though now:

  File "/root/.homeassistant/custom_components/email/sensor.py", line 120
    return f'email_{self.email_address}'
                                       ^
SyntaxError: invalid syntax
ljmerza commented 5 years ago

ok fixed

danodemano commented 5 years ago

Looks like that got it, thanks!