forked from rospogrigio/localtuya
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce auto configure device (#33)
* Use HA Consts for platforms and change to dict * Refresh the token if expired, when request made * Clean up and remove get_access_token from config_flow.py * revert obtain access token if config_flow installtion. * Add icon support and entity names now follow device_name. * add notice for entity friendly name * Apply device class for all entites. * pushed wrong common on last commit. * Remove OFF STATE relay only on STATE_ON. * use true as default on state always. * configure config_entry on migrating * Scenes and Select Values now separate by comma * adjust expectaion msgs only shows when device debug true * adjust name entity * Sensor: Now Support STATE_CLASS * add context infos for sensors * Move CONF_STATE TO Const.py * config flow reconnect and passive to optional * Climate now MIN AND MAX temp manually setted * update climate.py * add device_class for [switch, cover, numbers] * restore icon if entity has one [auto_feature] * add note in climate * ADD Siren platform * ADD auto configure support and tuya data files, new folder * Label cover position values * auto configure: sort entites by id. * adjust parse function for enum * parse enum before export template * Optimize the token refresh method. * refresh token `30 secs before` it expires * just preparing for numbers to support native units * Adjust tuya_device data by adding localtuya to define configs * add select function to tuya_data selects * remove native comments for now * events states_update -> device_updated * add RELAY_STATUS posssibilty to "kg" * Revert event to states_update * Fix: when auto detect fails always return same msg * Auto Detect: Add more codes, entity. * update en.json * en.json typo * Auto Detect: Add function for sensors for localtuya configs. * Add unit of measurement for numbers. * add more codes * Add some stuff for future * update en.json * typo ms -> mc * rename configure device flow title * small adjustments * Handle tuple if codes isn't in detected dps * Dimmer support up to 4 LED * Auto detect: Fix tuple check and lights brightness typo * Auto Configure: Remove duplicated category and fix typo * Revert climate to use min and max dp. * Auto Configure: Add Code: Battery Sensors * Fix: ZigBee `3.4` devices updates affect other nodes on same GW * Fix `3.3` Sub devices control. * typo.
- Loading branch information
Showing
35 changed files
with
5,355 additions
and
249 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.