Comments (3)
Thanks for this. The short answer is I'm not sure! I've not worked with the asyncio stuff before, or used packages that have. I think I probably agree with your preferred option of a different repo unless there's a well established pattern that others have used for other python packages.
If we do go with the separate repo, it presumably makes sense to host it under your github account. I'm obviously more than happy to make sure there are links from github and docs to the other repo to make sure people can find it.
from evohome-client.
OK, I'll implement as a separate github repo, and a separate pypi package. The plan will be to make minimal changes, and certainly keep as close as possible to the existing docs:
Old way:
try: # this invokes client._login
client = self.client = evohomeclient3.EvohomeClient(
self.params[CONF_USERNAME],
self.params[CONF_PASSWORD],
refresh_token=refresh_token,
access_token=access_token,
access_token_expires=access_token_expires
)
except (
requests.exceptions.RequestException,
evohomeclient2.AuthenticationError,
) as err:
if not _handle_exception(err):
return False
finally:
self.config = client.installation_info[loc_idx][GWS][0][TCS][0]
New way (add client.login()
because you can't do asyncio in __init__()
):
client = self.client = evohomeclient3.EvohomeClient(
self.params[CONF_USERNAME],
self.params[CONF_PASSWORD],
refresh_token=refresh_token,
access_token=access_token,
access_token_expires=access_token_expires,
debug=True
)
try:
await client.login()
except (
aiohttp.ClientResponseError,
evohomeclient2.AuthenticationError,
) as err:
if not _handle_exception(err):
return False
finally:
self.config = client.installation_info[loc_idx][GWS][0][TCS][0]
from evohome-client.
OK, evohome-async is up, and is based upon your 0.3.3.
evohomeclient2 is (fully?) ported, but evohomeclient1 is not yet ported.
I'd be pleased to give you write access to the github repo and/or pypi package if you wish.
from evohome-client.
Related Issues (20)
- New TotalConnectComfort WebAPI HOT 2
- Evohome multiple locations HOT 3
- Issue durring adding repository. HOT 1
- Could we use black for formatting? HOT 4
- Password madness
- Current thermostat status? HOT 3
- Master branch version HOT 2
- ECO/BOOST function HOT 1
- Hot water temps occasionally fail to come back HOT 1
- Accessing the "custom" schedule HOT 2
- control_systems is empty HOT 4
- heat demand per zone HOT 8
- backup function gives error HOT 4
- Logic error in evohomeclient/__init__.py
- While setting new temp on version, I received an error : Error while SetTempE2 HOT 2
- Inferior exception reporting in v2 client HOT 9
- Data no longer automatically refreshed when calling EvohomeClient.temperatures() HOT 7
- evohomeclient2 fails to use user credentials after refresh_token fails HOT 4
- evohomeclient2 fails to use user credentials after refresh_token fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evohome-client.