Skip to content
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
merged 50 commits into from
Oct 30, 2023

Conversation

xZetsubou
Copy link
Owner

@xZetsubou xZetsubou commented Oct 16, 2023

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

  • Fix: SubDevices and Devices Automatic update IP if changed.
  • Feature: If Sub Device added using discovered not manually, gateway_ip will be stored as well to include it on automatic change IP if changed.

@xZetsubou xZetsubou changed the title Rework SubDevices Connection [3.2.0] Rework SubDevices Connection and fixes Oct 24, 2023
xZetsubou and others added 2 commits October 26, 2023 00:44
…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 xZetsubou changed the title [3.2.0] Rework SubDevices Connection and fixes [3.2.0] Rework SubDevices Connection and more Oct 25, 2023
xZetsubou and others added 19 commits October 26, 2023 00:49
* 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.
@xZetsubou xZetsubou merged commit eab5385 into master Oct 30, 2023
3 checks passed
@xZetsubou xZetsubou deleted the rework_subdevices_connect branch November 19, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment