Commit Graph

25559 Commits (e3bcfb88e709e756af2d47d4ca6aa04512869a7b)

Author SHA1 Message Date
Ron Klinkien 774b1d1663
Enable KNX tunnel auto_reconnect by default (#33387)
* Added tunnel reconnect functionality

* Code improvements

* Update homeassistant/components/knx/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Enable auto_reconnect for tunnels by default

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-04-01 00:22:20 +02:00
J. Nick Koston 90dd796644
Prepare rachio for cloudhooks conversion (#33422)
Reorganize code in order to prepare for webhooks
2020-03-31 14:46:30 -07:00
J. Nick Koston a473ae6711
Ignore link local addresses during doorbird ssdp config flow (#33401) 2020-03-31 14:20:29 -07:00
Chris Caron be99f3bf32
Bumped Apprise version to v0.8.5 (#33473) 2020-03-31 22:30:27 +02:00
Raman Gupta 5047635224
update VIZIO name to match brand guidelines (#33465) 2020-03-31 22:28:08 +02:00
J. Nick Koston e6ed2f0377
Add version and device type to powerwall device_info (#33453)
* Add version and device type to powerwall device_info

* Upstream powerwall now supports a http_session
2020-03-31 12:55:50 -07:00
Franck Nijhof b88f56cbfb
Merge branch 'master' into dev 2020-03-31 21:07:45 +02:00
Paulus Schoutsen 06216a8a45
Google Assistant: parallize as many requests as possible (#33472)
* Google Assistant: parallize as many requests as possible

* Fix double comment
2020-03-31 12:01:31 -07:00
J. Nick Koston f085a0c54a
Retry sense setup later if listing devices times out. (#33455) 2020-03-31 11:59:03 -07:00
J. Nick Koston b783aab41b
Add binary sensor for myq gateway connectivity (#33423) 2020-03-31 11:58:44 -07:00
J. Nick Koston 12b408219e
Improve handling of nuheat switching states (#33410)
* The api reports success before the state change
takes effect

* We now set state optimistically and followup with
an update 4 seconds in the future after any state change to
verify it actually happens.

* When hvac_mode is passed to the set_temperature service
we now switch to the desired mode.
2020-03-31 11:55:13 -07:00
J. Nick Koston 6cafc9aaef
Add humidity support to homekit thermostats (#33367) 2020-03-31 11:45:33 -07:00
Eugenio Panadero f5cbc9d208
Fire events for hue remote buttons pressed (#33277)
* Add remote platform to hue integration

supporting ZGPSwitch, ZLLSwitch and ZLLRotary switches.

* Ported from custom component Hue-remotes-HASS from @robmarkcole

* Add options flow for hue, to toggle handling of sensors and remotes

* Sensors are enabled by default, and remotes are disabled,
  to not generate any breaking change for existent users.
  Also, when linking a new bridge these defaults are used,
  so unless going explicitly to the Options menu,
  the old behavior is preserved.
* SensorManager stores the enabled platforms and ignores everything else.
* Bridge is created with flags for `add_sensors` and `add_remotes`,
  and uses them to forward entry setup to only the enabled platforms.
* Update listener removes disabled kinds of devices when options are changed,
  so device list is in sync with options, and disabled kinds disappear from HA,
  leaving the enable/disable entity option for individual devices.

* Fix hue bridge mock with new parameters

* Revert changes in hue bridge mock

* Remove OptionsFlow and platform flags

* Extract `GenericHueDevice` from `GenericHueSensor`

to use it as base class for all hue devices, including those without any entity,
like remotes without battery.

* Add `HueBattery` sensor for battery powered remotes

and generate entities for TYPE_ZLL_ROTARY and TYPE_ZLL_SWITCH remotes.

* Remove remote platform

* Add HueEvent class to fire events for button presses

* Use `sensor.lastupdated` string to control state changes
* Event data includes:
  - "id", as pretty name of the remote
  - "unique_id" of the remote device
  - "event", with the raw code of the pressed button
    ('buttonevent' or 'rotaryevent' property)
  - "last_updated", with the bridge timestamp for the button press
* Register ZGP_SWITCH, ZLL_SWITCH, ZLL_ROTARY remotes

* fix removal

* Exclude W0611

* Extract GenericHueDevice to its own module

and solve import tree, also fixing lint in CI

* Store registered events to do not repeat device reg

* Minor cleaning

* Add tests for hue_event and battery entities for hue remotes
2020-03-31 10:27:30 -07:00
Jeff McGehee dd1608db0d
Best effort state initialization of bayesian binary sensor (#30962)
* Best effort state initialization of bayesian binary sensor.

Why:

* https://github.com/home-assistant/home-assistant/issues/30119

This change addresses the need by:

* Running the main update logic eagerly for each entity being observed
  on `async_added_to_hass`.
* Test of the new behavior.

* Refactor in order to reduce number of methods with side effects that
mutate instance attributes.

* Improve test coverage

Why:

* Because for some reason my commits decreased test coverage.

This change addresses the need by:

* Adding coverage for the case where a device returns `STATE_UNKNOWN`
* Adding coverage for configurations with templates

* rebase and ensure upstream tests passed

* Delete commented code from addressing merge conflict.
2020-03-31 10:41:29 -06:00
Eugenio Panadero f2f03cf552
Fix deconz tests that have uncaught exceptions (#33462) 2020-03-31 11:19:34 -05:00
Eugenio Panadero 977f1a6916
Fix hue tests that have uncaught exceptions (#33443) 2020-03-31 10:17:09 -05:00
Bram Kragten ffefdcfe22
Require admin to manage lovelace (#33435) 2020-03-31 11:43:21 +02:00
Franck Nijhof f4eb1f0652
Update issue templates (#33434)
* Update issue templates

* Process review suggestions
2020-03-31 11:31:43 +02:00
Aaron Bach 23668f3c5e
Overhaul the Slack integration (async and Block Kit support) (#33287)
* Overhaul the Slack integration

* Docstring

* Empty commit to re-trigger build

* Remove remote file option

* Remove unused function

* Adjust log message

* Update homeassistant/components/slack/notify.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Code review

* Add deprecation warning

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-30 21:32:29 -06:00
Marcel Steinbach 6208d8c911
Add HomeKit support for slat tilting (#33388)
* Add HomeKit support for slat tilting

* Reset tilt-specific attribute, not position attribute

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Add explanation why we fix HomeKit's targets

We have to assume that the device has worse precision than HomeKit. If it
reports back a state that is only _close_ to HK's requested state, we'll
"fix" what HomeKit requested so that it won't appear out of sync.

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-03-30 19:47:03 -05:00
David F. Mulcahey d0dad4bfd6
Fix uncaught exceptions in ZHA tests (#33442) 2020-03-30 20:34:23 -04:00
Balazs Sandor 7330e30fd3
bump version zigpy-cc (#33448) 2020-03-30 20:33:07 -04:00
Franck Nijhof a9cbd355ca
Correct FortiOS integration name in manifest (#33454) 2020-03-30 17:20:37 -07:00
HomeAssistant Azure 3e0eaa3c87 [ci skip] Translation update 2020-03-31 00:02:51 +00:00
Chris Talkington 98f68f4798
Add Internet Printing Protocol (IPP) integration (#32859)
* Create __init__.py

* Create manifest.json

* Update zeroconf.py

* more work on integration

* more work on integration.

* add more sensor tests.

* Update const.py

* Update sensor.py

* more work on ipp.

* Update test_config_flow.py

* more work on ipp.

* Update config_flow.py

* Update config_flow.py
2020-03-30 16:13:47 -07:00
evoblicec 0e3c1dc031
Add new mapped weather condition classes to Météo France (#33450)
* Update Meteo_France Weather constants

Updating Meteo_France integration with more weather "condition" returned by the web service.

Adding: 
- "Nuit claire" (note the lower 'c') mapped to "clear-night"
- "Brume" mapped to "fog"

* Black formatting update
2020-03-31 00:05:18 +02:00
Erik Montnemery 9508c51403
Fix change of entity_id for discovered MQTT entities (#33444) 2020-03-30 14:26:59 -07:00
Bram Kragten 531207e005
Updated frontend to 20200330.0 (#33449) 2020-03-30 14:20:14 -07:00
Bram Kragten 952aa02e37
Add ability to specify group when creating user (#33373)
* Add abbility to specify group when creating user

* Fix tests

* Not default admin and tests
2020-03-30 20:33:43 +02:00
Bas Nijholt 3e0ccd2e86
Add KEF services for DSP (#31967)
* add services for DSP

* add homeassistant/components/kef/const.py

* add services.yaml

* fix set_mode

* fix services

* media_player.py fixes

* bump aiokef to 0.2.9

* update requirements_all.txt

* add basic sensor.py

* add DSP settings as attributes

* add message about kef.update_dsp

* remove sensor.py

* fix pylint issues

* update_dsp inside async_added_to_hass

* use {...} instead of dict(...)

* get DSP settings when connecting to HA or once on update

* simplify condition

* do not get mode twice

* remove async_added_to_hass

* use async_register_entity_service

* remove entity_id from schema and prepend _value

* invalidate self._dsp after setting a DSP setting

* schedule update_dsp every hour

* subscribe and unsubscribe on adding and removing to HA

* don't pass hass and set _update_dsp_task_remover to None after removing
2020-03-30 10:45:24 -07:00
David F. Mulcahey bcd1eb952c
RFC - Add a 3rd state to the HA shutdown sequence for writing… (#33358)
* add third stage to hass shutdown

* use 3rd stage in storage

* update core state

* add writing data to multi stop ignore

* update core test

* review comment

* update name based on feedback
2020-03-30 10:18:39 -07:00
da-anda 01bf4daf37
Fix detection of zone master in soundtouch media_player (#33157) 2020-03-30 17:27:02 +02:00
Santobert 0186ce7896
Filter the history of device_tracker by location attributes (#33356)
* Add include_location_attributes

* Add check for different state

* Fix things

* Drop filter

* significant changes only

* Change default behavior

* Remove trailing commas
2020-03-30 08:13:22 -07:00
J. Nick Koston f42804805c
Move Tado zone state handling into upstream python-tado library (#33195)
* Tado climate state moved to python-tado

* Resolve various incorrect states and add tests for known tado zone states

* Write state instead of calling for an update

This is a redux of pr #32564 with all of the zone state now moved into
python-tado and tests added for the various states.

* stale string

* add missing undos to dispachers

* remove unneeded hass

* naming

* rearrange

* fix water heater, add test

* fix water heater, add test

* switch hvac mode when changing temp if in auto/off/smart
2020-03-30 09:06:26 -05:00
vwir eee0a6e9f4
Fix for nissan_leaf component getting stuck (#33425)
* Fix for nissan_leaf component getting stuck

* Remove dots from error messages in nissan_leaf component
2020-03-30 09:35:50 +02:00
Kit Klein 0e6b905cdf
Add konnected multi output (#33412)
* add test to for importing multiple output settings

* provide option to set multiple output states

* tweaks after testing

* Update homeassistant/components/konnected/config_flow.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-29 20:05:59 -07:00
J. Nick Koston d59209ff47
Prevent nut from doing I/O in the event loop (#33420)
* Prevent nut from doing I/O in the event loop

device_state_attributes would call for an update if the
throttle happened to expire.

* _format_display_state no self use
2020-03-29 20:53:25 -05:00
jan iversen ad8cf2d0d0
Remove Modbus legacy code (#33407)
* Modbus: remove legacy code

flexit and stiebel_el are updated to import modbus.const,
therefore legacy code can be removed.

* Flexit: update const reference from modbus

climate.py imports from modbus direct, this is legacy and will
result in errors.

update import to be modbus.const.

* Stiebel_el: update reference to modbus

__init.py references modbus directly, this is legacy and will
give errors.

Update import to be modbus.const.
2020-03-30 01:35:58 +02:00
Aaron Bach fe0db80fb8
Bump aioambient to 1.1.0 (#33414) 2020-03-30 00:28:37 +02:00
David F. Mulcahey ef61118d49
fix ZHA IASWD commands (#33402) 2020-03-29 17:42:37 -04:00
Malte Franken de54659097
Fix GeoNet NZ Quakes tests (#33383)
* enable tests

* only remove entity if exists
2020-03-29 22:40:09 +02:00
Jc2k ad3c5240c2
Bump aiohomekit version to fix Ecobee Switch (#33396) 2020-03-29 22:38:52 +02:00
Anders Liljekvist 0f9790f5f1
Bluesound volume stepper bugfix (#33404) 2020-03-29 22:38:03 +02:00
jjlawren 68e86c5e3a
Handle Ecobee service timeouts (#33381)
* Bump pyecobee to 0.2.4

* Bump pyecobee to 0.2.5
2020-03-29 22:15:12 +02:00
SukramJ 1cd0e764b6
Use new HMIP labels for HomematicIP Cloud multi devices (#32925)
* Use new labels for HomematicIP Cloud multi devices

* Update homeassistant/components/homematicip_cloud/device.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update name composition

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-29 21:38:59 +02:00
cgtobi d45c386149
Bump opencv to 4.2.0.32 (#33391)
* Bump opencv to 4.2.0.32
2020-03-29 21:30:00 +02:00
jan iversen dd3cd95954
Modbus patch, to allow communication with "slow" equipment using tcp (#32557)
* modbus: bumb pymodbus version to 2.3.0

pymodbus version 1.5.2 did not support asyncio, and in general
the async handling have been improved a lot in version 2.3.0.

updated core/requirement*txt

* updated core/CODEOWNERS

committing result of 'python3 -m script.hassfest'.

* modbus: change core connection to async

change setup() --> async_setup and update() --> async_update()

Use async_setup_platform() to complete the async connection to core.

listen for EVENT_HOMEASSISTANT_START happens in async_setup()
so it needs to be async_listen.

But listen for EVENT_HOMEASSISTANT_STOP happens in start_modbus()
which is a sync. function so it continues to be listen().

* modbus: move setup of pymodbus into modbushub

setup of pymodbus is logically connected to the class modbushub,
therefore move it into the class.

Delay construction of pymodbus client until event
EVENT_HOMEASSISTANT_START arrives.

* modbus: use pymodbus async library

convert pymodbus calls to refer to the async library.

Remark: connect() is no longer needed, it is done when constructing
the client. There are also automatic reconnect.

* modbus: use async update for read/write

Use async functions for read/write from pymodbus.

change thread.Lock() to asyncio.Lock()

* Modbus: patch for slow tcp equipment

When connecting, via Modbus-TCP, so some equipment (like the
huawei sun2000 inverter), they need time to prepare the protocol.

Solution is to add a asyncio.sleep(x) after the connect() and before
sending the first message.

Add optional parameter "delay" to Modbus configuration.
Default is 0, which means do not execute asyncio.sleep().

* Modbus: silence pylint false positive

pylint does not accept that a class construction __new__
can return a tuple.

* Modbus: move constants to const.py

Create const.py with constants only used in
the modbus integration.

Duplicate entries are removed, but NOT any entry that would
lead to a configuration change.

Some entries were the same but with different names, in this
case renaming is done.

Also correct the tests.

* Modbus: move connection error handling to ModbusHub

Connection error handling depends on the hub, not the
entity, therefore it is logical to have the handling in
ModbusHub.

All pymodbus call are added to 2 generic functions (read/write)
in order not to duplicate the error handling code.

Added property "available" to signal if the hub is connected.

* Modbus: CI cleanup

Solve CI problems.

* Modbus: remove close of client

close() no longer exist in the pymodbus library, use
del client instead.

* Modbus: correct review comments

Adjust code based on review comments.

* Modbus: remove twister dependency

Pymodbus in asyncio mode do not use twister but still throws a
warning if twister is not installed, this warning goes into
homeassistant.log and can thus cause confusion among users.

However installing twister just to avoid the warning is not
the best solution, therefore removing dependency on twister.

* Modbus: review, remove comments.

remove commented out code.
2020-03-29 12:39:30 -05:00
David F. Mulcahey 188ca630de
Miscellaneous ZHA code cleanup (#33395)
* cleanup state change listener

* update group id handling and unique id

* update test

* add guards for last_seen updates
2020-03-29 13:26:48 -04:00
jjlawren ffafcf27a8
plexwebsocket bump 0.0.7 to fix ignored tests (#33398)
* Bump plexwebsocket to 0.0.7

* Remove unnecessary test ignores
2020-03-29 12:14:42 -04:00
tiagofreire-pt 21098bc3e5
Upgrade broadlink to 0.13.0 (#33240)
* Upgrading the broadlink library version to 0.13.0

As stated here: https://pypi.org/project/broadlink/

* Update requirements_test_all.txt

* Update requirements_all.txt

* Delete requirements_test_all.txt

* Revert "Delete requirements_test_all.txt"

This reverts commit 008f6f2030.

* Revert "Revert "Delete requirements_test_all.txt""

This reverts commit 73e22fd0ff.

* Revert "Revert "Revert "Delete requirements_test_all.txt"""

This reverts commit 7662119c89.
2020-03-29 13:03:46 +02:00