Commit Graph

1560 Commits

Author SHA1 Message Date
Joakim Sørensen caf0bdd5b9
Add config flow to uptimerobot (#53938) 2021-08-04 22:20:03 +02:00
Aidan Timson 18f4d125c3
System Bridge v2.3.0+ - Data from WebSocket (#53443)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-02 22:11:26 +02:00
Martin Hjelmare 007ecc51e5
Revert "Add Automate Pulse Hub v2 support (#39501)" (#53704) 2021-07-29 11:58:48 -07:00
Jan Bouwhuis 781015fb19
Xiaomi_Miio Humidifier rework (#52366)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-28 10:52:43 +02:00
Kuzj d0b9d82287
Refactor bme280, add SPI support (#48775)
* bme280 refactoring, add SPI support

* isort, requirements

* __init_.py add to .coveragerc

* Re-run CI jobs

* const.py to .coveragerc

* Add support for IoT class in manifest

* Keepalive

* review suggestions

* scan_interval with coordinator

* black, isort

* coordinator review suggestions

* Set device_class

* review suggestions

* review suggestions

* review suggestions

* review suggestions

* review suggestions

* review suggestions

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

* add bme280spi to commented requirements

* run script.gen_requirements_all

* black

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-27 16:29:43 -04:00
Ron Klinkien 3488053648
Remove garmin_connect integration (#52808)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 21:49:49 +02:00
gjong 9f495fd200
Add initial version for the YouLess integration (#41942)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 17:42:15 +02:00
Jesse Hills 18bf0762b5
Add select entities to ESPHome (#53526)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-07-27 11:45:04 +02:00
G Johansson f0d5ae2fec
Add yale_smart_alarm config flow and coordinator (#50850)
* config flow and coordinator

* comply with pylint

* Remove pylint errors

* Update test coverage yale smart alarm

* Update test config_flow

* Fix test already configured

* Second try test already configured

* Fixes config flow and tests

* Conform pylint errors coordinator

* Fix various review remarks

* Correct entity unique id

* Fix unique id and migrate entries

* Remove lock code

* Remove code from test

* Expand code coverage config flow test

* Add more constants

* Add test new requirements

* Minor corrections

* Resolve conflict alarm schema

* Change logger

* Changed from review

* Fix isort error

* Fix flake error

* Ignore mypy errors

* Corrections from PR review no 2

* Corrections from PR review no 3

* Added tests and fix pylint error

* Corrections from PR review no 4

* Corrections from PR review no 5

* Corrections from PR review no 6

* Corrections from PR review no 6_2

* Corrections from PR review no 7

* Corrections from PR review no 8

* Minor last changes for PR

* Update homeassistant/components/yale_smart_alarm/coordinator.py

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-07-24 13:55:43 -04:00
sillyfrog d3e77e00e1
Add Automate Pulse Hub v2 support (#39501)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Sillyfrog <sillyfrog@users.noreply.github.com>
2021-07-22 14:40:33 +02:00
Rami Mosleh 1a450c2084
Speedtestdotnet code cleanup and type hints (#52533) 2021-07-22 12:25:54 +02:00
Robert Hillis a1df3519db
Use entity class attributes for Bsblan (#53165) 2021-07-21 19:37:12 +02:00
Robert Hillis 462db1b4b2
Add config flow to nfandroidtv (#51280)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-21 13:31:54 +02:00
Daniel Hjelseth Høyer e9ce3c57cd
Adax heaters (#50998)
Co-authored-by: G Johansson <62932417+gjohansson-ST@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-21 10:25:46 +02:00
Daniel Hjelseth Høyer 8a72e8df79
Convert Mill consumption attributes to sensors (#52311) 2021-07-20 22:41:08 -07:00
Daniel Hjelseth Høyer f0b28c90bf
Co2signal configflow (#53193)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-19 21:30:00 -07:00
RDFurman 450fdc91e4
Add honeywell config flow (#50731)
* Upgrade honeywell from platform to integration

* Add codeowner and run code formatter

* Add sensors for current indoor temp and humidity

* Fix tests and away temp

* Spring cleaning of honeywell tests

* Add config flow to honeywell integration

* Add config flow test

* Tie in honeywell service update

* Simplify config flow and add import

* Remove unnecessary platform schema

* Clean up based on PR comments

* Use new helper method

* Force single device and fix linter errors

* Address PR feedback

* Update translations

* Change string key and remove logger message

* Always add first device

* Fix test assertion

* Put PLATFORM_SCHEMA back

* Skip code coverage check on honeywell init

* add some tests for honeywell

* Make retry async

* Make device private

* Use _attr_ instead of properties

* Code cleanup from PR feedback

* Fix test and cleanup code

* Make description better

Co-authored-by: Matt Zimmerman <mdz@alcor.net>
2021-07-19 09:44:02 -10:00
Shay Levy ea6e325762
Add Switcher config flow discovery support (#52316) 2021-07-19 06:28:40 -07:00
Robert Hillis 7b27725ec1
Cleanup redundant coveragerc entries (#53171) 2021-07-19 12:00:38 +02:00
Robert Hillis 6b97a5ba8e
Fix hisense_aehw4a1 test exclusion (#53084)
* Fix hisense_aehw4a1 test coverage

* add back __init__

* remove from hassfest

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2021-07-18 19:17:36 -05:00
Robert Hillis 284e13464d
Fix home plus control coverage (#53087)
* Fix home_plus_control test coverage

* add back api, switch
2021-07-18 14:56:54 -05:00
Robert Hillis fe22d5a675
Fix home_connect test coverage (#53086)
* Fix home_connect test coverage

* remove from hassfest exclusions
2021-07-18 14:54:43 -05:00
Robert Hillis 7d52c30e36
Revert "Fix google test coverage (#53060)" (#53085)
This reverts commit 4075e83732.
2021-07-16 07:13:34 -04:00
Robert Hillis 4075e83732
Fix google test coverage (#53060) 2021-07-15 20:56:57 -07:00
jan iversen 12ac666459
only allow one active call in each platform. (#52823) 2021-07-13 21:45:42 +02:00
Robert Hillis 3d419d1e8a
Fix flume converagerc (#52975) 2021-07-13 19:32:55 +02:00
Shulyaka e9948100a7
Add generic hygrostat integration (#36759)
* generic_hygrostat: new integration
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-07-13 13:25:29 +02:00
J. Nick Koston e6ea9f4708
Fix nexia thermostats humidify without dehumidify support (#52758) 2021-07-12 21:39:51 +02:00
jan iversen 2ecfd74fa4
Add more data_types to modbus (#52423)
* Add more data_types.

* Use new struct when writing temperature.
2021-07-12 07:58:45 +02:00
jan iversen fe1f7ba316
Add check for _client existence in modbus (#52719) 2021-07-08 11:58:51 +02:00
J. Nick Koston e1e3f68d0b
Revert nmap_tracker to 2021.6 version (#52573)
* Revert nmap_tracker to 2021.6 version

- Its unlikely we will be able to solve #52565 before release

* hassfest
2021-07-06 18:28:23 +02:00
Aaron Bach 5ce4de7bbb
Migrate AirVisual `air_quality` platform to `sensor` platform (#52349)
* Migrate AirVisual air_quality platform sensors

* Remove redundancy

* Cleanup

* Properly set available

* Unwind config_entry -> entry name change

* More unwinding

* Rename

* Update homeassistant/components/airvisual/sensor.py

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

* Code review

* Linting

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-04 12:16:06 -06:00
Simone Chemelli 69b9a9c4ee
Merge fritzbox_netmonitor integration into fritz (#52264)
* Merge netmonitor integration

* cleanup additional files

* Use attrs instead of properties

* Add state_class to relevant sensors

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* mypy fix + small cleanup

* Round, GB and icons

* Update homeassistant/components/fritz/sensor.py

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

* remove state_class from no-reset counters

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-03 16:26:43 +03:00
Robert Hillis 5cd4471c67
Add sensor platform to goalzero (#49835)
* Add sensor platform to goalzero

* Tweak

* Remove unused DATA_SCHEMA

* Simplify

* Remove last_reset

* Update on reload
2021-07-02 17:43:37 +02:00
Simone Chemelli 7959225fef
Add switch platform to Fritz (#51610)
* Add switch platform to Fritz

* Fix tests

* Pylint

* Small fix

* Bump fritzprofiles to fix log level and identifier

* Fix different WiFi networks with same name

* Changed exposed attributes

* Moved to extra_state

* Remove redundant lambda

* Add missing wait

* Removed identifiers

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Add mapping dict

* Device Profile disabled by default

* Heavy cleanup

* Tweak

* Bug fix

* Update homeassistant/components/fritz/switch.py

Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>

* Fix port forward switching + small log improvement

* Cleanup from old approach

* Handle port mapping hot removal (from device)

* Minor fixes

* Typying

* Removed lambda call

* Last missing strict typing

* Split get entities

* Func rename

* Move FritzBoxBaseSwitch to switch.py

* Removed lambda

* Update homeassistant/components/fritz/common.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/common.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fixes after applying comments

* Remvoed redundant try block

* Removed broad-except

* Optimized async/sync switch

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Address remaining comments

* Optimize return list

* More optimization for return lists

* Some missing strict typing

* Redundant typing

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Wrong if

* Introduce const for profile status

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/fritz/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix mypy

* Switch back to get_local_ip()

* Address latest comments

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>
2021-06-29 11:57:34 -04:00
Jesse Hills e1797ea670
Add number entities to ESPHome (#52241)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-29 14:33:04 +02:00
Adrián Moreno a639cb7ba7
Add sensor platform to Meteoclimatic integration (#51467)
* Add meteoclimatic sensor platform

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Add sensor.py to coverage file

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Add explicit return type None

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Fix sample station code

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Apply frenck suggestions

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Remove extra attributes

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Revert translations

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Remove None icons and classes

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>
2021-06-29 13:52:39 +02:00
Milan Meulemans 6f41168616
Change DiffuserRoomSize number entity to select entity (#51993)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-28 20:20:32 +02:00
Andre Lengwenus f2fe6c26ab
Add tests for LCN integration setup (#48070) 2021-06-28 18:08:09 +02:00
Tom Brien fd1d110b80
Add config flow for Coinbase (#45354)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-28 16:38:12 +02:00
J. Nick Koston 583626a74f
Convert nmap_tracker to be a config flow (#50429) 2021-06-28 12:49:14 +02:00
Shay Levy 5795e76826
Migrate Switcher entity attributes to sensors (#51964)
* Migrate attributes to sensors

Migrate attributes to sensors

* Fix pylint

* Apply suggestions from code review

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

* Add typing imports

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-22 18:28:09 +02:00
Artem Draft db61a773fd
Add remote control platform to BraviaTV (#50845) 2021-06-17 12:33:44 +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
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
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 d021e593d3
Add Ambee integration (#51645) 2021-06-09 13:22:37 +02:00
Milan Meulemans d0a8e27036
Add Rituals number platform (#49723) 2021-06-08 03:28:31 +02:00
J. Nick Koston ccf4b5a265
Move remaining code out of netdisco to eliminate as SSDP dependency (#51588) 2021-06-07 22:12:33 +02:00
Thomas Schamm ffe8b3e49b
Add bosch shc platforms for sensor devices (#50720) 2021-06-03 14:39:42 +02:00