Commit Graph

7843 Commits (84c482441d5669de875598538d2a45af05a40778)

Author SHA1 Message Date
Erik Montnemery dad7a597ae
Add color_mode support to yeelight light (#51973)
* Add color_mode support to yeelight light

* Satisfy pylint

* Address review comment

* Improve test coverage

* Improve test coverage
2021-06-25 17:37:15 +02:00
Maciej Bieniek e6c850136c
Add support for state_class to AccuWeather integration (#51510)
* Add support for state_class

* Use get() method
2021-06-25 10:06:15 +02:00
J. Nick Koston d009f06a55
Handle connection being closed in legacy samsungtv (#52137)
* Handle connection being closed in legacy samsungtv

- Mirror the websocket behavior

Fixes
```
2021-06-24 02:54:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.89_guestroom fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/media_player.py", line 124, in update
    self._state = STATE_ON if self._bridge.is_on() else STATE_OFF
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 113, in is_on
    return self._get_remote() is not None
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 232, in _get_remote
    self._remote = Remote(self.config.copy())
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote.py", line 9, in __init__
    self.remote = RemoteLegacy(config)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 32, in __init__
    self._read_response(True)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 77, in _read_response
    raise exceptions.ConnectionClosed()
samsungctl.exceptions.ConnectionClosed
```

* add coverage

* pass instead
2021-06-25 07:31:44 +02:00
Franck Nijhof f9d65b9196
Add preset support to WLED (#52170) 2021-06-24 23:16:07 +02:00
Maciej Bieniek 0730b375f3
Remove `air_quality` platform from Nettigo Air Monitor integration (#52152)
* Remove air_quality platform

* Clean constants
2021-06-24 22:58:37 +03:00
Franck Nijhof fba7118d44
Add Color Palette Select entities to WLED (#51994)
* Add Color Palette Select entities to WLED

* Update with dev changes, disable by default
2021-06-24 11:25:21 -07:00
J. Nick Koston 5695710463
Add mac address to samsungtv config entry data if missing (#51634)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-24 08:15:16 -10:00
Franck Nijhof 34a317b847
DSMR: Device/state classes, icons, less common disabled by default (#52159) 2021-06-24 18:48:51 +02:00
Erik Montnemery 4533a77597
Add MQTT select (#52120)
* Add MQTT select

* Fix value_template support

* Lint
2021-06-24 17:09:06 +02:00
Erik Montnemery 04c9665241
Filter MQTT JSON attributes (#52076)
* Filter JSON attributes

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Refactor, add tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-06-24 16:22:54 +02:00
Franck Nijhof afa00b7626
DSMR: Remove Gas derivative sensor (#52147) 2021-06-24 14:25:38 +02:00
Martin Hjelmare 0e5040d917
Add zwave_js options flow to reconfigure server (#51840) 2021-06-24 13:15:42 +02:00
Franck Nijhof fbdd6a9d95
DSMR: Typing cleanup in init & config flow (#52145) 2021-06-24 12:53:16 +02:00
Maciej Bieniek ff8b96c65d
Remove YAML configuration import from Sony Bravia TV (#52141) 2021-06-24 11:10:21 +02:00
Rob Bierbooms aa56a21b45
Add config flow step user to dsmr (#50318)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-24 10:16:08 +02:00
Franck Nijhof a67ca08124
Change dynamic segment handling of WLED (#52018) 2021-06-23 23:43:24 +02:00
Paulus Schoutsen cc00617cd5
Allow defining state class for template sensors (#52130) 2021-06-23 14:37:04 -07:00
Martin Hjelmare ed4a3d275a
Fix ezviz options flow test patch (#52125) 2021-06-23 18:19:45 +02:00
Erik Montnemery 2351f2d95e
Warn when receiving message on illegal MQTT discovery topic (#52106)
* Warn when receiving message on illegal MQTT discovery topic

* Fix test
2021-06-23 15:53:17 +02:00
Tobias Sauerwein db5bf8ab23
Bump pyatmo version (#52112)
* Bump pyatmo version

* Update tests
2021-06-23 15:51:27 +02:00
Erik Montnemery 77de233679
Update MQTT number to treat received payload as UTF-8 (#52121)
* Update MQTT number to treat received payload as UTF-8

* Lint
2021-06-23 15:35:18 +02:00
Erik Montnemery 04b425ed89
Use HS color instead of RGB color for Tasmota lights (#52052) 2021-06-22 20:40:59 +02:00
Robert Svensson e22893a206
Make attestation of supported features easier to read (deCONZ test) (#52096)
Make is_deconz_group a constant
2021-06-22 20:34:25 +02:00
Robert Svensson 6814e9607a
Improve deCONZ lights supported_color_modes and tests (#51933)
* Improve deconz lights tests

* Simplify attribute definition

* Bump pydeconz to v80
2021-06-22 19:29:58 +02:00
Maciej Bieniek d08129352f
Bump Nettigo Air Monitor library (#52085) 2021-06-22 15:44:53 +02:00
Erik Montnemery 52c142a82d
Add support for color_mode white to MQTT light basic schema (#51484)
* Add support for color_mode white to MQTT light basic schema

* Add missing abbreviations
2021-06-22 11:59:20 +02:00
Raman Gupta 0eae0cca2b
Move zwave_js migration tests into new module (#52075) 2021-06-21 20:42:03 -04:00
Raman Gupta 8a9a141f3c
Fix zwave_js migration logic (#52070)
* Fix zwave_js migration logic

* revert change to move tests to new module

* Update tests/components/zwave_js/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-21 16:45:47 -04:00
Erik Montnemery b916247e8e
Improve editing of device automation referring non added select entity (#52047)
* Improve editing of device automation referring non added select entity

* Update tests
2021-06-21 14:49:51 +02:00
Brian Towles f29bcf7ff7
Modern Forms light platform (#51857)
* Add light platform to Modern Forms integration

* cleanup setup

* Code review cleanup
2021-06-21 10:09:41 +02:00
Maciej Bieniek 2aed268fb7
Remove `undo_listener` variable in AccuWeather integration (#52032) 2021-06-20 21:40:04 -07:00
jjlawren 7b5ed8faa8
Catch unexpected battery update payloads on Sonos (#52040) 2021-06-20 21:38:07 -07:00
Paulus Schoutsen af8ef634c1
Fix double subscriptions for local push notifications (#52039) 2021-06-20 14:53:21 -07:00
Maciej Bieniek 57106098f9
Fix AccuWeather sensors updates (#52031)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-06-20 14:53:08 -07:00
uvjustin e8b5790846
Clean up stream refactor (#51951)
* Clean up target_duration method

* Consolidate Part creation in one place

* Use BytesIO.read instead of memoryview access

* Change flush() signature
2021-06-20 13:38:02 +08:00
Franck Nijhof 24c1256c2c
Small WLED cleanups (#52014) 2021-06-19 17:13:48 +02:00
Bram Kragten 34a44b9bec
Use entity sources to find related entities in Search (#51966)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-19 13:25:26 +02:00
Aaron Bach 549f779b06
Force SimpliSafe to reauthenticate with a password (#51528) 2021-06-18 16:11:35 -06:00
Franck Nijhof 23222589dd
Add device condition support to Select entity (#51992) 2021-06-18 23:31:08 +02:00
Franck Nijhof 655f797f67
Add Select entity support to Google Assistant (#51997) 2021-06-18 23:30:46 +02:00
Erik Montnemery 0ca199d8d0
Add WS API for listing available statistic ids (#51984)
* Add WS API for listing available statistic ids

* Update homeassistant/components/history/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-06-18 21:32:30 +02:00
Paulus Schoutsen 805ef3f90b
Allow fetching multiple statistics (#51996) 2021-06-18 21:03:13 +02:00
Franck Nijhof 87a43eacb7
Add device action support to Select entity (#51990) 2021-06-18 11:40:29 -07:00
Franck Nijhof 06edc731c5
Add significant change support to select entity (#51978) 2021-06-18 11:31:09 -07:00
Franck Nijhof 98a53188f8
Add reproduce state to select entity (#51977) 2021-06-18 11:30:40 -07:00
Franck Nijhof c1cfbcc4e3
Add device trigger support to Select entity (#51987) 2021-06-18 10:01:32 -07:00
Franck Nijhof 054ca1d7ec
Add Select entity component platform (#51849)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-18 11:51:55 +02:00
Brent Petit c149ecf2cc
Handle disconnected ecobee thermostat in humidifier and remote sensors (#51873) 2021-06-18 09:06:31 +02:00
Raman Gupta 1e18011603
Adjust zwave_js WS API commands for logging (#51096) 2021-06-17 17:19:25 +02:00
jan iversen 08b0ef7a5e
Use test fixture for configuration testing (#51803)
* Autospec mock_modbus and usei for configuration.

* Review comment.
2021-06-17 12:27:05 +02:00
Brent Petit 016ba39dfb
Ecobee logging cleanup (#51754) 2021-06-17 10:59:13 +02:00
jan iversen 3ba90776c0
Add autospec to modbus mock, in order to use getattr (#51813) 2021-06-17 10:57:20 +02:00
Erik Montnemery ee6c77048c
Improve editing of device actions referencing non-added humidifier (#51749) 2021-06-17 10:27:22 +02:00
Eugenio Panadero b7c1df7864
Adopt new electricity tariffs in pvpc hourly pricing (#51789) 2021-06-17 09:03:28 +02:00
jjlawren d4ac5bf048
Bump plexapi to 4.6.1 (#51936) 2021-06-17 09:02:23 +02:00
Franck Nijhof 33e08f38da
Raise bad request when receiving HTTP request from untrusted proxy (#51839)
* Raise bad request when receiving HTTP request from untrusted proxy

* Fix code comment
2021-06-17 04:41:19 +02:00
Raman Gupta a250343c55
Support bitmask as a value (#51892)
* Support bitmask as a value

* Fix value schema and add tests

* fix test

* revert change to value schema
2021-06-16 15:53:45 -04:00
jjlawren 31db3fcb23
Refactor Sonos alarms and favorites into system-level coordinators (#51757)
* Refactor alarms and favorites into household-level coordinators

Create SonosHouseholdCoodinator class for system-level data
Fix polling for both alarms and favorites
Adjust tests

* Fix docstring

* Review cleanup

* Move exception handling up a level, do not save a failed coordinator

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 10:30:05 -05:00
jan iversen 7ad91fdf71
Add swap to climate and change data_count -> count in modbus (#51668) 2021-06-16 12:11:23 +02:00
Eric Severance 61079ab7fa
Support receiving long-press events from WeMo devices (#45503)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 12:00:34 +02:00
Rob Bierbooms ff0c753c87
Bump pyRFXtrx to 0.27.0 (#51911)
* Bump version

* Fix test
2021-06-15 20:34:05 -05:00
uvjustin 6d656dd2ec
Speed up record stream audio test (#51901) 2021-06-15 14:27:53 -04:00
Eric Severance 3488b78365
Add a menu_cursor service to the yamaha component (#44819)
* Add a menu_cursor service to the yamaha component

* Update homeassistant/components/yamaha/media_player.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update service description to new format

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-15 19:17:10 +02:00
RenierM26 22b8dc16c2
Add services to ezviz integration (#48984)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-15 13:23:32 +02:00
Erik Montnemery 59a3e0f4dc
Improve editing of device conditions referencing non-added HVAC (#51832) 2021-06-15 02:23:13 +02:00
starkillerOG 3a2d50fe23
Add Xiaomi Miio EU gateway support (#47955)
* Add EU gateway support

* add options flow translations

* fix options flow

* fix missing import

* try to fix async_add_executor_job

* try to fix async_add_executor_job

* fix unload

* check for login succes

* fix not reloading

* use cloud option

* fix styling

* Return after if

Co-authored-by: Nathan Tilley <nathan@tilley.xyz>

* cleanup

* add options flow tests

* fix new tests

* fix typo in docstring

* add missing blank line

* Use async_on_unload

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_on_unload

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_setup_platforms

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_unload_platforms

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_miio/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_miio/const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* default use_cloud False

* add options flow checks

* fix styling

* fix issort

* add MiCloud check tests

* fix indent

* fix styling

* fix tests

* fix tests

* fix black

* re-write config flow

* add explicit return type

* update strings.json

* black formatting

* fix config flow

Tested the config flow and it is now fully working

* fix styling

* Fix current tests

* Add missing tests

* fix styling

* add re-auth flow

* fix styling

* fix reauth flow

* Add reauth flow test

* use ConfigEntryAuthFailed

* also trigger reauth @ login error

* fix styling

* remove unused import

* fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* remove unessesary .keys()

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* combine async_add_executor_job calls

* remove async_step_model

* fix wrong indent

* fix gatway.py

* fix tests

Co-authored-by: Nathan Tilley <nathan@tilley.xyz>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-15 00:05:40 +02:00
Raman Gupta 8705168fe6
Add zwave_js WS API cmds to get node state and version info (#51396)
* Add zwave_js view to retrieve a node's state

* remove typehints

* Make dump views require admin

* Add version info to node level dump

* Add back typehints

* switch from list to dict

* switch from dump node view to two WS API commands

* switch to snake
2021-06-14 16:43:51 -04:00
Raman Gupta f00f2b4ae4
Add zwave_js ping node service (#51435)
* Add zwave_js ping node service

* uncomment code

* use asyncio.gather
2021-06-14 16:38:35 -04:00
Brian Towles b1fa01e4bc
Cleanup of code reviews from initial modern forms (#51794) 2021-06-14 21:04:02 +02:00
Joakim Sørensen c8755cd896
Migrate the name for the hassio user (#51771) 2021-06-14 09:01:18 -07:00
uvjustin 97e77ab229
Improve type hints in stream (#51837)
* Improve type hints in stream

* Fix import locations

* Add stream to .strict-typing

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-06-14 23:59:25 +08:00
Erik Montnemery a989677bef
Improve editing of device conditions referencing non-added binary sensor (#51831)
* Improve editing of device conditions referencing non-added binary sensor

* Update tests
2021-06-14 15:26:46 +02:00
Erik Montnemery 06fc21e287
Improve editing of device conditions referencing non-added sensor (#51835) 2021-06-14 15:22:31 +02:00
Erik Montnemery 59ef55c34f
Improve editing of device conditions referencing non-added cover (#51833) 2021-06-14 14:34:59 +02:00
Erik Montnemery af05543744
Improve editing of device conditions referencing non-added humidifier (#51834) 2021-06-14 14:12:42 +02:00
Felipe Martins Diel fca79237c3
Create dataclass to mock entry setup in Broadlink tests (#50134) 2021-06-14 13:28:57 +02:00
Erik Montnemery 08af791d4c
Improve editing of device conditions referencing non-added alarm (#51830) 2021-06-14 13:05:27 +02:00
Tom Schneider 7e1fec8ee4
Rewrite of Yamaha musiccast integration (#51561)
* Initial commit for new musiccast integration

* Add zone support

* Get/set volume level

* Remove volume step

* Create custom MusicCastData type

* Create MusicCastDevice

* Fix await

* Add power and mute control

* Implement all basic media_player parts

* Support input switching

* Add duration/position support

* Add advanced tuner functions

* Basic media browser

* Add layer in media browser to see all available list_infos

* Added join/unjoin services and group informations. Known issue: You can not link zone 2 to main at the moment (WIP)

* Many fixes to make multiple zones and grouping work. Next step: implement error handling and remove debugging information

* WIP: Added Multizone Support and allows clients to directly jump from one group to another. Known issue: If a server tries to join a group as client, he has to close his group first. Sometimes the device that was a server previously jumps out of the group directly after joining.

* Updated group management to make it wait for the updated group information before performing the next actions - Timeouts after 1 second, then polls the distribution data. If the data are still not updated, there will be one retry before an Exception is thrown. Extended the state attributes for clients to make them return group details from their servers (leads to inactive group management buttons for the client). Added documentation and restructured the code.

* Make the service handle function name for group specific service calls unique

* Added service descriptions for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset

* Added data entries for alarm specific values and a netusb preset list. Implemented fetching function for clock and netusb presets.

* Registered and implemented services for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset. The set_alarm service works with a special mediaplayer alarm lovelace card, I am currently working on.
The NetUSB Presets are also available using the media browser. Maybe we could also add the Tuner presets in the future for both setting up the alarm and recalling them via service and media browser.

* Removed some debug prints

* Moved MusicCast Integration to the aiomusiccast library. This library supports media browsers with multiple pages. Added ssdp support for the discovery

* Minor fix in the group management and tidied up a bit

* Updated manifest of yamaha musiccast

* Update library

* Minor fix in the media browser. get_distribution_num does not have to be async, so it has been changed. Adjusted the client join function to turn on the client before joining a group - the musiccast app does so, so hopefully this fixes the rare errors when adding a turned off client to a group. Some reformating and by hooks fixed most of the requirements of the hooks. Known exception from this: mypy throws an error for line 116.

* Removed some old out commented code. Fixed some error handling, when the user enters a non reachable or non yamaha host in the manual setup. Fixed linting/styling errors. Implemented tests to bring the coverage for the config flow to 100%.

* Fixed linting/styling errors. Return a DeviceInfo object instead of a dict.

* Fixed linting/styling errors. Added a new error type to the translations.

* In the yamaha API the system_id is equal to the serial number in the DLNA description. Due to that it was possible to configure a device twice, because the serial number from the yamaha API was different. This issue was fixed.

* Updated tests and added a test for adding a device manually, which is already present in the system

* Remove print statements

* Fix sleep timer service call

* Fix yamllint error

* Shrink PR down to just new library + config flow with discovery

* Add __init__.py to .coveragerc

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>

* Implement suggestions from code review

* Improve identifiers and connections, remove event loop parameter

* Add coordinator back

* Better exception handling

* Fix unique id in ssdp step

* Remove abc.ABC from MusicCasteDeviceEntity

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/yamaha_musiccast/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Replace the repeat mode mapping from mc to ha by a generic solution

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add coordinator to the super call of the mediaplayer

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add the coordinator to the init function of the MusicCastEntity

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Pass the coordinator from the MusicCastEntity init function to the CoordinatorEntity init function

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* merged _handle_config_flow into async_step_user

* reformated the exception handling of the user step. In the case that the device already exists, the AbortFlow will be raised.

* Removed model from the config entry. It was neither set nor used anymore.

* Fixed the test for the config flow.

* Use async_write_ha_state instead of schedule_update_ha_state.

* Add default value for the system ID gotten in the user step

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/yamaha_musiccast/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Added a fixture to avoid IO in the test_user_input_device_not_found test

* Use absolute imprt to import data_entry_flow.

* Use local vars for host and serial_number in async_step_user.

* Remove ip_address and zone_id properties.

* Use device id for the unique ID of an entity instead of the macs

* Removed entry_id from the MusicCastEntity init function.

* Updated strings and English translation.

* don't set the coordinator in the mediaplayer init.

* Implemented legacy configuration.yaml support for existing configurations.

* Added tests for the newly added config flow step.

* Use device_id as identifier

* Fix an accidentally relative import

* Fix pylint warnings

* use logger.error instead of logger.exception in the import step.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use CONF_HOST instead of 'host'

* Only support the import from configuration.yaml if no config entries are setup for musiccast. If there are already config entries in HA and none of them is a representation of a config given in configuration.yaml (e.g. config added after the first import), an error will be logged.

* Update homeassistant/components/yamaha_musiccast/media_player.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Readded PLATFORM_SCHEMA for configuration.yaml

* Raise an exception for all services, which are only supported for specific sources.

* Bump aiomusiccast to 0.6 to support asyncio sockets

Co-authored-by: Michael Harbarth <michael.harbarth@gmx.de>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-14 08:58:42 +02:00
blawford 0709aa7c8c
Pass metadata when casting an app (#51148)
* Pass through metadata when casting an app

* Remove passing kwargs to quick_play

Add metadata to the app_data dict.

* Include pass-through of metadata

* Bump pychromecast to 9.2.0

* Add changes to test to verify metadata

* Fix order of imports
2021-06-14 08:48:32 +02:00
J. Nick Koston 75d6ffebc8
Improve error when HomeKit accessory underlying entity is missing (#51713)
* Improve error when HomeKit accessory underlying entity is missing

* docstring in test
2021-06-13 17:27:04 -05:00
uvjustin 123e8f01a1
Refactor stream to create partial segments (#51282) 2021-06-14 00:41:21 +08:00
Erik Montnemery f9e9202e2d
Improve editing of device triggers referencing non-added alarm (#51701) 2021-06-13 00:07:25 +02:00
Erik Montnemery 3a739563b4
Improve editing of device actions referencing non-added alarm (#51747) 2021-06-12 23:43:28 +02:00
Erik Montnemery b8669bf4c1
Improve editing of device actions referencing non-added cover (#51748) 2021-06-12 21:40:32 +02:00
Erik Montnemery 6ab37881c9
Improve editing of device actions referencing non-added lock (#51750) 2021-06-12 21:31:30 +02:00
Franck Nijhof c242e56b8c
Add re-authentication support to Ambee (#51773)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-12 16:18:06 +02:00
Franck Nijhof cfce71d7df
Allow keeping master light in WLED (#51759) 2021-06-12 13:33:23 +02:00
Ron Klinkien f6e0165543
Replace garminconnect_aio with garminconnect_ha (#51730)
* Fixed config_flow for multiple account creation

* Replaced python package to fix multiple accounts

* Replaced python package to fix multiple accounts

* Implemented config entries user

* Config entries user

* Fixed test code config flow

* Fixed patch
2021-06-12 10:05:27 +02:00
Erik Montnemery bf6a412be0
Tweak device action scaffold, fix typo (#51751) 2021-06-11 23:22:18 +02:00
Franck Nijhof b83b82ca7d
WLED WebSocket support - local push updates (#51683)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-06-11 20:55:08 +02:00
Brent Petit 5cc31a98e2
Add Ecobee humidifier device_info and unique_id (#51504)
* Add Ecobee humidifier device_info and unique_id

Ecobee humidifier entity was not connected to the thermostat device.
This change will ensure the entitiy is properly connected.

This change also fills out the ecobee-data.json fixutre data a bit
to address failures in the test setup.

* Add Ecobee humidifier device_info and unique_id

Adjust test fixture data to increase pytest coverage
Clean up indenting in ecobee-data.json

* Add Ecobee humidifier device_info and unique_id

Update exception case in device_info to not
be included in codecov tests. This case has
been tested locally.

* Add Ecobee humidifier device_info and unique_id

Address pylint issue

* Add Ecobee humidifier device_info and unique_id

Remove no cover pragma and add ecobee humidifier.py to
.coveragerc
2021-06-11 17:39:57 +02:00
Erik Montnemery b01b33c304
Add trigger condition (#51710)
* Add trigger condition

* Tweaks, add tests
2021-06-11 15:05:57 +02:00
Ville Skyttä 7d03b02192
Spelling fixes (#51642) 2021-06-11 13:35:03 +02:00
Franck Nijhof b4aeddd12f
Add 100% test coverage to WLED integration (#51743) 2021-06-11 12:45:22 +02:00
jan iversen 2a51587bc3
Remove reverse_order (replaced by generic swap) (#51665)
Remove reverse_order (replaced by generic swap).
2021-06-11 11:41:41 +02:00
Franck Nijhof 7393cba0a5
Mock WLED in all WLED tests (#51724)
* Mock WLED in all WLED tests

* Update tests/components/wled/conftest.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Remove useless AsyncMock

* Add missing asserts

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-06-11 11:36:54 +02:00
Erik Montnemery ba6b527d61
Improve editing of device actions referencing non-added HVAC (#51706)
* Improve editing of device actions referencing non-added HVAC

* Improve test coverage
2021-06-11 11:13:55 +02:00
Maciej Bieniek 0404acddf9
Add support for state_class (#51512) 2021-06-10 21:31:21 +03:00
J. Nick Koston 4722fdf465
Fix race condition in samsungtv turn off (#51716)
- The state would flip flop if the update happened before the TV had fully shutdown
2021-06-10 19:24:30 +02:00
J. Nick Koston ab490bc769
Ensure samsungtv reloads after reauth (#51714)
* Ensure samsungtv reloads after reauth

- Fixes a case of I/O in the event loop

* Ensure config entry is reloaded
2021-06-10 19:23:00 +02:00
Jc2k d75c97cbf3
Revert "Set Fahrenheit reporting precision to tenths for Homekit Controller climate entities (#50415)" (#51698) 2021-06-10 15:41:42 +01:00
Franck Nijhof fca0446ff8
Add pollen sensors to Ambee (#51702) 2021-06-10 14:18:09 +02:00
Erik Montnemery d9110b5208
Improve editing of device triggers referencing non-added binary sensors (#51700) 2021-06-10 13:06:01 +02:00
Erik Montnemery c1bc99890d
Improve editing of device triggers referencing non-added cover (#51703) 2021-06-10 12:46:28 +02:00
Robert Svensson b1022ce84e
Use supported color modes in deCONZ integration (#51656)
* Initial commit everything is working, need to reevaluate tests

* Fix supported color modes and hs_color

* Attest color mode
2021-06-10 08:51:58 +02:00
Franck Nijhof e5c6ac5ba8
Add 100% test coverage to Ambee integration (#51670)
* Add 100% test coverage to Ambee integration

* Add tests for device and entity registry
2021-06-09 20:23:16 +02:00
Franck Nijhof 332c86ff8c
Restructure WLED integration (#51667) 2021-06-09 20:15:46 +02:00
Franck Nijhof a6a34c76f7
Add color mode support to WLED (#51648)
* Add color mode support to WLED

* Update homeassistant/components/wled/light.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/wled/light.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/wled/light.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/wled/light.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* black

* property, property

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-06-09 13:31:31 +02:00
Franck Nijhof d021e593d3
Add Ambee integration (#51645) 2021-06-09 13:22:37 +02:00
Erik Montnemery 87813ea991
Tweak light.valid_supported_color_modes (#51659) 2021-06-09 12:53:08 +02:00
Erik Montnemery 443463e19d
Emulate color_temp for lights which support color or white (#51654)
* Emulate color_temp for lights which support color or white

* Support legacy lights

* Tidy up group.light code

* Improve color_temp to white conversion

* Remove color_temp to white conversion

* Add test

* Tweak deconz test
2021-06-09 11:23:01 +02:00
Erik Montnemery a1e3283f8f
Improve editing of device automations referencing non-added sensors (#51312) 2021-06-08 23:28:08 -07:00
J. Nick Koston d56bd61b93
Populate upnp devices from ssdp (#51221)
* Populate upnp devices from ssdp

* Update tests since data comes in via HASS format now

* pylint
2021-06-08 22:32:06 +02:00
Martin Hjelmare 2eb6f16a94
Fix mysensors awesomeversion strategy usage (#51627)
* Update awesomeversion strategy use in mysensors

* Remove default version
2021-06-08 20:24:54 +02:00
Erik Montnemery 67f3e717a8
Add support for color_mode white to tasmota light (#51608) 2021-06-08 17:43:04 +02:00
Martin Hjelmare 6de604a326
Fix mysensors tests typing (#51621) 2021-06-08 14:28:36 +02:00
Nick Whyte 3fa6c97801
Address late review of nsw fuel station (#51619) 2021-06-08 14:26:43 +02:00
Erik Montnemery a4587b5f3b
Deprecate support for undocumented value_template in MQTT light (#51589) 2021-06-08 08:23:51 +02:00
Brian Towles 01d4140177
Modern Forms integration initial pass - Fan (#51317)
* Modern Forms integration initial pass

* cleanup of typing and nits

* Stripped PR down to Fan only

* Review cleanup

* Set sleep_time to be required for service

* Adjust minimum sleep time to one minute.

* Code review changes

* cleanup icon init a little
2021-06-08 08:22:50 +02:00
Martin Hjelmare 6c2e452e3d
Fix kraken I/O and sleep in tests (#51599) 2021-06-08 03:11:17 +02:00
jjlawren e257dd4d07
Fix Sonos battery sensors on S1 firmware (#51585) 2021-06-08 00:29:17 +02:00
Clifford Roche bc30920824
Correctly support use of Farenheit in Gree Climate component (#50260) 2021-06-08 00:21:03 +02:00
Erik Montnemery 3db21b407a
Add support for color_mode white to demo light (#51575)
* Add support for color_mode white to demo light

* Fix unique_id for newly added light

* Update tests
2021-06-07 20:26:25 +02:00
J. Nick Koston a3146ad150
Fix loop in tod binary sensor (#51491)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-06-07 11:21:10 -07:00
Malte Franken fcb8ab23ab
Improve log message when zone missing in geolocation trigger (#51522)
* log warning message if zone cannot be found

* improve log message

* add test case
2021-06-06 20:03:56 +02:00
Erik Montnemery e560e623e9
Add color_mode white (#51411)
* Add color_mode white

* Include brightness in white parameter

* Reformat

* Improve test coverage
2021-06-06 11:13:18 +02:00
jan iversen 59b5f94569
Add fix delay after send/request to allow RS485 adapter to switch in modbus (#51417) 2021-06-05 14:41:32 +02:00
jan iversen b8afb7dcfe
Check initial connect() worked in modbus (#51470)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-05 14:39:09 +02:00
J. Nick Koston 12ac4109f4
Ensure ssdp can callback messages that do not have an ST (#51436)
* Ensure ssdp can callback messages that do not have an ST

Sonos sends unsolicited messages when the device reboots. We want
to capture these to ensure we can recover the subscriptions as soon
as the device reboots

* Update homeassistant/components/ssdp/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-05 09:23:51 +02:00
J. Nick Koston 0cd0733438
Remove empty tests for ping now that the code in icmplib is used (#51454) 2021-06-05 01:20:41 +03:00
Franck Nijhof 05241a7a68
Allow number/sensor entities in numeric state conditions/triggers (#51439) 2021-06-04 18:14:48 +02:00
jan iversen 5e067c2631
Allow unlimited scan_interval in modbus (#51471)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-04 18:06:44 +02:00
J. Nick Koston c1111afef8
Allow registering a callback to ssdp that matches any key value (#51382) 2021-06-03 08:26:37 -10:00
Raman Gupta ba6a0b5793
Fix no value error for heatit climate entities (#51392) 2021-06-02 21:07:47 -07:00
Jan Bouwhuis 2222a121f4
Add support for fan speed percentage and preset modes to google_assistant integration (#50283)
* support relative fan speeds

* fan preset modes

* improve tests

* Revert relative speed code report zero percentage
2021-06-02 22:09:22 +02:00
definitio 132ee972bd
Add media_player.group (#38855)
* Add media group

* Minor improvements

* Use the async api for all methods

* Improve type hints

* Add missing methods

* Add tests

* Rename HomeAssistantType —> HomeAssistant

* Add more tests

* Fix unknown state

* Make some callbacks

* Add more tests

* Fix unknown state properly

* Fix names for callbacks

* Fix stop service test

* Improve tests
2021-06-02 21:25:15 +02:00
Dermot Duffy c057c9d9ab
Add Hyperion camera feed (#46516)
* Initial Hyperion camera.

* Improve test coverage.

* Minor state fixes.

* Fix type annotation.

* May rebase and updates (mostly typing).

* Updates to use new camera typing improvements.

* Use new support for returning None from async_get_mjpeg_stream .

* Codereview feedback.

* Lint: Use AsyncGenerator from collections.abc .

* Update homeassistant/components/hyperion/camera.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-06-02 09:39:19 -07:00
J. Nick Koston 68714c2067
Update ping to use asyncio function in icmplib (#50808) 2021-06-02 06:10:33 -10:00
Guido Schmitz 3de29a7606
Add binary_sensor tests for devolo Home Control (#49843)
Co-authored-by: Markus Bong <Markus.Bong@devolo.de>
2021-06-02 13:59:35 +02:00
Erik Montnemery 1d9d9021de
Do not attempt to unload non loaded config entries (#51356) 2021-06-02 10:00:24 +02:00
jan iversen 10dccc6734
Move pymodbus test fixtures to test_init (#51244) 2021-06-02 00:00:44 +02:00
Paulus Schoutsen ee2c950716
Merge system options into pref properties (#51347)
* Make system options future proof

* Update tests

* Add types
2021-06-01 22:34:31 +02:00
Franck Nijhof cdd1f6b2f0
Always load middle to handle forwarded proxy data (#51332) 2021-06-01 09:38:55 -07:00
Joakim Sørensen fb281c6bde
Add arch to payload (#51330) 2021-06-01 15:09:23 +02:00
Daniel Rheinbay 3c452f8c9b
Refactor yeelight integration to use only flows (#51255)
* Refactor light.py to use only flows.py, eliminating transitions.py

* Reformat yeelight source code using black
2021-06-01 09:04:49 +02:00
Paulus Schoutsen f472219c68
Set up cloud semi-dependencies at start (#51313) 2021-06-01 01:35:31 +02:00
Paulus Schoutsen 4821484d2c
Add system option to disable polling (#51299) 2021-05-31 15:36:40 -07:00
Ron Klinkien a0b3d0863b
Fix Garmin Connect integration with python-garminconnect-aio (#50865) 2021-05-31 14:38:33 -07:00
Jan Bouwhuis 7403ba1e81
Alexa fan preset_mode support (#50466)
* fan preset_modes

* process preset mode updates from alexa correctly

* add tests

* codecov patch additional tests
2021-05-31 20:58:01 +02:00
J. Nick Koston 0e7c2cddf7
Upgrade HAP-python to 3.5.0 (#51261)
* Upgrade HAP-python to 3.4.2

- Fixes for malformed event sending

- Performance improvements

* Bump

* update tests to point to async
2021-05-31 20:47:12 +02:00
Maciej Bieniek c9178e58b5
Add support for state class for Airly sensor (#51285) 2021-05-31 16:00:58 +02:00
Joakim Sørensen 8ed8747225
Resolve addon repository slug for device registry (#51287)
* Resolve addon repository slug for device registry

* typo

* Adjust onboarding test

* Use /store
2021-05-31 14:06:11 +02:00
Raman Gupta a8650f4e59
Add zwave_js node status sensor (#51181)
* Add zwave_js node status sensor

* fix import

* use parent class name property

* Use more entity class attributes

* Update homeassistant/components/zwave_js/sensor.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* return static values in property method

* fix PR

* switch to class atributes

* create sensor platform task if needed

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-31 08:46:28 +02:00
jjlawren e5309e89ea
Skip processed Sonos alarm updates (#51217)
* Skip processed Sonos alarm updates

* Fix bad conflict merge
2021-05-30 21:03:53 -07:00
J. Nick Koston 32dc62a996
Handle empty ssdp descriptions in the cache (#51253) 2021-05-29 22:50:48 -05:00
uvjustin 3ca7eb9440
Update HLS playlist in stream (#51191)
* Enable gzip encoding for playlist responses
* Add EXT-X-PROGRAM-DATE-TIME to playlist
* Add EXT-X-START to playlist
* Change EXT-X-VERSION from 7 to 6
* Move idle timer call to recv
* Refactor recv to remove cursor and return bool
* Rename STREAM_TIMEOUT to SOURCE_TIMEOUT
2021-05-30 11:41:23 +08:00
astronaut ceadb0cba0
Add gui config option consider device unavailable (#51218)
* Add gui config option consider device unavailable

* Update tests
2021-05-29 19:13:09 -04:00
Erik Montnemery 27b9d7fed0
Fix flaky statistics tests (#51242) 2021-05-29 09:00:36 -05:00
J. Nick Koston c5e5787e1d
Replace sonos discovery thread with ssdp callback registration (#51033)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-05-29 08:31:22 -05:00
jjlawren 84f0d3f961
Centralize Sonos subscription logic (#51172)
* Centralize Sonos subscription logic

* Clean up mocked Sonos Service instances, use subscription callback

* Use existing mocked attributes

* Use event dispatcher dict, move methods together, make update_alarms sync

* Create dispatcher dict once
2021-05-28 21:32:50 -05:00
J. Nick Koston fb50cf9840
Add network and callback support to SSDP (#51019)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-28 21:18:59 -05:00
Nick Whyte 02cbb2025e
Decrease nsw fuel request volume (#49552) 2021-05-28 20:53:20 -05:00
Raman Gupta 19c16e079f
Add separate ozone sensor for climacell (#51182) 2021-05-28 23:24:01 +02:00
Erik Montnemery 39c94e8daa
Fix flaky statistics tests (#51214)
* Fix flaky statistics tests

* Tweak
2021-05-28 22:37:17 +02:00
jan iversen 538a189168
Adjust modbus climate to use address/input_type (#51202) 2021-05-28 17:57:14 +02:00
Brandon Rothweiler 88dce0ec8f
Address late review of Mazda services (#51178)
* Add services for Mazda integration

* Address review comments

* Follow-up review comments

* Update dict access for send_poi service calls
2021-05-28 17:54:19 +02:00
J. Nick Koston b3d826f2e2
Fix samsungtv yaml import without configured name (#51204) 2021-05-28 16:06:17 +02:00
jan iversen 00507539c1
Change Cover to use address/input_type (#51154)
* Change Cover to use address/input_type.

* Flake.
2021-05-28 13:23:44 +02:00
Erik Montnemery b339d73109
Weight sensor average statistics by state durations (#51150)
* Weight sensor average statistics by state durations

* Fix test
2021-05-28 13:16:52 +02:00
jan iversen e45196f9c9
Remove "old" config from modbus binary_sensor (#51117) 2021-05-28 12:06:46 +02:00
jan iversen 5afd16ef5d
Move modbus schema validators to validators.py (#51121) 2021-05-28 11:38:31 +02:00
jan iversen 47f016b340
Remove old config from cover, including tests (#51118)
* Remove old config and standardize new config.

* Add missing safeguard.
2021-05-28 11:29:37 +02:00
uvjustin 6ad29aec2c
Adjust segment duration calculation in stream (#51149)
* Calculate min segment duration internally

* Rename segments to sequences in StreamOutput

* Fix segment duration calculation in test_worker
2021-05-28 13:36:41 +08:00
jjlawren e08de22737
Fix totalconnect test calling public host (#51138) 2021-05-27 21:30:37 -05:00
Raman Gupta ca8d09e5e1
Add zwave_js.multicast_set_value service (#51115)
* Add zwave_js.multicast_set_value service

* comment

* Add test for multiple config entries validation

* additional validation test

* brevity

* wrap schema in vol.Schema

* Update homeassistant/components/zwave_js/services.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* do node transform and multicast validation in schema validation

* move poll value entity validation into schema validation, pass helper functions dev and ent reg instead of retrieving it every time

* make validators nested functions since they don't neeed to be externally accessible

* Update homeassistant/components/zwave_js/services.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove errant ALLOW_EXTRA

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-27 21:57:35 -04:00
Aaron David Schneider f7f8672eea
Add tests for sonos switch platform (#51142)
* add tests

* refactor async_added_to_hass

* fix tests and race condition

* use async_get

* typo
2021-05-27 19:56:59 +02:00
tkdrob c0656878db
Normalize async_setup_entry (#51161) 2021-05-27 15:56:20 +02:00
Eduard van Valkenburg 701c4ee624
Update sia tests (#51151) 2021-05-27 15:35:17 +02:00
René Klomp 65f2fe9c01
Bump pysma version to 0.5.0 (#51098)
* Use new get_sensors method

* Update pysma requirement

* Update primary codeowner

* Update device_info handling

* Fix LEGACY_MAP

* Updated tests

* Fix pysma references

* Fix pylint raise-missing-from

* Better import of Sensors

* Remove software version related changes

* Revert codeowners change
2021-05-27 12:53:14 +02:00
jan iversen 8d365e8bf5
After merge, review. (#51139) 2021-05-27 08:28:31 +02:00
Raman Gupta 877d3e38b4
Fix zwave_js.set_value schema (#51114)
* fix zwave_js.set_value schema

* wrap all schemas in vol.Schema

* readd removed assertions
2021-05-27 00:27:35 -04:00
Joakim Sørensen 3e7729faf2
Handle blank string in location name for mobile app (#51130) 2021-05-27 06:04:05 +02:00
uvjustin 38e0cbe964
Change stream sequence number to start from 0 (#51101)
* Use constants for provider strings

* Add last_sequence property
2021-05-27 11:22:31 +08:00
Yuriy Sannikov 6391d75919
Refactor ModbusRegisterSensor class to get hub and configuration (#50234)
* refactor ModbusRegisterSensor to match the ModbusSwitch interface

* Please pylint, mypy etc.

* Remove PLATFORM.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-26 19:28:14 +02:00
Austin Mroczek 22dd7df66c
Improve totalconnect config flow user experience (#47926) 2021-05-26 09:48:44 -07:00
ollo69 daff62f42d
Add AsusWRT model and firmware information for device (#51102) 2021-05-26 09:46:06 -07:00
Matt Zimmerman ffb9ab21c1
Add binary sensor for smarttub errors (#49364) 2021-05-26 09:25:47 -07:00
J. Nick Koston 64661ee2b7
Add network configuration integration (#50874)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 09:06:30 -07:00
Erik Montnemery 16e90f12ca
Add last_reset property to Tasmota energy sensors (#51107)
* Add last_reset property to Tasmota energy sensors

* Correct device class for energy sensors
2021-05-26 17:58:06 +02:00
Franck Nijhof 19c505c0f0
Add Supervisor discovery to motionEye (#50901)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 17:40:07 +02:00
Raman Gupta 18e6ae8750
Add WS API commands to check for and install zwave_js config updates (#51106) 2021-05-26 08:39:08 -07:00
Raman Gupta 6d9b67ddb2
Add zwave_js heal node and network WS API commands (#51047)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 08:38:02 -07:00
Raman Gupta 8edf7f0407
Don't enforce uniqueness requirements for Waze and Google Travel Time (#50254)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-26 08:32:26 -07:00
Brandon Rothweiler a36935dcee
Add services for Mazda integration (#51016) 2021-05-26 16:36:36 +02:00
Franck Nijhof bf13af34b4
Use entity class vars in WLED (#50975) 2021-05-26 14:08:09 +02:00
Massimiliano Cannarozzo 5a5a145778
Make all MQTT cover payloads optional (#50579)
* Remove unused constant

* Make payload_close optional

* Make payload_open optional

* Compute supported features based on config
2021-05-26 13:50:44 +03:00
Raman Gupta 1de0d20a76
Bump zwave-js-server-python to 0.25.1 (#51097)
* Bump zwave-js-server-python to 0.25.1

* update fixtures
2021-05-26 12:37:24 +02:00
Erik Montnemery 789a14fc44
Add support for last_reset to MQTT sensor (#51036)
* Add support for last_reset to MQTT sensor

* Update abbreviations

* Improve test coverage
2021-05-26 11:50:29 +02:00
Raj Laud b3607343fc
Fix error in Squeezebox DHCP discovery flow (#50771)
* Map data from dhcp to squeezebox discovery flow

* Add tests for squeezebox dhcp discovery
2021-05-26 10:30:15 +02:00
uvjustin c6f108f7c3
Refactor stream to use bytes (#51066)
* Refactor stream to use bytes
2021-05-26 16:19:09 +08:00
Maciej Bieniek 41a940f644
Add state class to Nettigo Air Monitor sensors (#50959) 2021-05-26 09:36:37 +02:00
ollo69 d5a9419fb7
Fix AsusWRT sensor test (#50956)
* Fix AsusWRT sensor test

* Revert use of utcnow

* Add MockDevice class

* Proper initialize static member

* Added mock_device fixture
2021-05-26 09:19:30 +02:00
Raman Gupta 5f7964b54b
Add firmware updates support for zwave_js (#50390)
* Add WS API support for zwave_js firmware updates

* move file to fixture

* review comments

* fix logic and test based on upstream changes

* handle failure scenario

* handle failure scenario

* fix tests and adjust message

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* remove return from firmware upload view because client will raise an exception if not successful

* raise if user is not an admin

* raise bad request exception if firmware command fails

* incorporate #50923

* Add test for failed command

* add event name to messages

* change error to not found

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-26 02:57:00 -04:00
Erik Montnemery 154c849eac
Filter unsupported parameters from light service calls (#51084)
* Filter unsupported parameters from light service calls

* Silence pylint

* Fix deconz tests

* Fix mqtt tests

* Fix scene tests

* Fix trådfri emulated CT

* Fix mqtt tests
2021-05-26 08:02:59 +02:00
J. Nick Koston deb9135707
Handle clamped fan maxValue in homekit_controller (#51088) 2021-05-25 16:06:17 -05:00
Nathan Spencer 9ec0b0a8da
Fix for invalid value error when using UI editor for Litter-Robot's set_wait_time service (#50269) 2021-05-25 20:15:37 +02:00
jjlawren fe75a1bb9d
Set Fahrenheit reporting precision to tenths for Homekit Controller climate entities (#50415) 2021-05-25 19:32:59 +02:00
jjlawren 1e86818f85
Add battery support for Sonos S1 speakers (#50864) 2021-05-25 18:39:31 +02:00
Matt Zimmerman aa18ad2abf
Add service to snooze SmartTub reminders (#51012)
* Add service to snooze SmartTub reminders

* minimum is 10 days

* 0->10 in services.yaml as well

* Update homeassistant/components/smarttub/services.yaml

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/smarttub/services.yaml

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-25 18:37:00 +02:00
Aaron David Schneider 9bf6ea60db
Add Sonos alarm to sonos component (#50719)
* add sonos_alarm

* bug fix for _update_device

* fix pylint and black and co

* small bug fix in speaker.available_alarms

* cleanup and add _LOGGER.debug statements, fix pylint

* fix pylint

* _alarm_id to alarm_id

* fixed rare bug due to raceconditions

* Part 2 of raceconditionfix

* address review suggestions

* readd check for not yet subscribed

* - platforms_ready fix
- add alarmClock to pytest mock

* fixture for ListAlarms

* cleanup mock and match UUID for test

* add simple tests for sonos_alarm

* extend test for attributes

* typhint fix

* typo

* use get_alarms() directly

* refactor available_alarms

* fix attributes

* some cleanup

* change logic of fetch_alarms_for_speaker and rename to update_alarms_for_speaker

* update_alarms_for_speaker is now a method

* Update homeassistant/components/sonos/switch.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Update homeassistant/components/sonos/speaker.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-05-25 11:32:25 -05:00
Paul Bottein fb61ef500c
Add TV channel trait to google assistant (#49676) 2021-05-25 09:12:42 -07:00
Erik Montnemery d2804433d3
Select onoff and brightness color modes last for light groups (#51054) 2021-05-25 08:49:24 -07:00
Raman Gupta c0234df136
Remove device_registry fixture from zwave_js tests (#51072) 2021-05-25 08:48:21 -07:00
Raman Gupta 4875035ff8
Add zwave_js WS API commands for node ping and metadata (#51049) 2021-05-25 17:37:12 +02:00
Bram Kragten 26563e3ea4
Add statistics websocket endpoint (#51044)
Co-authored-by: Erik <erik@montnemery.com>
2021-05-25 08:03:37 -07:00
Andrey Kupreychik cbe4df1893
SSDP Discovery for NDMS2 routers (#47312)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-25 15:36:03 +02:00
Martin Hjelmare 9319fc6263
Update zwave_js stored add-on options (#51063)
* Update zwave_js entry data if add-on data changed

* Fix tests

* Add test
2021-05-25 08:37:34 -04:00
Martin Hjelmare bdb8cdf717
Fix zwave_js None color value (#50926) 2021-05-25 13:40:22 +02:00
Philip Allgaier d8ff52e55b
Add support for custom themes to use dark mode (#46532) 2021-05-25 13:26:24 +02:00
Adrián Moreno fe34f42aa5
Add new Meteoclimatic integration (#36906)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 13:11:48 +02:00
Franck Nijhof c5383219f1
Remove stale debug statements from tests (#51059) 2021-05-25 11:52:20 +02:00
Xuefer 2a47805b4a
Close onvif device cleanly (#49659)
* onvif: close device cleanly

Signed-off-by: Xuefer <xuefer@gmail.com>

* onvif: Too many nested blocks

Signed-off-by: Xuefer <xuefer@gmail.com>

* update tests to cover onvif config_flow

Signed-off-by: Xuefer <xuefer@gmail.com>
2021-05-24 15:27:40 -04:00
Maciej Bieniek 12e2c59a4c
Improve typing in DuneHD integration (#51025)
* Improve typing

* One more typing fix

* Run hassfest

* Fix test

* Fix return from constructor

* Add missing Final

* Improve long string format

* Use bool for mute

* Remove unnecessary str type

* Fix host type

* Add missing Final

* Increase test coverage

* Suggested change

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-05-24 20:09:57 +01:00
Raman Gupta ebf6e3d985
Add zwave_js WS API commands to replace and remove failed nodes (#51018)
* Add zwave_js WS API commands to replace and remove failed nodes

* no need to manually add node to driver in test
2021-05-24 13:11:09 -04:00
Simone Chemelli 987e8ed5ed
Add consider_home option to Fritz device_tracker (#50741)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-24 09:54:57 -05:00
Nash Kaminski 2ae91bf0ea
Correct humidifier detection in venstar component and add tests (#50439)
As of version 0.14, the venstar_colortouch lib always initializes hum_setpoint to None. When a thermostat actually reports a humidifier state, this value is replaced with the integer value of the setpoint. This changeset corrects the humidifier detection as well as adds basic test cases for the Venstar component.
2021-05-24 16:41:37 +02:00
jan iversen c74e65ac2d
Streamline modbus test_init (#50990)
* Streamline test_init.

* Review comments.

* Remove hub name.
2021-05-24 14:53:54 +02:00
jan iversen 1546dbbf25
Add restore temperature to modbus climate (#50963)
* Add restore temperature to climate.

* please mypy.

* Review 2.
2021-05-24 14:03:44 +02:00
jacekpaszkowski 85495c08b0
Add support for effects, transition/brightness parameters to template light, min_mireds and max_mireds templates (#43850)
* Add support for effects, transition/brightness parameters to template light, min_mireds and max_mireds templates

* code fixes

* min_mireds, max_mireds fixes

* test fixes

* more fixes

* format fix

* style fix

* _update_effect_list change

* style fix

* Fixes after review

* additional fixes

* duplicated lines removed

* fixes after CI run

* test fixes

* code and test fixes

* supports transition change, added test cases
2021-05-24 13:31:57 +02:00
hesselonline c497c0eadd
Add wallbox integration (#48082)
* Wallbox component added

* resolved mergeconflicts from upstream

* fixed an incorrect removal in CODEOWNERS file

* fixes for pullrequest automatic test

* clean up code after PR tests

* fixed strings.json

* fix config_flow error > wallbox

* fixed some formatting issues

* fix pylint warnings

* fixed error in number.py > set value

* pylint warnings fixed

* some more pylint fixes

* isort fixes

* fix unused_import pylint

* remove tests

* remove test requirements

* config flow test

* test errors resolved

* test file formatting

* isort on test file

* sensor test

* isort on test

* isort test const

* remove not working sensor test

* remove test const

* add switch, number and lock test

* docstrings for test classes

* sort test_number, create test_sensor

* additional tests

* fix test error

* reduced PR to 1 component

* newline in const

* ignore test coverage -> dependency on external device (wallbox)

* do not ignore config_flow

* add test for validate_input

* remove obsolete import

* additional test config flow

* change test sensor

* docstring

* add additional test for exceptions

* fix test_config

* more tests

* fix test_config_flow

* fixed http error test

* catch connectionerror and introduce testing for this error

* remove .coveragefile

* change comment

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen (format only)

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Processed review comments, include more testing for sensor component

* Isolated the async_add_executor_job to make the solution more async

* add a config flow test

* Revert "add a config flow test"

This reverts commit 9c1af82fff.

* Revert "Isolated the async_add_executor_job to make the solution more async"

This reverts commit 0bf034c331.

* Make component more async and add config flow tests

* Changes based on review comments

* made _ methods in WallboxHub for the 'non-async' call to the API and try-catch. Stored the wallbox in the class.

* moved the coordinator to __init__ and pass it as part of the WallboxHub class

* removed obsolete function in __init__

* removed CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL

* fixed spelling and imports on test files

* did isort on component files

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-05-24 13:08:24 +02:00
jan iversen be13a73db8
Allow manual scan and add delay in switch verify. (#50974) 2021-05-24 12:59:55 +02:00
Erik Montnemery 2583e4bdc9
Add support for RGBW color to blebox light (#49562) 2021-05-24 12:24:07 +02:00
Michael 51c8b1eb0b
Improve code quality of TCP platform (#51000)
* Improve code placements

* Fix entity inheritance

* fix tests

* Improve PLATFORM_SCHEMA handling

* Apply suggestions
2021-05-24 11:03:43 +01:00
Erik Montnemery 870c61a622
Add color_mode support to MQTT light with basic schema (#50464)
* Add color_mode support to MQTT light with basic schema

* Update abbreviations

* Silence pylint

* Improve test coverage

* Apply suggestions from code review
2021-05-24 11:37:02 +02:00
Eduard van Valkenburg 0bba0f07ac
Add SIA Alarm systems (#36625)
* initial commit of SIA integration

* translations

* moved reactions to file, typed everything

* fixed no-else-return 3 times

* refactored config and fix coverage of test

* fix requirements_test

* elimated another platform

* forgot some mentions of sensor

* updated config flow steps, fixed restore and small edits

* fixed pylint

* updated config_flow with better schema, small fixes from review

* final comment and small legibility enhancements

* small fix for pylint

* fixed init

* fixes for botched rebase

* fixed port string

* updated common strings

* rebuild component with eventbus

* fixed pylint and tests

* updates based on review by @bdraco

* updates based on new version of package and reviews

* small updates with latest package

* added raise from

* deleted async_setup from test

* fixed tests

* removed unused code from addititional account step

* fixed typo in strings

* clarification and update to update_data func

* added iot_class to manifest

* fixed entity and unique id setup

* small fix in tests

* improved unique_id semantics and load/unload functions

* added typing in order to fix mypy

* further fixes for typing

* final fixes for mypy

* adding None return types

* fix hub DR identifier

* rebased, added DeviceInfo

* rewrite to clean up and make it easier to read

* replaced functions with format for id and name

* renamed tracker remover small fix in state.setter

* improved readibility of state.setter

* no more state.setter and small updates

* mypy fix

* fixed and improved config flow

* added fixtures to test and other cleaner test code

* removed timeband from config, will reintro in a options flow

* removed timeband from tests

* added options flow for zones and timestamps

* removed type ignore

* replaced mapping with collections.abc
2021-05-24 08:48:28 +02:00
HighOnMikey c1a1a38ffc
Improve legacy support for Hunter Douglas PowerView (#50918)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-23 12:47:19 -05:00
jan iversen f55213d8b1
Update modbus cover to 100% coverage (#50996) 2021-05-23 10:18:35 -05:00
J. Nick Koston 4b0b0f5db7
Allow user to override insecure setup codes and pair with homekit_controller (#50986)
* Allow user to override invalid setup codes and pair with homekit_controller

* adjust from manual testing

* invalid -> insecure
2021-05-23 10:15:38 -05:00
Matt Zimmerman 87438dd401
Add services to SmartTub for changing filtration settings (#46980)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-23 09:00:24 -05:00
J. Nick Koston e1b6385b4d
Add support for doorbell buttons to homekit_controller (#50983) 2021-05-23 08:56:16 -05:00
jjlawren 29205a9239
Sonos use common firmware version (#50861) 2021-05-23 08:43:49 -05:00
Joakim Sørensen 7ff14b47a8
Use whoami for location lookup (#50934) 2021-05-22 20:34:48 -07:00
Shay Levy c7ada1e8f6
Fix flaky Shelly config flow test (#50982) 2021-05-23 02:11:02 +03:00
J. Nick Koston 45897b59f2
Turn on samsungtv with wakeonlan (#50964)
If we have the mac address from discovery, we can use it to wake
the TV.  Currently the TV goes unavailable when you turn it off
as the only way to turn it back on is wake on lan or via the remote.

Users who are not using host networking can use a script instead.
2021-05-22 15:33:37 -05:00
Franck Nijhof e64b5afa58
Typing improvements for Sentry (#50787)
* Typing improvements for Sentry

* Fix event tags access

* Fix tests
2021-05-22 19:09:19 +02:00
Simone Chemelli b9a0fb93eb
Add samsungtv dhcp and zeroconf discovery (#48022)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-22 10:41:18 -05:00
PeteBa aa9b99713c
Add purge_entities service call to recorder (#48069) 2021-05-22 10:30:05 -05:00
jan iversen 59ae78e5f0
Add restore_state to modbus binary_sensor (#50922)
* Add restore_state to binary_sensor.

* Update return value in State.
2021-05-22 13:38:05 +02:00
Raman Gupta 92d1871de5
Fix flaky vizio test and add comments to explain logic (#50948) 2021-05-22 08:57:30 +02:00
Ruslan Sayfutdinov 42ff687c32
Add missing type hints to websocket_api (#50915) 2021-05-21 09:39:18 -07:00