Commit Graph

50 Commits (9e53bca45212e3db8c4117f16471c468ea863c9c)

Author SHA1 Message Date
Erik Montnemery 3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
J. Nick Koston bf2c12dcf2
Update remote tests to avoid patching utcnow (#93492) 2023-05-24 15:28:22 -05:00
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
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof 51a9f65a01
Clean up unnecessary registry mocks from Core tests (#87726) 2023-02-08 13:28:44 -06:00
epenet ba85fdcd61
Add type hints to integration tests (q-s) (#87706) 2023-02-08 08:12:54 -08:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Erik Montnemery 150f173eed
Mark device conditions from hidden or auxiliary entities as secondary (#70333) 2022-04-20 21:41:59 +02:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
Franck Nijhof 8aff8d89d2
Clean up async_reproduce_state helper usage (#68617) 2022-03-24 14:40:54 +01:00
Erik Montnemery 513d6cc467
Change value of device_automation constant (#64296)
* Change value of constant CONF_CHANGED_STATES

* Adjust tests
2022-01-17 16:34:40 +01:00
Erik Montnemery e9b746e874
Add turned on or off device trigger to toggle entity (#61089)
* Add turned on or off device trigger to toggle entity

* Renamed changed_states trigger to toggled

* Adjust tests

* Fix homekit triggers test

* Add tests

* Adjust tests after rebase

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-03 10:41:30 +01:00
Ville Skyttä f913961d63
Use DeviceAutomationType in tests/components/[m-r]* (#62443) 2021-12-20 22:29:22 +01:00
Franck Nijhof cf371ea8dd
Remove deprecated base entity classes (#61006)
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
J. Nick Koston 4bde4504ec
Add api to device_automation to return all matching devices (#53361) 2021-08-10 14:21:34 -05:00
Joakim Sørensen 2f10f59717
Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00
Franck Nijhof 5a2b5fe7c5
Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +01:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen b3be708db6
Add default config if not there (#43321)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-11-25 15:10:04 +01:00
CurrentThread 9b145a78d9
Remove not used legacy remote test helpers (#42144) 2020-10-22 10:02:04 +02:00
CurrentThread 7e3aa6ddce
Rewrite remote unittest tests to pytest style test functions and remove legacy test helpers (#41715) 2020-10-19 23:28:40 +02:00
Felipe Martins Diel d96a1744f0
Improve RemoteEntity class (#40605) 2020-10-18 08:59:36 -05:00
Franck Nijhof 7c61caf68e
Revert "Support learning different command types with remote" (#40486)
This reverts commit c6a48d3b61.
2020-09-23 12:39:27 +02:00
Felipe Martins Diel c6a48d3b61
Support learning different command types with remote (#39670) 2020-09-22 22:09:19 -05:00
Chris Talkington 8a3279a5c9
Add device action support for remotes (#39400) 2020-09-07 08:54:18 -05:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
Erik Montnemery aa60d362fd
Rename RemoteDevice to RemoteEntity (#34676) 2020-04-26 02:12:36 +02:00
Franck Nijhof bc5a2da7b7
Add transition support to scenes, cleanup blocking parameter (#34434) 2020-04-20 18:07:50 -07:00
Aaron Bach 9993333bf9 Add state reproduction to remotes (#30990) 2020-01-19 23:08:32 -08:00
Paulus Schoutsen 9aa02e35a7
Entity Component to no longer generate automatic groups (#23789) 2020-01-07 17:30:53 +01:00
Bas Nijholt f81e608cc1 Sort imports according to PEP8 for remote (#29749) 2019-12-09 13:09:16 +01:00
Paulus Schoutsen 02d9ed5e36
Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Felipe Martins Diel 0ed9e185b2 Add support for learning new commands (#23888)
* Add support for learning new commands

This update creates a generic service in the 'remote' component to enable remote control platforms to learn new commands.

* Update __init__.py with the proposed changes

- Add 'supported_features' property and a constant related to the 'learn_command' functionality.
- Redefine 'async_learn_command' function as a coroutine.

* Update __init__.py

* Fix assertion error

Adding the 'supported_features' attribute generated an assertion error on the 'Demo Remote' platform. This update fixes this.

* Fix duplicated 'hass' object

This update fixes a typo that occurred at the last update.
2019-06-05 11:32:59 +02:00
Paulus Schoutsen 6fad9e1a0a
RFC: Embed platforms without component for remote component. (#20809)
* Embed platforms for remote component.

* Update reqs
2019-02-12 14:57:13 -08: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
Paulus Schoutsen 08fe7c3ece
Pytest tests (#17750)
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
cdce8p dd45e99302 Remove service helper (4) (#16892)
* Update media_player

* Update lock

* Update notify

* Update remote

* Update scene

* Update vacuum

* Remove timer helpers

* Removed unused legacy helpers
2018-09-26 18:02:05 +02:00
Paulus Schoutsen 994b829cb4
add_devices -> add_entities (#16171)
* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
2018-08-24 16:37:30 +02:00
Ville Skyttä dbd0763f83 Grammar and spelling fixes (#16065) 2018-08-19 22:29:08 +02:00
Paulus Schoutsen 88b70e964c
Remove execution file perm (#11563) 2018-01-09 23:55:14 -08:00
Martin Hjelmare 33663f9502 Clean up remote component (#8728)
* Clean up remote component

* Don't have device be required in send_command service and method.
* Don't have entity_id be required in the base service schema.
* Don't always add activity in the data dict for a service call.
* Update harmony remote platform according to new service schema.
* Remove not needed properties and attributes from the Kira remote
  platform.
* Add send_command method to demo platform.
* Add tests and remove duplicate tests.

* Break out required argument as positional argument
2017-07-31 20:52:39 -07:00
everix1992 3638b21bcb Added new commands and functionality to the harmony remote component. (#7113)
* Added new commands and functionality to the harmony remote component.

-This includes the ability to optionally specify a number of times to repeat a specific command, such as pressing the volume button multiple times.
-Also added a new command that allows you to send multiple commands to the harmony at once, such as sending a set of channel numbers.
-Updated the unit tests for these changes.

* Fix flake8 coding violations

* Remove send_commands command and make send_command handle a single or list of commands

* Remove send_commands tests

* Update itach and kira remotes for new send_command structure. Fix pyharmony version in requirements_all.txt

* Fix incorrect variable name

* Fix a couple minor issues with remote tests
2017-05-23 17:00:52 -07:00
Stu Gott 9c4bc2a47f Add Kira component to sensor and remote platforms (#7479)
* Add Kira component to sensor and remote platforms

* Test cases for Kira component and platforms
2017-05-12 21:12:47 -07:00
Paulus Schoutsen 2650c73a89 Split bootstrap into bs + setup (#6416)
* Split bootstrap into bs + setup

* Lint
2017-03-05 10:41:54 +01:00
Johann Kellerman f0b1874d2d Fix up docstring for tests (#5090) 2016-12-28 20:04:59 +02:00
Pascal Vizeli e8c9dcf0fe Migrate remote to async (#4678)
* Migrate remote to async

* add coro

* remove sync from init since only used in harmony

* import ATTR from remote

* remove unused sync stuff from tests
2016-12-03 22:08:24 -08:00
iandday de6c5a503b Remote Component and Harmony Platform (#4254)
* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* reworked token generation

* delete

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* reworked token generation

* delete

* readded after rebase

* cleaning up style errors

* modified .coveragerc

* moved import statements

* added more debug logging

* Added URL encoding of token received from Logitech

* Corrected import for python 3

* new pyharmony version

* new pyharmony version

* remote tests

* only write config file if not present or sync service is called

* more tests

* more tests

* bumped pyharmony version to work with new auth

* bumped pyharmony version to work with new auth

* style corrections

* harmony local auth and remote demo platform

* style fix

* PR refinements and permission issues

* forgot a blank line

* removed sync test from test_init

* removed sync test from test_init

* visual indent

* send_command test in demo platform
2016-12-01 12:48:08 -08:00