Commit Graph

22572 Commits (a5960830d79d64d6f0d3890a71e5f78c70125a13)

Author SHA1 Message Date
Rami Mosleh a5960830d7 Add host field to add_torrent service (#28653)
* Add host field to add_torrent service

* Code cleanup

* use name instead of host for service

* update add_torrent
2019-11-26 09:22:12 -08:00
Matthew Donoughe f8a36499c1 Add serial to caseta devices (#28886)
* add model and serial to caseta devices

* use just serial for unique id

* add display name for entity registry

* remove caseta device model

* just store device

* state and device are the same
2019-11-26 09:06:14 -08:00
Hmmbob 9e971495f7 Update WazeRouteCalculator, add config options, fix subscription (#27963)
* Update WazeRouteCalculator to 0.11

* Update WazeRouteCalculator to 0.11

* Adding new config options to Waze

* Fixing avoid subscription option

* Update WazeRouteCalculator to 0.12

There was an error in the underlying lib

* Update WazeRouteCalculator to 0.12
2019-11-26 09:05:06 -08:00
Quentame 44e708f72b Move ee_brightbox imports at top-level (#29054)
* Move ee_brightbox imports at top-level

* Fix tests

* Fix : Commented out code
2019-11-26 08:59:55 -08:00
Quentame 78d5184186 Move icloud imports at top-level (#29089) 2019-11-26 08:59:42 -08:00
Austin Drummond c47ed743f1 Fix HomeKit linked battery sensor crash (#28974)
* fix homekit linked battery sensor crash

* simplified missing linked battery

* fixed formatting

* Make if faster
2019-11-26 08:55:33 -08:00
Pascal Vizeli f9571c9637
Fix Alexa tests (#29100) 2019-11-26 16:17:41 +01:00
Bendik Brenne c538d899a2 Fix empty data attribute in sinch service call (#28253)
* Fix empty data attribute in sinch service call

* Simplified the PR as per @MartinHjelmare`s request.
2019-11-26 14:14:09 +01:00
Paulus Schoutsen c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Tim McCormick 6c6a5c50a5 Fix digest auth rest sensors (#28153)
* Fix digest auth rest sensors

* Refactor to use request()

* Fix black complaints

* Don't rename data variable

Don't rename the data variable, appears several other sensors have been coded to rely on it

* Fix tests

test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.

test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.

test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.

* Remove no longer needed import

* Fix binary sensor test in same way
2019-11-25 23:22:11 -08:00
ochlocracy b0925e60d7 Explicitly include "Alexa" Interface in discovery response (#28218)
* Explicitly include Alexa Interface to discovery response.

* Updated cloud component test to reflect additional Alexa interface.

* Updated test for recently added SeekController.
2019-11-25 23:05:10 -08:00
Bas Nijholt db425f5432 Simplify getting alias from tplink smartplug.context (#28696)
* tplink: simplify getting alias from smartplug.context

* add a doc-string to private property
2019-11-25 23:03:38 -08:00
Ville Skyttä 99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Barry Williams afaa464142 If volume disabled do not enable support (#28635) 2019-11-25 22:34:45 -08:00
Shulyaka 1f72de108c google_assistant: support for humidity sensors (#28695) 2019-11-25 22:12:20 -08:00
Emeric 72ccc83651 Add uptime and number of reboot for bbox sensor (#28880)
* Add uptime and reboot for bbox sensor

* Use timestamp for uptime

* Fix black format
2019-11-25 21:34:13 -08:00
Adam Cheng 6e7b5b71f5 Add scale and offset to temperature values to Modbus Climate (#27045)
* Add scale and offset to temperature values

* fix (no-else-return)

* Update manifest.json

* Added codeowners
2019-11-25 20:59:01 -08:00
Dmitry Krasnoukhov 4881bc04d8 Allow to change MQTT climate hold mode (#28988) 2019-11-25 20:53:37 -08:00
springstan 5f4fc271d4 Fixed CONFIG_SCHEMA and getting data from the config (#28985) 2019-11-25 20:27:51 -08:00
Pedro Lamas db0008e62c Allow templates in rest_command headers (#26099) 2019-11-25 19:39:56 -08:00
springstan cc255da038 Move imports to top for ecovacs (#29017)
* Moved imports in ecovacs integration

* Imported sucks once, reused it multiple times
2019-11-25 18:01:48 -08:00
Michaël Arnauts cc346e57e6 Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float

* Fix test that expects the wrong bahaviour

* Catch exception instead of checking for None
2019-11-25 18:01:24 -08:00
Quentame 8a413b152d Move esphome imports at top-level (#29064) 2019-11-25 18:00:58 -08:00
olijouve 87de5db535 Fix Onvif setup error: premature end of connection on GetStreamURI (#26781)
* Fix Onvif setup error with a premature end of connection on GetStreamUri wsdl call

Reconnect to onvif camera after getting profiles to fix this error :

[homeassistant.components.onvif.camera] Retrieving stream uri                                                                                                                                 
[zeep.asyncio.transport] HTTP Post to http://192.168.1.15/onvif/Media:                                                                                                                        
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
2019-09-20 01:08:51 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif                                                                                                                       
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 553, in write_bytes                                                                                                                                   
    await self.body.write(writer)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.7/site-packages/aiohttp/payload.py", line 231, in write                                                                                                                                               
    await writer.write(self._value)                                                                                                                                                                                                  
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 101, in write                                                                                                                                           
    self._write(chunk)                                                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write                                                                                                                                           
    raise ConnectionResetError('Cannot write to closing transport')                                                                                                                                                                  
ConnectionResetError: Cannot write to closing transport                                                                                                                                                                              
                                                                                                                                                                                                                                     
The above exception was the direct cause of the following exception:                                                                                                                                                                 
                                                                                                                                                                                                                                     
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform                                                                                                                         
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)                                                                                                                                                                
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 110, in async_setup_platform                                                                                                                          
    await hass_camera.async_initialize()                                                                                                                                                                                             
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 168, in async_initialize                                                                                                                              
    await self.async_obtain_input_uri()                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 266, in async_obtain_input_uri                                                                                                                        
    stream_uri = await media_service.GetStreamUri(req)                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 13, in send                                                                                                                                           
    options["address"], envelope, http_headers                                                                                                                                                                                       
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 107, in post_xml                                                                                                                                     
    response = await self.post(address, message, headers)                                                                                                                                                                            
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 95, in post                                                                                                                                          
    proxy=self.proxy,                                                                                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request                                                                                                                                             
    await resp.start(conn)                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start                                                                                                                                         
    message, payload = await self._protocol.read()  # type: ignore  # noqa                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read                                                                                                                                                
    await self._waiter                                                                                                                                                                                                               
aiohttp.client_exceptions.ClientOSError: [Errno None] Can not write request body for http://192.168.1.15/onvif/Media

* Add code comment

* Update camera.py

* Lint.
2019-11-25 17:56:17 -08:00
Andrew Onyshchuk f5c01cc30d Improve z-wave thermostat support (#27040)
* Improve z-wave thermostat support

Discover thermostat using COMMAND_CLASS_THERMOSTAT_MODE
so that it is a single entitiy in case there are multiple
setpoints. z-wave docs mention it is always present.
Add support for single/range target temperature depending
on the current thermostat mode.

* Remove debug print

* Refactor Z-Wave dynamic setpoint(s) selection

- use explicit mapping between modes and setpoints as defined in
Z-Wave specs
- add tests for away (2 setpoints) and heat eco (1 setpoint) modes

* Add non-standard thermostat mode aliases
2019-11-25 16:32:37 -08:00
HomeAssistant Azure 807de1aeb3 [ci skip] Translation update 2019-11-26 00:32:24 +00:00
Gil Peeters 0088995b98 Refactor template components to extract common routines (#27064)
* Added availability_template to Template Cover platform

* Added availability_template to Template Binary Sensor platform

* Added availability_template to Template Fan platform

* Added availability_template to Template Light platform

* Added availability_template to Template Sensor platform

* Added availability_template to Template Switch platform

* Added availability_template to Template Vacuum platform

* Added availability_template to Template Lock platform

* Added to test for invalid values in availability_template

* Black and Lint fix

* black formatting

* Added to test for invalid values in availability_template

* black

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* simplified exception handler

* Fixed Entity discovery big and coverage

* Added to test for invalid values in availability_template

* flake8

* fixed component ID in test

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* Made availability_template redering erorr more concise

* Cleaned template setup

* I'll remember to run black every time one of these days...

* Refactored Template initialisation

* Refactored Template initialisation

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fixed linting issues

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Removed 'Magic' string and removed duplicate code

* Removed 'Magic' string

* Removed 'Magic' string

* Brought contant into line

* Refactored availability_tempalte rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* Fixed tests (magic values and state checks)

* Fixed tests (magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Removed duplicate

* Clean up and remove debug

* Reverted Dev Container Change
2019-11-25 16:30:49 -08:00
Jacob McSwain d5db55354e Add SSL configuration (#29038)
* OpenGarage: Add protocol configuration (#29037)

* OpenGarage: Change CONF_PROTOCOL to CONF_SSL

Resolves https://github.com/home-assistant/home-assistant/pull/29038#discussion_r350173095

* OpenGarage: Add `verify_ssl` as an option
2019-11-25 15:47:18 -08:00
Quentame 112a3f5e9f Move hangouts imports at top-level (#29055) 2019-11-25 15:44:11 -08:00
SukramJ 1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
springstan 3203cba01f Move imports to top for xiaomi_tv (#29073) 2019-11-25 15:40:42 -08:00
springstan c95a01ce3a Move imports to top for yale_smart_alarm (#29074) 2019-11-25 15:40:25 -08:00
springstan 729116ff3a Move imports to top for version (#29075) 2019-11-25 15:40:08 -08:00
springstan a64d04da56 Move imports to top for xeoma (#29076) 2019-11-25 15:39:54 -08:00
springstan d211a29cae Move imports to top for xfinity (#29077) 2019-11-25 15:39:44 -08:00
Quentame 844eb6b8ef Move dlna_dmr imports at top-level (#29082) 2019-11-25 15:37:19 -08:00
Quentame 5015993f30 Move upnp imports at top-level (#29083) 2019-11-25 15:37:03 -08:00
Quentame 29e2201446 Move velux imports at top-level (#29085) 2019-11-25 15:36:37 -08:00
Quentame 12c396fb19 Move epsonworkforce imports at top-level (#29086) 2019-11-25 15:36:04 -08:00
ochlocracy 970a80216d Add valid inputs to alexa InputController (#28483)
* Add supported Inputs for Alexa.InputController.

* Fixed Test.

* Added default parameter for get() per @quthla suggestion.

* Added additional tests, assets call data.

* Added additional tests, asserts call data.

* Accounted for space in input name, added tests to handle space.
2019-11-25 15:17:12 -08:00
mvn23 f53812f261 Fix opentherm_gw config flow migration (#28474)
* Fix opentherm_gw migration to config flow.

* Address feedback
2019-11-25 15:08:18 -08:00
ochlocracy 5ea5db32d2 Add Alexa.ModeController to cover entities, adds open/close utterances! (#28309)
* Added Alexa.ModeController to cover entities.

* Added synonyms for directives.

* Updated tests for additional synonyms for directives.

* Added Alexa.ModeController to cover entities.

* Sacrifice unused variable in split() to please the Pylint gods.

* Removed duplicate instance check.

* Corrected variable name, clarified definition and consistency.

* Changed list to tuple.
2019-11-25 15:07:33 -08:00
ochlocracy dc8c085872 Support default display category based one switch device_class. (#28221) 2019-11-25 14:50:43 -08:00
Quentame f971e16749 Move eddystone_temperature imports at top-level (#29052)
* Move eddystone_temperature imports at top-level

* Fix pylint ?
2019-11-25 23:46:12 +01:00
Heine Furubotten 04754b354c Entur public transport code owner (#29080)
* entur code owner

* gen codeowners file
2019-11-25 23:45:33 +01:00
Heine Furubotten 66b7dfec53 Nilu integration code owner (#29081)
* nilu code owner

* gen codeowners file
2019-11-25 23:45:14 +01:00
Quentame c4108fec4f Move yi imports at top-level (#29001)
* Move yi imports at top-level

* Review 1 : removing useless disable=import-error

* Review 2 : removing useless disable=import-error
2019-11-25 15:32:35 -07:00
majuss 3dd5222ec7 Bumped lupupy to version 0.0.18 (#28989)
* Bumped lupupy

* Ran gen req

* Ran gen hassfest


Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2019-11-25 20:21:54 +01:00
SukramJ 9a5dc848c9 Fix climate device actions (#28660)
* limit climate device actions

* update test

* use supported_features for device_action

* Fix tests

* user support_features for device_condition
2019-11-25 11:12:00 -08:00
Bas Nijholt ea6417bea3 track Raspberry Pi 4 image in the version integration (#29059) 2019-11-25 10:07:27 -08:00