Commit Graph

27 Commits (ea6e32576259728760c20ca91a5ac90ce9081193)

Author SHA1 Message Date
Rob Bierbooms 1fe66df962
Cleanup dispatchers when unloading rfxtrx (#42803)
* Cleanup dispatchers

* Fix name

* Refactor code

* Fix typo in function description

* Fix pylint error

* Change function definition

* Move cleanup_callbacks data to domain
2020-11-04 11:30:46 +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
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Joakim Plate c93fc8af4a
Clean up commands generation for rfxtrx (#38236) 2020-07-28 00:44:30 +02:00
Rob Bierbooms 83a27f4855
Fix issue with creation of PT2262 devices in rfxtrx integration (#38074) 2020-07-22 15:09:37 -07:00
Joakim Plate bbff9ff6a0
Fix rfxtrx stop after first non light (#38057) 2020-07-22 13:08:31 +02:00
Joakim Plate 945acb4e29
Make sure command entities restore from state (#38038) 2020-07-22 00:01:31 +02:00
Rob Bierbooms d9dba9142c
Move data on import in rfxtrx integration into ConfigEntry (#38022)
* Move all data imported from yaml to ConfigEntry

* Revert changes that prevent updating yaml entry

* Cleanup code around time conversion
2020-07-21 09:44:00 +02:00
Joakim Plate f173805c2f
Make sensor and binary_sensor inherit from base class (#37946)
* Make sensor and binary_sensor inherit from base class

* Drop several pointless public properties

* Make sure base function has same parameters

* Drop pass

* Missed one

* Adjust inherit order
2020-07-18 13:43:38 +02:00
Joakim Plate 7c9be024bb
Rfxtrx use previous received event to do complete restore (#37819)
* Add event attribute to display last received event

* Restore state using event attribute

* Allow empty dict for device config

* Must also validate normal case

* Do early return
2020-07-17 10:27:07 +02:00
Joakim Plate 1a64108eea
Switch rfxtrx to config entries (#37794)
* Switch to config flow setup

* Add minimal test for config flow

* Add myself as codeowner and address some review concerns

* Address some further review comments
2020-07-13 23:24:28 +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 a3310330f4
Split handling and application of event (#37665)
This way _handle_event can contain things available
when entity has been added to home assistant,
and _apply event can remain internal and used on init.
2020-07-09 11:40:37 +02:00
Joakim Plate 2088092f7c
Switch rfxtrx to dispatcher (#37271)
* Switch to dispatcher

* Adjust tests for dispatcher

* Store device in sensor

* Move state application into binary sensor entity class

* Move more specifics into per platform classes

* Should not apply event in init of sensor

* Switch to call_later

* Make apply_event public

* No point in slugifying debug logs

* Adjust error in off delay and event

* Make sure we match with masked id
2020-07-06 00:10:26 +02:00
Erik Montnemery e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
Ernst Klamer cac750066a Remove unnessecary rfxtrx light property def (#30397) 2020-01-02 16:44:29 +01:00
Ernst Klamer 77978a979b Restore state for Rfxtrx devices (#30309)
* Restore state rfxtrx switch

* Restore state RFXtrx lights

* Restore state RFXtrx covers

* Restore comment

* Remove line

* Remove logging

* fix black

* Fix typo
2020-01-02 07:59:13 +01:00
foxy82 a08e3d7352 Update rfxtrx component so it can be run as a custom_component (#29638)
* Updating rfxtrx component so it can be run as a custom_component

* Fix pylint errors

* Fix pylint errors

* Fix pylint error on dict.

* isort
2019-12-11 15:58:49 +01: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
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00