BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
612 stars 61 forks source link

SyntaxWarning: "is not" with a literal #676

Closed holdestmade closed 10 months ago

holdestmade commented 10 months ago

Describe the bug

This appeared in the logs on start up, not seen it in previous versions

Reproduction steps

Restart HA

Expected behaviour

NA

Tariff Code

E-1R-FLUX-IMPORT-23-02-14-M

Integration Version

v10.0.0

Home Assistant Version

2023.12.4

Fresh Install?

After upgrading

Home Assistant Logs

This error originated from a custom integration.

Logger: py.warnings Source: custom_components/octopus_energy/number.py:4 Integration: Octopus Energy (documentation, issues) First occurred: 9:05:57 am (1 occurrences) Last logged: 9:05:57 am

/config/custom_components/octopus_energy/intelligent/charge_limit.py:102: SyntaxWarning: "is not" with a literal. Did you mean "!="? if last_state.state is not "unknown":

Confirmation

BottlecapDave commented 10 months ago

Thanks for raising. I'll try and fix this warning over the weekend.

BottlecapDave commented 10 months ago

This should now be fixed in v10.0.1.