Commit Graph

703 Commits

Author SHA1 Message Date
Pierre Ståhl
4e72767b30 Fix flake8 issues and enable flake8 in tox 2020-09-23 17:50:24 +02:00
Pierre Ståhl
a18c69f8eb Fix pydocstyle issues and enable in tox 2020-09-23 16:47:08 +02:00
Pierre Ståhl
ec7652b193 Remove pull_request_target from ci workflow 2020-09-22 12:41:03 +02:00
Pierre Ståhl
30392d3ac5 Initial step to have continuous integration
This commit introduces the use of tox, which currently only verifies
that code is formatted according to the black project. More checks will
come in upcoming PRs for codespell, pydocstyle, flake8 and mypy.

A GitHub actions is included that runs tox on new pull requests, so we
get automatic feedback and can block commits that fail any check.
Another (official) action that runs hassfest is included as well, to
make sure we are compatible with Home Assistant.
2020-09-22 12:29:05 +02:00
rospogrigio
83b3b6f21b Moved TuyaCache to __init__.py, and renamed to TuyaDevice. In pytuya, renamed TuyaDevice to TuyaInterface 2020-09-22 00:51:33 +02:00
Pierre Ståhl
dd48fc00f5 Make light entity inherit from LocalTuyaEntity 2020-09-21 23:56:54 +02:00
Pierre Ståhl
b169c86473 Make fan platform inherit from LocalTuyaEntity
Also big clean up and some bug fixes.
2020-09-21 23:55:56 +02:00
Pierre Ståhl
16e4e9407f Reload integration if config entry changes
This makes changes under options apply without restart.
2020-09-21 00:46:26 +02:00
rospogrigio
3a61e0feff Merge pull request #28 from postlund/sensor
Add generic sensor platform
2020-09-21 00:43:44 +02:00
Pierre Ståhl
1e23120872 Add device discovery to config flow 2020-09-21 00:43:06 +02:00
Pierre Ståhl
1cc8efece4 Fix sensor scaling 2020-09-20 19:32:09 +02:00
rospogrigio
ffae9976f0 Updated tuyadebug.tgz 2020-09-20 09:50:43 +02:00
Pierre Ståhl
26d83774e2 Add generic sensor platform 2020-09-19 23:43:12 +02:00
rospogrigio
c266e0f904 add_request_dps moved into prepare_setup_entities, plus code cleaning 2020-09-19 15:59:59 +02:00
rospogrigio
6700e02c52 set_dpsUsed turned into add_dps_to_request ; used it when setting up entities 2020-09-19 15:59:59 +02:00
Pierre Ståhl
5507652bae Add support for options flow 2020-09-18 17:31:14 +02:00
rospogrigio
6f14df2d74 Replaced some hardcoded strings with constants and config_entries 2020-09-18 14:45:51 +02:00
rospogrigio
1a9f7382fc LocaltuyaCover now inherits from LocalTuyaEntity 2020-09-18 14:45:51 +02:00
rospogrigio
7afd19d197 Still prefer to keep '(YAML)' suffix for Integrations imported from YAML, for the moment 2020-09-18 09:40:12 +02:00
Pierre Ståhl
e79b4cf619 Use friendly_name instead of name in config entry 2020-09-18 09:40:12 +02:00
Pierre Ståhl
9973c5fdcb Pass config entry to LocalTuyaEntity 2020-09-18 09:14:12 +02:00
Pierre Ståhl
bd98b7cd93 Add base entity class LocalTuyaEntity
All platforms will inherit from this class in the end, but this commit
starts with switch only.
2020-09-18 09:14:12 +02:00
rospogrigio
16cb29297b Introduced dps detection with bruteforcing for type_0d devices 2020-09-16 19:36:51 +02:00
Pierre Ståhl
0290b11dae Request DPS 1-150 in config flow 2020-09-16 19:36:51 +02:00
rospogrigio
9d917fe325 Merge branch 'physical_device' 2020-09-16 10:03:37 +02:00
rospogrigio
4056c0abb0 Fixing device name 2020-09-16 10:03:19 +02:00
rospogrigio
baee524d54 Merge branch 'physical_device' 2020-09-15 23:32:00 +02:00
rospogrigio
c99cc1f077 Removed unneeded friendly_name fields 2020-09-15 23:31:33 +02:00
rospogrigio
400ad57e01 Merge branch 'master' into physical_device 2020-09-15 12:55:46 +02:00
rospogrigio
b0ee281894 Merge branch 'master' into pytuya_refactoring 2020-09-15 12:41:52 +02:00
rospogrigio
b401020c99 Merge branch 'postlund-platform_setup' 2020-09-15 12:39:02 +02:00
Pierre Ståhl
9493f17de6 Forward config entry only to used platforms 2020-09-15 12:29:07 +02:00
rospogrigio
b3006a7c68 Merge branch 'pytuya_refactoring' into physical_device 2020-09-15 11:28:36 +02:00
rospogrigio
386d59b497 config_entry forwarded only to proper platform; DOMAIN imported from component 2020-09-15 10:59:06 +02:00
rospogrigio
22ccd51926 Fixed TuyaDevice init calls 2020-09-15 09:24:53 +02:00
rospogrigio
122d9a6a6f Merge branch 'pytuya_refactoring' into physical_device 2020-09-15 00:18:26 +02:00
rospogrigio
97ada3de4f Fix in validate_input 2020-09-15 00:17:42 +02:00
rospogrigio
6c68cdcbcc Merge branch 'pytuya_refactoring' into physical_device 2020-09-15 00:15:46 +02:00
rospogrigio
ce2461df2b Merge branch 'master' into pytuya_refactoring 2020-09-14 23:32:55 +02:00
rospogrigio
e824f285fa Merge branch 'postlund-fix_fan' 2020-09-14 20:59:39 +02:00
rospogrigio
285bffdc68 Fixed async_setup_entry in cover.py 2020-09-14 20:57:50 +02:00
rospogrigio
0e94b681db Fixed import from YAML in config_flow.py 2020-09-14 20:44:55 +02:00
Pierre Ståhl
50cbde330b Fix fan platform after merge 2020-09-13 19:02:13 +02:00
rospogrigio
d2281c4368 Merge branch 'postlund-cover_config_flow' 2020-09-13 15:00:33 +02:00
rospogrigio
27edcacde2 Fixed missing merging conflicts 2020-09-13 14:59:24 +02:00
rospogrigio
cc3f5e3a3a Merge branch 'postlund-fan_config_flow' 2020-09-13 14:23:26 +02:00
rospogrigio
04a215a062 Fixed merging conflicts 2020-09-13 14:23:09 +02:00
rospogrigio
250d7169c7 Merge branch 'postlund-cover_config_flow' 2020-09-13 14:18:51 +02:00
rospogrigio
6c77ce1c38 Fixed merging conflicts 2020-09-13 14:17:52 +02:00
rospogrigio
1df5928d6d Merge branch 'postlund-light_config_flow' 2020-09-13 14:15:01 +02:00