Commit Graph

389 Commits

Author SHA1 Message Date
ultratoto14
3a4940387c Use debug message for timeout. 2020-12-17 15:01:02 +01:00
dependabot-preview[bot]
be29474050 Bump flake8 from 3.8.3 to 3.8.4
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-17 13:18:39 +00:00
dependabot-preview[bot]
f5add5ae98 Bump codespell from 1.17.1 to 2.0.0
Bumps [codespell](https://github.com/codespell-project/codespell) from 1.17.1 to 2.0.0.
- [Release notes](https://github.com/codespell-project/codespell/releases)
- [Commits](https://github.com/codespell-project/codespell/compare/v1.17.1...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-17 13:14:14 +00:00
dependabot-preview[bot]
ad0f80f122 Bump homeassistant from 2020.12.0 to 2020.12.1 (#244)
Bumps [homeassistant](https://github.com/home-assistant/core) from 2020.12.0 to 2020.12.1.
- [Release notes](https://github.com/home-assistant/core/releases)
- [Changelog](https://github.com/home-assistant/core/blob/dev/azure-pipelines-release.yml)
- [Commits](https://github.com/home-assistant/core/compare/2020.12.0...2020.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Pierre Ståhl <pierre.staahl@gmail.com>
2020-12-17 14:09:21 +01:00
Pierre Ståhl
acd70b655c Fix name issue from pylint changes (#252) 2020-12-17 14:03:40 +01:00
Pierre Ståhl
52bf9cc814 Add dependabot config (#249) 2020-12-17 10:52:34 +01:00
Pierre Ståhl
f72cbc0b5a Run pylint from tox (#243) 2020-12-17 09:26:55 +01:00
ultratoto14
3cf15f216e Merge pull request #240 from maartenweyns/master
Fix light state change when already on
2020-12-15 22:55:21 +01:00
Maarten Weyns
a6e8f282c5 Fixed editor line indentation 2020-12-15 20:11:34 +01:00
Maarten Weyns
c28fac7010 This makes lights smoothly fade from one state to a new state, without the intermediate "turn off" 2020-12-15 20:09:10 +01:00
ultratoto14
2d2a6216d3 Merge pull request #238 from rospogrigio/light_fixes
Manage white and color scenes for light without color_temp
2020-12-15 19:31:38 +01:00
ultratoto14
3737dec4c2 Merge branch 'master' into light_fixes 2020-12-15 19:27:18 +01:00
ultratoto14
d2a307fa6c Merge pull request #239 from rospogrigio/tighter_heartbeat
Reduce heartbeat interval.
2020-12-15 19:26:54 +01:00
ultratoto14
89dabfc105 Reduce heartbeat interval. 2020-12-15 17:12:52 +01:00
ultratoto14
d0653d4f36 Fix HA scenes with bulb without color_temp 2020-12-15 15:13:08 +01:00
Pierre Ståhl
aeb27a4d75 Fix improper closing in config flow (#237)
Forgot to add an await to the close method in pytuya when validating the
device. This results in the connection never being closed after adding a
device, giving "connection resets" until the connection fails, the
device or Home Assistant is restarted.
2020-12-15 10:56:45 +01:00
Pierre Ståhl
e7d58be91c Add localtuya.set_dp service (#236) 2020-12-15 09:36:34 +01:00
Pierre Ståhl
10e55e67b4 Add support for passive devices (#171)
* Add support for passive devices

* Fix a few issues

* Fix broken handling of closing a connection

This fixes the following error:

  AttributeError: 'NoneType' object has no attribute 'write'

* Always use discovery broadcasts to trigger connects

From now on there's no connect loop but all attempts are initiated by
received discovery messages.

* Fix cancelling of heartbeat task

* Verify entry has been loaded before connecting

* Don't reset seqno when switching to type_d device
2020-12-15 09:08:46 +01:00
cjj25
1d58abd0f2 Update README.md
Co-authored-by: Kendell R <KTibow@users.noreply.github.com>
2020-12-14 14:29:53 +01:00
cjj25
3b7e8064a9 Update README.md
Note added to README regarding unresponsive devices on an internet connected network, correct method of blocking.
2020-12-14 14:29:53 +01:00
Pierre Ståhl
b50ee8bb94 Properly close discovery listeners (#225)
Fixes #214
2020-12-07 22:20:21 +01:00
rospogrigio
a74af936a4 Fix for issue #186 (wrong initialization values for _timer_start and _previous_state) 2020-11-24 22:50:47 +01:00
ultratoto14
095f64954d Merge pull request #182 from rospogrigio/white_point
Use color picker white point to switch to white mode.
2020-11-23 20:50:13 +01:00
ultratoto14
3ecae049bb overzealous check. 2020-11-23 20:30:45 +01:00
ultratoto14
14333b260d Use color picker white point. 2020-11-23 13:36:50 +01:00
Pierre Ståhl
52c62c5596 Fix typo of dp_id in fan platform (#178) 2020-11-22 07:21:41 +01:00
Pierre Ståhl
566859501d Add missing variable to log point (#174) 2020-11-20 11:00:57 +01:00
Pierre Ståhl
f376d8584a Fix broken exception logging (#173) 2020-11-20 10:40:35 +01:00
Pierre Ståhl
27af622405 Store product key in config entry (#170) 2020-11-19 10:13:00 +01:00
ultratoto14
5eeb4c4af3 Merge pull request #168 from ultratoto14/music_mode_fix
FIx wrong check that enables music mode every time.
2020-11-18 11:57:54 +01:00
ultratoto14
5ec66f2400 Merge branch 'master' into music_mode_fix 2020-11-18 11:49:36 +01:00
Pierre Ståhl
1dbae752ef Give error if no DPS are found in config flow (#167)
Fixes #153
2020-11-18 11:39:11 +01:00
ultratoto14
3356b3dd63 Wrong check that enable music mode evry time. 2020-11-18 11:06:54 +01:00
rospogrigio
4793e09104 Cover fake positioning revised (#162)
* Introduced time-difference-based method for cover fake positioning
* Time-difference-based method for cover fake positioning now supports also movement inversion
2020-11-18 10:06:11 +01:00
ultratoto14
92f237298b Merge pull request #146 from ultratoto14/light_scenes
Scene support for lights.
2020-11-18 09:56:03 +01:00
ultratoto14
457bae1456 Follow review comments. 2020-11-17 15:11:46 +01:00
ultratoto14
26f5e17772 Merge branch 'master' into light_scenes 2020-11-17 14:17:43 +01:00
Pierre Ståhl
0531a284c7 Add contextual logging where applicable (#124)
* Add contextual logging where applicable

* Compress device id in log output
2020-11-17 12:54:01 +01:00
Pierre Ståhl
c8a44019fa Improve discovery error output (#134) 2020-11-17 12:26:18 +01:00
ultratoto14
9ca3efb161 Fix brightness issues. 2020-11-17 08:42:39 +01:00
ultratoto14
352ba58336 Add RGB only scenes. 2020-11-16 14:11:42 +01:00
ultratoto14
9be72d1152 Update internal state whatever mode is. 2020-11-16 11:32:54 +01:00
ultratoto14
8d91d9278b Merge branch 'master' into light_scenes 2020-11-16 07:29:40 +00:00
ThomasADavis
3e52811aac Fan controller updates (#155)
* Fan controller updates.

This updates the fan controller to be more dynamic on which dp's it uses.

Fan speeds can 1,2,3,4 or low,medium,mid,high,auto.  Fans with more
than 3 speeds is not supported by Home Assistant.

Variable speed fans are not supported at this time.

* rename set_dps -> set_dp

* change to use self._dp_id instead of a fixed dp

Co-authored-by: Thomas Davis <tdavis@nersc.gov>
Co-authored-by: Pierre Ståhl <pierre.staahl@gmail.com>
2020-11-16 07:10:02 +01:00
ultratoto14
2ca5a154c5 Merge branch 'master' into light_scenes 2020-11-15 19:41:06 +01:00
ThomasADavis
e137d598f0 This makes sure that any scaling is only applied to numeric values. (#154)
* This makes sure that any scaling is only applied to numeric values.

* Updates fan controller.

This adds support for 3 speed fans, 4 speeds fan (with choice of 3 of the 4 speeds),
fans speed of 1,2,3,4 or low,medium,mid,high, and auto.

Fans that have variable speeds, or greater than 4 speeds is not supported
at this time.  HA does not support variable speed fans and more than 3 speeds.

* Revert "Updates fan controller."

This reverts commit 00352da2de72d02977d8a7d3780aabf4f28ee0fa.

Co-authored-by: Thomas Davis <tdavis@nersc.gov>
2020-11-15 18:49:08 +01:00
ultratoto14
10069817d0 Remove unecessary constants. 2020-11-10 14:13:03 +01:00
ultratoto14
6e07a5581f First try to add scenes. 2020-11-09 13:39:46 +01:00
ultratoto14
a0f4fdf337 Use default home assistant behavior. Return only relevant data per mode. (#129) 2020-11-06 21:37:36 +01:00
ultratoto14
6cd509f4f8 Remove default scale factor (#138) 2020-11-05 14:34:48 +01:00