-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make all functions async, utilise new Python wrapper, better exception handling, improved device mapping #160
Conversation
3a5911a
to
4f579b8
Compare
return | ||
self.controller.get_states([self.tahoma_device]) | ||
self.schedule_update_ha_state() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks not necessary? Do we know why this has been added here in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which part? last line?
schedule_update_ha_state()
writes down the states to HA. maybe not necessary in an update method indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure, we should test this thoroughly.
Awesome work! Did you notice any improvement in perf? |
Not really, since I don't have any devices nearby to test. Would be good if you and @vlebourl give it a try with all your devices for a while :). |
commit 1de0940 Author: Mick Vleeshouwer <[email protected]> Date: Thu Jul 23 22:21:56 2020 +0200 Squashed commit of the following: commit 6caeb9a Author: Vincent Le Bourlot <[email protected]> Date: Thu Jul 23 13:21:40 2020 +0200 Round float state to 2 digits. (#164) * Round float state to 2 digits. Github Issue: #163 commit e6b4c22 Author: Vincent Le Bourlot <[email protected]> Date: Thu Jul 23 11:50:11 2020 +0200 Cover position was incorrectly inverted when 0 because bool(0) == False. (#165) commit 05cd609 Author: Vincent Le Bourlot <[email protected]> Date: Thu Jul 23 08:27:39 2020 +0200 Enhancement/refactor climate (#159) * First commit for AtlanticElectricalHeater. Github Issue: #151 * Refactored climate. * **Breaking** Removed options flow * **Breaking** Removed SUPPORT_TARGET_TEMPERATURE for AtlanticElectricalHeater IO component * Removed private properties. * Removed update methods. * Removed __init__ when possible. * Moved classes to their own files. * Add DimmerExteriorHeating Github Issue: #151 * Fix/fix 161 (#162) Github Issue: #161 commit 4f1b0a7 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 14:46:13 2020 +0200 Change debug text commit f212bc6 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 14:22:44 2020 +0200 Reference to the right DOMAINS commit 67e09af Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 14:17:11 2020 +0200 Reference to official domains commit a1cf008 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 14:04:37 2020 +0200 Add missing LOCK import commit c971da9 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 14:00:06 2020 +0200 Add constants instead of ugly strings commit 22a1623 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 13:49:08 2020 +0200 Change PLATFORMS to SUPPORTED_PLATFORMS commit a57d246 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 13:08:12 2020 +0200 Revert removal of DOMAIN commit bf410ec Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 13:05:30 2020 +0200 Remove unused imports commit 4884a5f Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 13:02:27 2020 +0200 Reformat switch.py commit 01c1df1 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 12:59:19 2020 +0200 Bugfix for switch commit a13348f Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 12:48:39 2020 +0200 Close client before removing client... commit 15bb8cd Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 12:45:53 2020 +0200 Make code more readable commit d896200 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 12:43:59 2020 +0200 Close HTTP client correctly Thanks @eavanvalkenburg! commit 24b7190 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 10:18:31 2020 +0200 Remove unnecessary loop commit 28cd639 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 09:45:46 2020 +0200 Refactor based on feedback commit d3ccafe Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 01:07:08 2020 +0200 Simply config flow and add better exception logging commit c38f2e5 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 01:01:39 2020 +0200 Only initialize platforms with devices and decide platform based on uiclass and widget commit 4f579b8 Author: Mick Vleeshouwer <[email protected]> Date: Tue Jul 21 00:31:28 2020 +0200 Add async Python API wrapper
1de0940
to
8e4b8b2
Compare
@@ -1,7 +1,7 @@ | |||
"""Support for TaHoma sensors.""" | |||
from datetime import timedelta | |||
import logging | |||
from typing import Optional | |||
from typing import List, Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you import list @vlebourl? Looks not used. :)
Depending on #159.