forked from rospogrigio/localtuya
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[3.2.0] Rework SubDevices Connection and more #38
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xZetsubou
changed the title
Rework SubDevices Connection
[3.2.0] Rework SubDevices Connection and fixes
Oct 24, 2023
…ctions (#47) * Add support for humidifier platform * Add Humidifer to Auto Configure feature. * Improve English translations to be more user friendly #45 by @codyc1515
xZetsubou
changed the title
[3.2.0] Rework SubDevices Connection and fixes
[3.2.0] Rework SubDevices Connection and more
Oct 25, 2023
* Initialized msg to `common.py` and del: `dp_value_conf` * def should_pull to _attr_should_pull and refactor restore_on_reconnect * refactor entity category * Refactor: `device_info` and properties annotation
* Connecting `CloudAPI` runs on background without interrupt initialization. * Unload: pulls platforms from `TuyaDevice` data Explain: #50
* DPS Data now will be pulled with devices data, data stored in `device_id` -> in `devices_list` with `dps_data` key. * Adding new device DPS Data will be pulled from stored data `except the value!` * Devices list in config flow now will be sorted: Starting from known devices first. * Refresh cloud devices data when configure opened. `previously reload was needed in order to pull new devices data.` * Handle the errors if refreshing token failed.
* Templates list field are now insertable and searchable, so if you add templates new template into `templates` directory you can manually enter there name without need to load them up with HA boot. * Templates names now will shows the same as filename with extension.
* * Refactor codes a little bit to make it easier to maintain. * cloud_api now has async_connect function. * Localtuya HASS Data is now stored as namedtuple `HassLocalTuyaData` * Removed `TUYA_DEVICES`, `DATA_CLOUD` and `UNSUB LISTENERS` * Sotred all unsub_callback in tuya_devices.unsub_listeners * Reconnect if disconnected will be called after 2secounds. * Fix reconnect after 2 secounds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally we create new connection for each sub devices, this caused an issue for some gateways that doesn't accept multi connection at the same time.
So?
We create 1 connection to gateway and pass the sub devices commands through this gateway.
Resolves #37
Fake Gateways Fails 0a78f89 closes #39
Lights after migrating fbdc809 closes #40
Entity_category default function 9ab8246 closes #41
Reconfigure step: cfe5003 closes #44
IP
if changed.