1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00
Commit Graph

5264 Commits

Author SHA1 Message Date
Greg Thornton
dd715fcc3a
Add homekit camera support (#32527)
* Add homekit camera support

* Cleanup pyhapcamera inheritance

* Add camera to homekit manifest

* Use upstream pyhap server handler in homekit

* Remove unused homekit constants

* Fix lint errors in homekit camera

* Update homekit camera log messages

* Black after conflict fixes

* More conflict fixes

* missing srtp

* Allow streaming retry when ffmpeg fails to connect

* Fix inherit of camera config, force kill ffmpeg on failure

* Fix audio (Home Assistant only comes with OPUS)

* Fix audio (Home Assistant only comes with OPUS)

* Add camera to the list of supported domains.

* add a test for camera creation

* Add a basic test (still needs more as its only at 44% cover)

* let super handle reconfigure_stream

* Remove scaling as it does not appear to be needed and causes artifacts

* Some more basic tests

* make sure no exceptions when finding the source from the entity

* make sure the bridge forwards get_snapshot

* restore full coverage to accessories.py

* revert usage of super for start/stop stream

* one more test

* more mocking

* Remove -tune zerolatency, disable reconfigure_stream

* Restore -tune zerolatency

Co-authored-by: John Carr <john.carr@unrouted.co.uk>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-04 19:03:46 -05:00
Erik Montnemery
f9b420a5a5
Make sure MQTT light brightness is not rounded to 0 (#35207) 2020-05-04 15:54:49 -07:00
David F. Mulcahey
8279efc164
Group by endpoints and not by devices for ZHA Zigbee groups (#34583)
* start implementation
* handle members correctly
* fix group member info
* align groupable devices with group members
* handle group endpoint adding and removing
* update add group
* update group and group member
* update create group
* remove domain check
* update test
* remove temporary 2nd groupable device api
* update test
* rename validator - review comment
* fix test that was never running
* additional testing
* fix coordinator descriptors
* remove check that was done twice
* update test
* Use AsyncMock()
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-05-04 15:19:53 -04:00
Paulus Schoutsen
e54e9279e3
Extract instance ID helper from updater (#35043) 2020-05-04 11:23:12 -07:00
Steven Looman
ee07fac9bc
Simplification of upnp component (#35191) 2020-05-04 10:30:43 -07:00
Robert Svensson
c5ce95ff06
UniFi - Improve signalling and handling of adding new entities (#34925)
* Change signalling and handling of adding devices

* Bump aiounifi to v19
Use the proper variable for roamradio
2020-05-04 19:29:49 +02:00
Xiaonan Shen
de628602c2
Remove certificate configuration variable from roomba (#35162)
* Remove certificate option from roomba

* Fix roomba test

* Add back certificate with deprecated flag

* Remove invalidation_version
2020-05-04 08:28:32 -04:00
Thomas Hollstegge
c5379a0f35
Improve emulated_hue compatibility with newer systems (#35148)
* Make emulated hue detectable by Busch-Jaeger free@home SysAP

* Emulated hue: Remove unnecessary host line from UPnP response

* Test that external IPs are blocked for config route

* Add another test for unauthorized users

* Change hue username to nouser

nouser seems to be used by the official Hue Bridge v1 Android app and is
used by other projects as well

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-04 00:18:33 -05:00
Thomas Hollstegge
e4e89becc6
Return emulated hue id for update requests (#35139)
* Return emulated hue id for update requests

* Emulated Hue: Rename function argument to match its content

* Use HTTP status consts throughout the test

* Use HTTP status consts in UPnP test
2020-05-03 19:27:19 -05:00
Martin Hjelmare
39431c0764
Add required features to cover service registration (#35073)
* Fix typing in component service method

* Add required features to cover service registration

* Fix template cover tilt features

* Delint template cover tests
2020-05-03 23:21:12 +02:00
Paulus Schoutsen
b90cb09fd1
Add type to device registry (#35095) 2020-05-03 13:56:58 -07:00
J. Nick Koston
6f6c670b3b
Make alexa and google aware of DEVICE_CLASS_GATE (#35103) 2020-05-03 13:29:12 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Daniel Høyer Iversen
5a2528b0f1
Tibber config flow (#34469)
* tibber config, wip

* read config from yaml

* sync requirements

* style

* add model property

* unique id

* unique id

* Tibber config, unique id

* test doc

* tibber config, update title

* append _el_price

* Update homeassistant/components/tibber/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* unique id

* tibber config flow

* tibber config flow

* fix test for python 3.8

* update test imports

* move _async_current_entries

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-05-03 14:40:19 +02:00
Quentame
661656e373
Fix Synology NAS discovered multiple times (#35094) 2020-05-02 22:46:55 -07:00
Steven Looman
6afb42bf7a
Improve UPnP configuration flow (#34737) 2020-05-02 18:03:54 -07:00
Martin Hjelmare
aeb891649e
Add zwave mqtt (#34987) 2020-05-03 02:54:16 +02:00
Robert Svensson
a2048b4c7a
UniFi - Catch controllers running on UniFi OS that don't have a local user configured (#35060) 2020-05-02 14:16:45 -07:00
Robert Svensson
221b07595f
UniFi - Add support for 2.4/5 GHz separated SSIDs (#35062) 2020-05-02 14:16:18 -07:00
J. Nick Koston
4de30ca2ce
Improve stability of homekit media players (#35080) 2020-05-02 14:15:44 -07:00
Robert Van Gorkom
ab08c1bef8
Fix vera config ids not being converted to integers (#35070) 2020-05-02 14:10:49 -07:00
J. Nick Koston
963236916c
Fix another race in august tests (#35054) 2020-05-01 21:01:15 -07:00
Paulus Schoutsen
b3201523aa
Fix translation merging for custom components without translations (#35032) 2020-05-01 11:34:09 -07:00
Erik Montnemery
2b13a8cde4
Include QoS and retain in MQTT debug info (#35011) 2020-05-01 08:41:57 -07:00
Franck Nijhof
8c65062271
Several optimizations to automations (#35007) 2020-05-01 16:37:25 +02:00
Erik Montnemery
f3d79104a7
Rename WaterHeaterDevice to WaterHeaterEntity (#34675)
* Rename WaterHeaterDevice to WaterHeaterEntity

* Fix stale name

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-01 16:29:14 +02:00
Jason Hunter
850b5cb02b
Config flow for ONVIF (#34520) 2020-04-30 23:15:40 -07:00
J. Nick Koston
af62660b14
Attempt to fix flapping august lock test (#34998) 2020-04-30 22:35:23 -07:00
Erik Montnemery
82a478e2fb
Fix MQTT debug info for same topic (#34952) 2020-04-30 22:34:44 -07:00
Robert Svensson
72e7beeb76
UniFi - Add simple options flow (#34990) 2020-04-30 22:33:22 -07:00
Raman Gupta
3e06e6b4b3
Don't attempt to set Vizio is_volume_muted property if Vizio API doesn't provide muted state (#34782) 2020-04-30 21:05:45 -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
João Gabriel
4e55fa6c5c
Refactor Remote class in panasonic_viera (#34911) 2020-05-01 02:35:02 +02:00
Paulus Schoutsen
76f392476b
Use a future for mock coro (#34989) 2020-04-30 16:31:00 -07:00
Chris Talkington
ba7391528f
Add unique id to esphome config flow (#34753) 2020-04-30 16:24:47 -07:00
Franck Nijhof
928d9ec117
Fix not condition validation and entity/device extraction (#34959) 2020-05-01 00:15:53 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Ville Skyttä
435a88636a
Address new issues flagged by flake8 3.8.0a2 (#34964) 2020-04-30 21:37:58 +02:00
J. Nick Koston
bf5cc22bef
Fix preservation of homekit fan speed on toggle (#34971) 2020-04-30 11:34:25 -07:00
clssn
15b1a9ecea
Add numato integration (#33816)
* Add support for Numato 32 port USB GPIO boards

Included are a binary_sensor, sensor and switch component
implementations. The binary_sensor interface pushes updates via
registered callback functions, so no need to poll here.

Unit tests are included to test against a Numato device mockup.

* Refactor numato configuration due to PR finding

* Resolve minor review findings

* Bump numato-gpio requirement

* Load numato platforms during domain setup

According to review finding

* Guard from platform setup without discovery_info

According to review finding

* Move numato API state into hass.data

According to review finding.

* Avoid side effects in numato entity constructors

According to review finding

* Keep only first line of numato module docstrings

Removed reference to the documentation. Requested by reviewer.

* Minor improvements inspired by review findings

* Fix async tests

Pytest fixture was returning from the yield too early executing teardown
code during test execution.

* Improve test coverage

* Configure GPIO ports early

Review finding

* Move read_gpio callback to outside the loop

Also continue on failed switch setup, resolve other minor review
findings and correct some error messages

* Bump numato-gpio requirement

This fixes a crash during cleanup. When any device had a communication
problem, its cleanup would raise an exception which was not handled,
fell through to the caller and prevented the remaining devices from
being cleaned up.

* Call services directly

Define local helper functions for better readability.
Resolves a review finding.

* Assert something in every test

So not only coverage is satisfied but things are actually tested
to be in the expected state.
Resolves a review finding.

* Clarify scope of notification tests

Make unit test for hass NumatoAPI independent of Home Assistant (very basic test of notifications).
Improve the regular operations test for notifications.

* Test for hass.states after operating switches

Resolves a review finding.

* Check for wrong port directions

* WIP: Split numato tests to multiple files

test_hass_binary_sensor_notification still fails.

* Remove pytest asyncio decorator

Apears to be redundant. Resolves a review finding.

* Call switch services directly.

Resolves a review finding.

* Remove obsolete inline pylint config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Improve the numato_gpio module mockup

Resolves a review finding.

* Remove needless explicit conversions to str

Resolves review findings.

* Test setup of binary_sensor callbacks

* Fix test_hass_binary_sensor_notification

* Add forgotten await

Review finding.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-30 14:23:30 +02:00
Chris Talkington
b4083dc14f
Use entry ID when IPP printer offers no identifier (#34316) 2020-04-30 00:21:53 -07:00
J. Nick Koston
e01ceb1a57
Fix handling homekit thermostat states (#34905) 2020-04-30 00:09:33 -07:00
J. Nick Koston
fcd58b7c9b
Avoid error when battery appears after homekit has started (#34906) 2020-04-30 00:08:56 -07:00
J. Nick Koston
6c18a2cae2
Config flow for hunterdouglas_powerview (#34795)
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-29 14:24:57 -07:00
Andrew Sayre
6ae7f31947
SmartThings continue correct config flow after external auth (#34862) 2020-04-29 14:05:20 -07:00
J. Nick Koston
97c82089b4
Abort nexia import if the username is already configured (#34863) 2020-04-29 14:02:59 -07:00
J. Nick Koston
6ce0819287
Prevent homekit fans from going to 100% than speed when turning on (#34875) 2020-04-29 14:00:31 -07:00
J. Nick Koston
5516063f46
Prevent tplink tests from doing I/O (#34879) 2020-04-29 13:44:40 -07:00
Rami Mosleh
6e0d61e5e8
Fix Islamic prayer times naming (#34784) 2020-04-29 13:38:20 +02:00
escoand
f64c35c3f9
Handle more fritzbox edge cases (#34802) 2020-04-28 22:17:35 -07:00