Commit Graph
50 Commits
Author SHA1 Message Date
SidandGitHub d5f883fbf0 Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
Marc MuellerandGitHub c88b337600 Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick KostonandGitHub 265f6653c3 Refactor homekit to use a dataclass for entry data (#101738) 2023-10-10 21:14:37 +02:00
epenetandGitHub 03710e58b5 Add type hints to integration tests (part 9) (#87983) 2023-02-13 12:06:51 +01:00
epenetandGitHub 37a2040d7b Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenetandGitHub 4142f0d15d Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenetandGitHub aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
MichaelandGitHub e35ab75c0b Replace the usage of unit constants by enumerations in Tests [h-l] (#85934) 2023-01-15 14:52:55 +01:00
Sarabveer SinghandGitHub 01de1c6304 Update HomeKit PM2.5 mappings to US AQI (#76358) 2022-08-08 11:49:07 -10:00
J. Nick KostonandGitHub 6d2302b703 Add guards for HomeKit version/names that break apple watches (#67585) 2022-03-03 15:03:46 -08:00
J. Nick KostonandGitHub 5c8271552a Add hardware revision support to homekit (#63336) 2022-01-04 16:19:12 +01:00
J. Nick KostonandGitHub 400aaeaa91 Ensure homekit setup messages run in event loop (#60226) 2021-11-23 11:40:20 -06:00
a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <[email protected]>
2021-10-07 12:58:00 +02:00
J. Nick KostonandGitHub 88e42a540e Remove leftover debug prints in tests (#56409) 2021-09-19 12:43:02 +02:00
Erik MontnemeryandGitHub be0819b456 Mock out network.util.async_get_source_ip in tests (#56339) 2021-09-17 21:40:58 -10:00
J. Nick KostonandGitHub 195ee2a188 Avoid creating sockets in homekit port available tests (#55668)
* Avoid creating sockets in homekit port available tests

* prevent new bridge from being setup -- its too fast now that the executor job is gone and it revealed an unpatched setup
2021-09-03 17:15:28 -10:00
J. Nick KostonandGitHub 9790f3f609 Create homekit locks according to spec (#48453)
Any accessories, regardless of transport, that enable physical access to the home, such as door locks, must not be bridged.
2021-03-31 09:22:30 -07:00
J. Nick KostonandGitHub f4b775b125 Cleanup homekit and remove aid storage from hass.data (#47488) 2021-03-11 22:05:03 -08:00
J. Nick KostonandGitHub 87cbbcb014 Automatically create HomeKit accessory mode entries (#46473)
When we set up HomeKit, we asked users if they wanted
to create an entry in bridge or accessory mode.

This approach required the user to understand how HomeKit works and
choose which type to create.

When the user includes the media player or camera domains,
we exclude them from the bridge and create the additional entries
for each entity in accessory mode.
2021-02-23 16:22:23 -08:00
J. Nick KostonandGitHub 463a32819c Ensure homekit never picks a port that another config entry uses (#45433) 2021-02-02 14:30:38 +01:00
J. Nick KostonandGitHub 3ff75eee53 Update homekit to use new fan entity model (#45549) 2021-01-28 12:38:18 +01:00
f49ce5d1b4 Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <[email protected]>
2020-07-06 15:58:53 -07:00
J. Nick KostonandGitHub 8eb7777561 Ensure homekit version strings conform to spec (#35741)
HomeKit requires all version strings to be in the
format MAJOR.MINOR.REVISION
2020-05-17 15:51:51 -05:00
J. Nick KostonandGitHub 4de30ca2ce Improve stability of homekit media players (#35080) 2020-05-02 14:15:44 -07:00
793592b2b8 Config flow for homekit (#34560)
* Config flow for homekit

Allows multiple homekit bridges to run

HAP-python state is now stored at .storage/homekit.{entry_id}.state
aids is now stored at .storage/homekit.{entry_id}.aids

Overcomes 150 device limit by supporting
multiple bridges.

Name and port are now automatically allocated
to avoid conflicts which was one of the main
reasons pairing failed.

YAML configuration remains available in order to offer entity
specific configuration.

Entries created by config flow can add and remove
included domains and entities without having to restart

* Fix services as there are multiple now

* migrate in executor

* drop title from strings

* Update homeassistant/components/homekit/strings.json

Co-authored-by: Paulus Schoutsen <[email protected]>

* Make auto_start advanced mode only, add coverage

* put back title

* more references

* delete port since manual config is no longer needed

Co-authored-by: Paulus Schoutsen <[email protected]>
2020-04-30 23:05:06 -05:00
d06fce6997 Display Homekit QR code when pairing (#34449)
* Display a QR code for homekit pairing

This will reduce the failure rate with HomeKit
pairing because there is less chance of entry
error.

* Add coverage

* Test that the qr code is created

* I cannot spell

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: Paulus Schoutsen <[email protected]>

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: Paulus Schoutsen <[email protected]>

Co-authored-by: Paulus Schoutsen <[email protected]>
2020-04-21 17:38:43 -05:00
J. Nick KostonandGitHub e4ee4cf302 Remove legacy async_add_job from homekit tests (#33727)
* Remove legacy async_add_job from homekit tests

* Empty commit to rerun CI
2020-04-05 21:33:36 -05:00
Javier González CallejaandPaulus Schoutsen c6b08b28b2 Fix homekit temperaturesensor round (#27047)
* Fix homekit temperature sensor for round with one decimal

* Removing unnecesary operations

* Adapting tests for new temperature_to_homekit() result precision
2019-10-03 17:44:07 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Austin Drummondandcdce8p b4e2a0ef84 Add HomeKit low battery threshold config (#23363) 2019-04-30 02:02:53 +02:00
cdce8pandGitHub 6d2412022b Fix HomeKit fan speed conversion (#22951)
* Check that speed value from state is not 'None'
* Added tests
2019-04-10 08:35:17 +02:00
Austin Drummondandcdce8p c4e31bc4df Add linked battery sensor to HomeKit (#22788) 2019-04-09 23:13:48 +02:00
Andreas Hartlandcdce8p a94a24f6f8 Added HomeKit fan speed based on speed_list (#19767)
Speed_list needs to be in ascending order.
2019-02-05 16:11:19 +01:00
cdce8pandPaulus Schoutsen 959fa81ea6 Fix temperature interval Thermostat HomeKit (#18192)
* Will round to nearest .0 or .5
2018-11-04 22:04:51 +01:00
cdce8pandGitHub 37a47b5a59 Add faucet, shower, sprinkler, valve to HomeKit (#17145) 2018-10-05 12:43:50 +02:00
cdce8pandGitHub 52ff232797 Bugfix invalid entity_config parameter HomeKit (#17143) 2018-10-04 20:37:04 +02:00
Matt Schmittandcdce8p 722c27f1e2 HomeKit style clean up (#14793) 2018-06-17 13:37:44 +02:00
Matt Schmittandcdce8p f5d74e07d5 Add support for outlets in HomeKit (#14628) 2018-06-01 18:04:54 +02:00
cdce8pandPaulus Schoutsen 6f4dd7b057 Improve Homekit media_player options (#14637)
* Optimize imports

* Optimize name

* Optimize config schema

* Rename mode to feature

* Replace mode with feature_list
2018-05-28 10:26:33 -04:00
Matt Schmittandcdce8p a9f19a16ee Add HomeKit support for media players (#14446) 2018-05-25 11:37:20 +02:00
cdce8pandPaulus Schoutsen 0589379de5 Homekit style cleanup (#14556)
* Style cleanup

* Sorted imports
* Harmonized service calls

* Test improvements

* Small update
2018-05-20 22:25:53 -04:00
cdce8pandGitHub 12e76ef7c1 Update HAP-python to 2.1.0 (#14528) 2018-05-18 16:32:57 +02:00
cdce8pandGitHub 4c328baaa6 Add code to HomeKit lock (#14524) 2018-05-18 13:52:52 +02:00
Matt Schmittandcdce8p 621c653fed Allow HomeKit name to be customized (#14159) 2018-05-11 14:22:45 +02:00
cdce8pandGitHub 8fcf085829 Rewritten HomeKit tests (#14377)
* Use pytest fixtures and parametrize
* Use async
2018-05-11 01:21:59 +02:00
Yonsmandcdce8p c863b9614c Support CO2/PM2.5/Light sensors in HomeKit (#13804)
* Support co2/light/air sensor in HomeKit
* Add tests
* Added tests
* changed device_class lux to light
2018-04-12 15:01:41 +02:00
cdce8pandJohann Kellerman 2a5751c09d Homekit refactor (#13707) 2018-04-11 22:24:14 +02:00
cdce8pandGitHub 9eda04b787 Homekit: Bugfix Thermostat Fahrenheit support (#13477)
* Bugfix thermostat temperature conversion
* util -> temperature_to_homekit
* util -> temperature_to_states
* util -> convert_to_float
* Added tests, deleted log msg
2018-03-27 11:31:18 +02:00
cdce8pandGitHub d348f09d3d HomeKit Restructure (new config options) (#12997)
* Restructure
* Pincode will now be autogenerated and display using a persistence notification
* Added 'homekit.start' service
* Added config options
* Renamed files for types
* Improved tests
* Changes (based on feedback)
* Removed CONF_PIN_CODE
* Added services.yaml
* Service will only be registered if auto_start=False
* Bugfix names, changed default port
* Generate aids with zlib.adler32
* Added entity filter, minor changes
* Small changes
2018-03-15 02:48:21 +01:00