Commit graph

6466 commits

Author SHA1 Message Date
SNoof85
0460166c7c
Use reference strings in Synology_DSM (#41333)
* Update strings.json

* Update config_flow.py

* Update test_config_flow.py
2020-10-06 15:35:36 +02:00
Edward Knight
8bcd6c1880
Rewrite imap_email_content tests to use pytest (#41200) 2020-10-06 15:01:25 +02:00
Franck Nijhof
357a0e9d7e
Improve switch template tests, remove common test helpers (#41322) 2020-10-06 14:54:39 +02:00
Ronan Murray
df4998d7cf
Rewrite uk_transport tests to use pytest style (#41168) 2020-10-06 14:53:17 +02:00
Erik Montnemery
06e9489fc7
Add Tasmota integration (#39624)
* Add Tasmota integration

* Refactor

* Add tests, small improvements

* isort

* Attempt to fix tests failing with Python 3.8

* Revert "Attempt to fix tests failing with Python 3.8"

This reverts commit 11454f8a00136f068ea27204183fa3e62f3cd263.

* Fix tests failing with Python 3.8

* Cleanup tests

* Address review comments

* Address review comments

* Address review comments

* Use MAC address for device identification

* Bump hatasmota

* Bump hatasmota

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix indentation

* Remove preparation for device remove WS API

* Address review comments

* Remove useless try-except

* Tweak

* Improve tests

* Tweak

* Address review comments

* Correct test

* Update manifest.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-06 14:51:58 +02:00
SNoof85
3cf6535011
Use reference strings in Tile (#41328) 2020-10-06 14:44:14 +02:00
Ariana Hlavaty
8adc5ee452
Rewrite pushbullet unittest tests to pytest style test function (#41266) 2020-10-06 14:34:39 +02:00
Raman Gupta
06306f5dfe
Add OZW WS API support for locks (#41186)
* add WS API support for locks and simplify lock service calls

* move return outside of try blocK

* fix rebase conflicts
2020-10-06 14:20:48 +02:00
Pigotka
e1578e5389
Use of reference strings in Almond config flow (#41284) 2020-10-06 14:12:12 +02:00
TopdRob
888c92aa5e
Use common strings for Panasonic Viera (#41268)
* Update strings.json

* Update config_flow.py

* Update homeassistant/components/panasonic_viera/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/panasonic_viera/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Fix failed tests

* revert line 530

* Fix remaining error key

* Remove not needed import

* Update const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-06 14:07:38 +02:00
Steven Looman
c812812631
Don't set upnp config_entry.unique_id from setup entry (#40988)
* Don't set config_entry.unique_id from setup entry. Fixes #40168

* Ensure entry has a unique_id

* Add test test_flow_import_incomplete

* Add test test_flow_import_duplicate

* Re-add testing import_info

* Simplify import flow

* Remove not needed line

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-06 13:57:36 +02:00
Rob Bierbooms
b2b5f2ffcb
Rewrite zwave init tests to pytest style test function (phase 1) (#41301) 2020-10-06 11:50:03 +02:00
Pigotka
ed9a40874d
Use of reference strings in Transmission config flow (#41215) 2020-10-06 11:25:56 +02:00
Julian Engelhardt
14273e9e48
Rewrite statsd unittest tests to pytest style test functions (#41223) 2020-10-06 11:24:16 +02:00
Björn Olsson Jarl
3abf30cf42
Rewrite sigfox unittest tests to pytest (#41302) 2020-10-06 10:16:41 +02:00
Paulus Schoutsen
e303064f75
Don't use asynctest directly (#41306) 2020-10-06 10:15:50 +02:00
sycx2
956b735be6
Improve yessssms test notify (#41283) 2020-10-06 10:11:36 +02:00
J. Nick Koston
2fabd4edb8
Prevent collecting states already referenced by domain or all (#41308)
The template engine would collect all the states in
a domain or all states while iterating even though
they were already included in all or the domain

This lead to the rate limit not being applied to
templates that iterated all states that also
accessed a collectable property because the engine
incorrectly believed they were specifically
referenced.
2020-10-06 07:25:05 +02:00
Jason Rebelo
4d3802ff95
Rewrite reddit tests to pytest style tests (#41006)
*  rewrite reddit tests to pytest tests

*  add missing blocking
2020-10-05 20:33:31 -04:00
Ariana Hlavaty
329e56fac0
Rewrite min_max unittest tests to pytest style test function (#41296)
* Rewrite min_max unittest tests to pytest style test function

For: #40866

* Use uppercase letters for constants

* Remove not needed line

* Fix missing rename to uppercase

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-05 22:57:58 +02:00
Bram Kragten
510e90803e
Exclude media_dirs from YAML config check (#41299) 2020-10-05 22:09:47 +02:00
SNoof85
7a12a16fc5
Use reference strings in iaqualink (#41292)
* Update strings.json

* Update config_flow.py

* Update test_config_flow.py
2020-10-05 14:55:12 -05:00
Raman Gupta
6db4075a23
Add OZW node config parameters websocket commands (#40527)
* add websocket commands to retrieve and set config parameters for a node

* move set_config_parameter into generic function and refactor service and WS API

* add payload to return to make service call behave the same way it did before

* create response class

* update error message to pass tests

* move things a bit to reduce LOC

* add tests

* handle logging errors better and make new response class more generic to prepare for lock user code work

* remove unused function parameter

* invert check

* add additional error checking

* refactor a bit to remove repeat code

* revert log msg change

* one more refactor to create generic get_config_parameters function

* change if logic for consistency

* fix test

* add support to provide bool value in set_config_parameter service call

* standardize parameter names on service call

* add test coverage

* fix tests and message sending

* remove unnecessary logging import

* fix one test to get missing coverage

* update per martin and kpines reviews

* remove false assertion

* string line length

* add support for Decimal config param, remove node instance ID as input, and move helper functions to node.py

* cast Decimal appropriately

* revert change to support Decimal for config params since they are not supported as a config param type

* revert to using error arguments to make next PR for WS lock commands easier

* switch to class method and add guard for list Value not being a number

* update logic to use new openzwavemqtt util methods

* add support for bitsets

* use parent exception class

* bump openzwavemqtt version, remove node.py from .coveragerc and put file references in the right place

* add comment

* improve config validation

* remove bitset support from config validation

* re-add bitset support with some additional tests

* move send_result out of try block
2020-10-05 21:47:28 +02:00
Erik Montnemery
c777647233
Drop legacy_patchable_time from MQTT tests (#41287) 2020-10-05 21:39:44 +02:00
Erik Montnemery
13dad34019
Reorder MQTT binary sensor tests (#41277) 2020-10-05 19:42:28 +02:00
Pigotka
7eaa304fc3
Use of reference strings in Heos config flow (#41282) 2020-10-05 12:22:02 -05:00
SNoof85
8bae9b2124
Use reference strings in Tesla (#41270)
* Update strings.json

* Update config_flow.py

* Update test_config_flow.py
2020-10-05 16:41:16 +02:00
J. Nick Koston
4798f37c6e
Convert States to dicts via as_dict only once (#41208)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-05 09:18:57 -05:00
SNoof85
b7ff0a5a49
Use reference strings in rainmachine (#41216) 2020-10-05 15:29:27 +02:00
J. Nick Koston
f50976a0b3
Switch to asyncio.wait for slow update warning implementation (#41184) 2020-10-05 15:28:15 +02:00
Diefferson Koderer Môro
dde465da48
Use common strings for Onvif config flow (#41170)
* Use common strings for Onvif config flow

* Fix tests

* Update homeassistant/components/onvif/strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-05 15:27:48 +02:00
SNoof85
c7027e2828
Use reference strings in Notion (#41211) 2020-10-05 15:13:37 +02:00
J. Nick Koston
20a136e2a1
Avoid event data serialization during recorder that we throw away (#41217)
We currently serialize the event data for state change events
and then replace it because we save the state in the states table.
Since the old state and new state are both contains in the event
the cost of serializing the data has a noticable impact when there
are many state changed events.
2020-10-05 15:08:47 +02:00
Diefferson Koderer Môro
44580b1c07
Use common strings for Flu Near You config flow (#41174) 2020-10-05 15:05:57 +02:00
J. Nick Koston
494d4a262a
Add Profiler integration (#41175)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-05 07:57:07 -05:00
sycx2
e813d3ebf9
Improve template test sensor (#41199) 2020-10-05 14:52:31 +02:00
SNoof85
f679acd3fa
Use reference strings in Tesla (#41238) 2020-10-05 14:32:09 +02:00
Rob Bierbooms
5745e64cab
Rewrite zwave node entity tests to pytest style test function (#41239) 2020-10-05 14:29:15 +02:00
Franck Nijhof
d7f4cfbb65
Improve demo media player platform tests (#41096) 2020-10-05 14:04:02 +02:00
Paulus Schoutsen
8ae3f575dd
Add extended validation for script repeat/choose (#41265) 2020-10-05 14:03:48 +02:00
scheric
0a3db42d61
Use common strings in Ecobee config flow (#41257)
* Update common Strings

* one_instance_only -> single_instance_allowed
2020-10-05 13:53:11 +02:00
Paulus Schoutsen
fe2c16dc29
Allow any value when triggering on state attribute (#41261) 2020-10-05 12:53:12 +02:00
SNoof85
cf5c99d2a9
Use reference strings in Tuya (#41236) 2020-10-05 12:49:09 +02:00
zetvio
78b4c3981f
Use reference strings in Samsung TV config flow (#41248)
* Use reference strings in samsungtv config flow

* Adjust samsungtv config flow tests
2020-10-05 11:45:35 +02:00
Jeff H
a1f70e11ae
Fix slack message icon override (#41212)
* Fix slack message icon override

Allows overriding the icon for individual slack
messages using either an emoji or a URL.

* Run python3 -m script.gen_requirements_all

* Add period to first line

* Add support for python 3.7 testing

AsyncMock is only available from python 3.8+. Prior to this,
CoroutineMock is used which doesn't mock the method so it
needs to be done manually.

* Fix tests for python3.7 compatibility

The Python3.7 mock call object doesn't have the kwargs helper property.

* Update default emoji test docstring
2020-10-04 14:17:24 -07:00
Björn Olsson Jarl
e64b8774ec
Rewrite transport_nsw sensor tests to pytest tests (#41169)
* Improve transport_nsw sensor tests.

* patch fix.
2020-10-04 23:10:00 +02:00
J. Nick Koston
51da605b9f
Remove manual rate_limit control directive from templates (#41225)
Increase default rate limit for all states and entire
domain states to one minute

Ensure specifically referenced entities are excluded from
the rate limit
2020-10-04 22:40:04 +02:00
Oren
dd26ab6b4e
Rewrite threshold unittest tests to pytest style test functions (#41141)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-04 21:38:21 +02:00
Paulus Schoutsen
e2921475e2
Fix flaky huawei test (#41204) 2020-10-04 15:24:07 +02:00
Rob Bierbooms
e97792adf0
Refactor dsmr tests (#39724) 2020-10-04 14:27:22 +02:00