Commit Graph

22 Commits (a9381d259040d4a02881cc9e203bc8e3946b2146)

Author SHA1 Message Date
epenet 0a80ac19bc
Add type hints to integration tests (part 18) (#88174) 2023-02-17 18:45:48 +01:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 00dd27ef1b
Apply hass-relative-import to tests (i-r) (#78732) 2022-09-19 09:46:59 +02:00
Joakim Plate e8c05298ba
Remove rfxtrx signal repetition (#67675) 2022-03-06 10:29:20 +01:00
Franck Nijhof 176f03d4ac
Allow toggles (switches) state to be None (#64621) 2022-01-23 11:31:01 +01:00
Rob Bierbooms c5041b41c8
Implement config and option flow for rfxtrx integration (#39117)
* Create option flow for Rfxtrx integration (#37982)

* Implement config flow for rfxtrx integration (#39299)

* Add config flow

* Add strings

* Add first series of tests

* Add tests

* Adjust tests according review comments

* Adjust strings

* Add executor for testing connection

* Change ports to dict

* Fix pylint issue

* Adjust tests

* Migrate config entry for rfxtrx integration (#39528)

* Add rfxtrx device connection validation when importing (#39582)

* Implement import connection validation

* Fix binary sensor tests

* Move rfxtrx data

* Fix cover tests

* Fix test init

* Fix light tests

* Fix sensor tests

* Fix switch tests

* Refactor rfxtrx test data

* Fix strings

* Fix check

* Rework device string in test code

* Add option to delete multiple rfxtrx devices (#39625)

* Opt to remove multiple devices

* Fix devices key

* Add tests (phase 1)

* Add tests (phase 2)

* Tweak remove devices test

* Implement device migration function in rfxtrx option flow (#39694)

* Prompt option to replace device

* Revert unwanted changes

* Add replace device function

* WIP replace entities

* Remove device/entities and update config entry

* Fix styling

* Add info

* Add test

* Fix strings

* Refactor building migration map

* Allow migration for all device types

* Add test to migrate control device

* Fixup some names

* Fixup entry names in test code

* Bump pyRFXtrx to 0.26 and deprecate debug config key (#40679)

* Create option flow for Rfxtrx integration (#37982)

* Implement config flow for rfxtrx integration (#39299)

* Add config flow

* Add strings

* Add first series of tests

* Add tests

* Adjust tests according review comments

* Adjust strings

* Add executor for testing connection

* Change ports to dict

* Fix pylint issue

* Adjust tests

* Migrate config entry for rfxtrx integration (#39528)

* Add rfxtrx device connection validation when importing (#39582)

* Implement import connection validation

* Fix binary sensor tests

* Move rfxtrx data

* Fix cover tests

* Fix test init

* Fix light tests

* Fix sensor tests

* Fix switch tests

* Refactor rfxtrx test data

* Fix strings

* Fix check

* Rework device string in test code

* Add option to delete multiple rfxtrx devices (#39625)

* Opt to remove multiple devices

* Fix devices key

* Add tests (phase 1)

* Add tests (phase 2)

* Tweak remove devices test

* Implement device migration function in rfxtrx option flow (#39694)

* Prompt option to replace device

* Revert unwanted changes

* Add replace device function

* WIP replace entities

* Remove device/entities and update config entry

* Fix styling

* Add info

* Add test

* Fix strings

* Refactor building migration map

* Allow migration for all device types

* Add test to migrate control device

* Fixup some names

* Fixup entry names in test code

* Bump version number

* Remove debug key from connect

* Remove debug option from config flow

* Remove debug from tests

* Fix event test

* Add cv.deprecated

* Fix test

* Fix config schema

* Add timeout on connection

* Rework config schema

* Fix schema...again

* Prevent creation of duplicate device in rfxtrx option flow (#40656)
2020-10-01 08:55:57 +02:00
Rob Bierbooms af97141f4f
Increase test coverage for rfxtrx integration (#38435)
* Remove rfxtrx from coveragerc

* Tweak binary sensor test

* Tweak light test
2020-08-01 11:26:26 -05:00
Joakim Plate 632a36d819
Support rfxtrx smoke detectors, motion sensors as binary_sensors (#38000)
* Add binary sensor support to motion sensors and smoke detectors

* Add support for new sensor events as binary sensors

Adds a default device_class for motion sensors and smoke detector

* Use device type instead of event to set class

* Add some additional binary values
2020-07-24 17:16:41 +02:00
Joakim Plate 7a3c6d6525
Avoid using implementation internal to trigger events (#38041)
This uses the moxking in fixture to trigger events.
2020-07-22 00:24:26 +02:00
Joakim Plate 945acb4e29
Make sure command entities restore from state (#38038) 2020-07-22 00:01:31 +02:00
Joakim Plate aaa073183c
Drop dummy connection (#37805)
We now mock the module
2020-07-13 03:40:45 +02:00
Joakim Plate 87f6b7cdd4
Replace rfxtrx entity events with integration events (#37565)
* Drop per entity events

* Correct linting error

* Drop keys()
2020-07-13 02:57:19 +02:00
Joakim Plate 53844488d8
Switch rfxtrx to integration level config (#37742)
* Switch to integration level config

* Switch to per device config rather than per entity type

* All roller shutters should be added as covers

(there are non lighting types)

* Fixup tests that used invalid packets for platforms

* Avoid variable re-use

* Allow control events on sensors too

That way we get signal level sensors for these too

* Lint correction

* Don't filter sensors from config

Disable sensors from GUI if the entities are not wanted

* Correct usage of ATTR_ instead of CONF_

* Make sure the logging when a new entity is added includes the event
2020-07-12 22:03:22 +02:00
Joakim Plate 67038c6ba8
Rewrite rfxtrx init logic to do away with global object (#37699)
* Rewrite init logic to do away with global object

* Put constant at end

* Use a set instead of list for device_ids
2020-07-10 14:52:07 +02:00
Joakim Plate 01fd33f173
Switch tests to use hass objects instead of direct (#37530)
* Switch tests to use hass objects instead of direct

* Make sure sensor update state

* Add some initial binary sensor tests

* Add initial binary sensor tests

* Add tests for pt2262

* Add test for off delay
2020-07-05 22:41:11 +02:00
Joakim Plate ab4687d914
Convert rfxtrx tests to pytest async tests and re-enable (#37206)
* Rework and re-enable rfxtrx tests

* Add missed change to _signal_event

* Fixup the dummy serial that causes max cpu

* Make sure we cleanup thread here too

* Make sure we always wait for tasks before we check state

* Some more places we need to wait before checking
2020-07-03 10:22:02 +02:00
Joakim Plate 464f17f182
Fixup rfxtrx tests to at least run (#37186) 2020-06-27 21:54:27 -07:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
javicalle de7963544f Apply isort on rfxtrx classes (#27615)
* Move imports in rfxtrx component

* Apply isort on rfxtrx files

* Update test_switch.py
2019-10-14 10:38:34 -05:00
javicalle 40e5beb0ed Move imports in rfxtrx component (#27549) 2019-10-12 12:37:59 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen e9ea5c2ccb Move tests to right folder (#23790)
* Move tests to right folder

* Fix test leaving files behind
2019-05-10 13:20:50 -07:00