Commit Graph
32 Commits
Author SHA1 Message Date
Pierre Ståhl fefee6944f Add shared code to a common module 2020-09-24 09:20:31 +02:00
Pierre Ståhl 98612a0d70 Enable type checking with mypy 2020-09-23 18:33:10 +02:00
Pierre Ståhl 02a2f08c40 Enable codespell and fix mistakes 2020-09-23 18:33:10 +02:00
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
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
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
Pierre Ståhl 26d83774e2 Add generic sensor platform 2020-09-19 23:43:12 +02:00
Pierre Ståhl 5507652bae Add support for options flow 2020-09-18 17:31:14 +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
Pierre Ståhl 0290b11dae Request DPS 1-150 in config flow 2020-09-16 19:36:51 +02:00
Pierre Ståhl 9493f17de6 Forward config entry only to used platforms 2020-09-15 12:29:07 +02:00
Pierre Ståhl 50cbde330b Fix fan platform after merge 2020-09-13 19:02:13 +02:00
Pierre Ståhl f9a4b4ad8a Add config flow support for fan 2020-09-10 12:07:59 +02:00
Pierre Ståhl edc9debf83 Add config flow support for cover 2020-09-10 10:50:58 +02:00
Pierre Ståhl ae64158da5 Use correct device class from pytuya 2020-09-10 10:42:44 +02:00
Pierre Ståhl 11763d90c5 Use generic Device in config flow 2020-09-09 23:06:28 +02:00
Pierre Ståhl 7efb3024fb Support arbitrary flow schemas for platforms 2020-09-09 23:05:42 +02:00
Pierre Ståhl 7018625f04 Add light support and clean up schemas 2020-09-09 22:59:37 +02:00
Pierre Ståhl aa1ed67f94 Make energy attributes in switch optional 2020-09-09 22:12:44 +02:00
Pierre Ståhl 43a36f458c Remove pre-filled values from config_flow
Also improve relative module import by not hardcoding package path.
2020-09-08 20:11:43 +02:00
Pierre Ståhl 0600b2730b Make config flows general based on entities 2020-09-08 12:00:23 +02:00
Pierre Ståhl b8333affc5 Add support for config flows for switches 2020-09-06 10:29:39 +02:00
Pierre Ståhl a0bf22cce5 Prepand unique_id with local_
Avoid collisions with the tuya integration.
2020-09-03 12:04:52 +02:00
Pierre Ståhl 4335507804 Add support for unique_id and available 2020-09-02 12:46:09 +02:00