1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00
Commit Graph

35 Commits

Author SHA1 Message Date
Marc Mueller
e0ab4ee842
Use NamedTuple for homekit valve type + service info (#56944) 2021-10-04 13:35:31 +02:00
ha0y
433775cf4b
Add input_select and select domain support for HomeKit (#54760)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-30 15:28:26 -05:00
J. Nick Koston
dcf4eb5e0d
Remove HomeKit event guards (#54343) 2021-08-09 23:49:51 +02:00
J. Nick Koston
adc9f75493
Increase time before scene and script HomeKit entities are reset (#54105) 2021-08-05 19:24:24 -07:00
J. Nick Koston
671e838085
Execute scripts from HomeKit (#53106) 2021-07-19 12:07:12 +02:00
J. Nick Koston
6af754a7d3
Fix turning off scene in homekit (#47604) 2021-03-08 14:19:05 -08:00
J. Nick Koston
b775a0d796
Run homekit service calls in async since the server is now async (#45859)
* Simplify homekit runs and service calls

Now that the homekit server is async, call_service
and run are running in the Home Assistant event loop

* remove comment

* remove another comment
2021-02-19 21:34:52 -10:00
J. Nick Koston
38a5f25b59
Fix vacuums that do not support start with homekit (#45030)
* Fix vacuums that do not support start with homekit

* fix tests
2021-01-11 14:38:42 +01:00
Bram Kragten
7d77fa92c2
Add mode info attributes to script and automation (#37815)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-14 10:47:59 -07:00
J. Nick Koston
742e36ba26
Reduce context switching in homekit state updates (#35147) 2020-05-10 22:10:08 -07:00
J. Nick Koston
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 <paulus@home-assistant.io>

* 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 <paulus@home-assistant.io>
2020-04-30 23:05:06 -05:00
J. Nick Koston
f0d553514d
Add vacuum support to homekit (#34386) 2020-04-20 08:00:52 -07:00
J. Nick Koston
d6a47cb3e0
Set homekit alarm/sensor/switch/cover state as soon as possible (#34245)
* Set homekit alarm/sensor/switch state as soon as possible

This change is part of a multi-part effort to fix the
HomeKit event storms on startup.

Previously we would set the states after HomeKit
had started up which meant that when the controller
client connected it would request the states and get
a list of default states so all the initial states
would always be wrong. The defaults states generally went
unnoticed because we set the state of each HomeKit device
soon after which would result in an event storm in the log
that looked like the following for every client and every
device:

Sending event to client: ('192.168.x.x', 58410)
Sending event to client: ('192.168.x.x', 53399)
Sending event to client: ('192.168.x.x', 53399)

To solve this, we now set the state right away when we
create the entity in HomeKit, so it is correct on
initial sync, which avoids the event storm.  Additionally,
we now check all states values before sending an update
to HomeKit to ensure we do not send events when nothing
has changed.

* pylint

* Fix event storm in covers as well

* fix refactoring error in security system

* cover positions, now with constants
2020-04-15 21:38:31 -05:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Fabian Affolter
3736120c6a
Update file header (#21061)
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
cdce8p
132bb7902a Update HAP-python to 2.4.0 (#18355) 2018-11-10 18:33:45 +01:00
quthla
c59b038512 Add scenes as switches HomeKit (#17799) 2018-11-05 21:36:30 +01:00
quthla
8ee0e0c6c6 Turn off not cancellable scripts automatically HomeKit (#17793) 2018-11-05 11:11:26 +01:00
cdce8p
4a3f754033 Revert HomeKit update to 2.2.2 (#18069) 2018-11-01 19:35:02 +01:00
cdce8p
599390d985 Update HAP-python to 2.3.0 (#17778)
* Update HAP-python to 2.3.0

* Fix tests
2018-10-25 09:45:56 +02:00
cdce8p
a9a8cbbd10
Homekit component cleanup (#17627)
* hass.async_add_executor_job
* Fix accessories.run -> async_track_state_change
* Fixed media_player test
* Flags are now local vars
* consistent use of " and '
2018-10-20 00:14:05 +02:00
ehendrix23
fee87cd6ed Add LogBook support to HomeKit (#17180) 2018-10-16 13:32:53 +02:00
cdce8p
37a47b5a59
Add faucet, shower, sprinkler, valve to HomeKit (#17145) 2018-10-05 12:43:50 +02:00
Matt Schmitt
722c27f1e2 HomeKit style clean up (#14793) 2018-06-17 13:37:44 +02:00
Matt Schmitt
f5d74e07d5 Add support for outlets in HomeKit (#14628) 2018-06-01 18:04:54 +02:00
cdce8p
7d2563eb1f
Update HAP-python to 2.2.2 (#14674)
* Pass driver to accessory
* Added 'hk_driver' fixture for tests
2018-05-29 22:43:26 +02:00
cdce8p
0589379de5 Homekit style cleanup (#14556)
* Style cleanup

* Sorted imports
* Harmonized service calls

* Test improvements

* Small update
2018-05-20 22:25:53 -04:00
Matt Schmitt
621c653fed Allow HomeKit name to be customized (#14159) 2018-05-11 14:22:45 +02:00
cdce8p
e37fd5b132 Update HAP-python to 2.0.0 (#14278)
* Fixed async (added 'async_add_job' and 'add_job')

* Driver status

* Use pyhap category constants

* Changed 'set_broker' to 'set_driver'

* Changed loader method names

* Use 'serv.configure_char'

* Use 'self.set_info_service'

* Use 'self.add_preload_service'

* Fix hound issue

* Updated HAP-python to 2.0.0
2018-05-04 16:46:00 +02:00
cdce8p
2a5751c09d Homekit refactor (#13707) 2018-04-11 22:24:14 +02:00
cdce8p
85487612d5 Update Homekit to 1.1.9 (#13716)
* Version bump to HAP-python==1.1.9

* Updated types and tests
2018-04-06 10:20:59 -04:00
cdce8p
692b2644c7
Minor style changes, cleanup (#13654)
* Minor style changes, cleanup
* Change 'self._entity.id' to 'self.entity_id'
* Use const 'STATE_OFF'
* Added CATEGORY constants
* Removed *args from accessory types
* Changed 'self._hass' to 'self.hass'
* Added log debug msg (for added lights)
2018-04-05 00:52:25 +02:00
cdce8p
7db37a3834 HomeKit: Bugfix & improved logging (#13431)
* Bugfix & improved logging

* Removed logging statements

* Removed logging test
2018-03-25 12:53:15 +02:00
cdce8p
2350ce96a6
Homekit: New supported devices (#13244)
* Fixed log message
* Added support for scripts
* Added support for lights
* Small refactoring
* Added support for humidity sensor
* Added tests
2018-03-16 01:05:28 +01:00
cdce8p
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