Commit Graph

1259 Commits (f8de0594b9fe568fe331b32509f547f98d6f67e0)

Author SHA1 Message Date
Pascal Vizeli 9e44d1af19
Revert "Add transport data from maps.yandex.ru api (#26252)" (#26762)
This reverts commit 9e2cd5116a.
2019-09-20 15:55:43 +02:00
Askarov Rishat 9e2cd5116a Add transport data from maps.yandex.ru api (#26252)
* adding feature obtaining Moscow transport data from maps.yandex.ru api

* extracting the YandexMapsRequester to pypi

* fix code review comments

* fix stop_name, state in datetime, logger formating

* fix comments

* add docstring to init

* rename, because it works not only Moscow, but many another big cities in Russia

* fix comments

* Try to solve relative view in sensor timestamp

* back to isoformat

* add tests, update external library version

* flake8 and black tests for sensor.py

* fix manifest.json

* update tests, migrate to pytest, async, Using MockDependency

* move json to tests/fixtures

* script/lint fixes

* fix comments

* removing check_filter function

* fix typo
2019-09-19 23:41:44 +02:00
Penny Wood b68b8430a4 Izone component (#24550)
* iZone component

* Rename constants to const.

* Changes as per code review.

* Stop listening if discovery times out.

* Unload properly

* Changes as per code review

* Climate 1.0

* Use dispatcher instead of listener

* Free air settings

* Test case for config flow.

* Changes as per code review

* Fix error on shutdown

* Changes as per code review

* Lint fix

* Black formatting

* Black on test

* Fix test

* Lint fix

* Formatting

* Updated requirements

* Remaining patches

* Per code r/v
2019-09-19 23:31:54 +02:00
jjlawren 2d12bac0e2 Add Plex config flow support (#26548)
* Add config flow support

* Log error on failed connection

* Review comments

* Unused errors

* Move form to step

* Use instance var instead of passing argument

* Only share servers created by component

* Return errors early to avoid try:else

* Separate debug for validation vs setup

* Unnecessary

* Unnecessary checks

* Combine import flows, move logic to component

* Use config entry discovery handler

* Temporary lint fix

* Filter out servers already configured

* Remove manual config flow

* Skip discovery if a config exists

* Swap conditional to reduce indenting

* Only discover when no configs created or creating

* Un-nest function

* Proper async use

* Move legacy file import to discovery

* Fix, bad else

* Separate validate step

* Unused without manual setup step

* Async oops

* First attempt at tests

* Test cleanup

* Full test coverage for config_flow, enable tests

* Lint

* Fix lint vs black

* Add test init

* Add test package requirement

* Actually run script

* Use 'not None' convention

* Group exceptions by result

* Improve logic, add new error and test

* Test cleanup

* Add more asserts
2019-09-19 23:29:26 +02:00
chriscla 57833f5b1e Refactor nzbget to support future platform changes (#26462)
* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Use pynzbgetapi instead of raw HTTP requests

* Using pynzbgetapi

* Pinning pynzbgetapi version.

* Requiring pynzbgetapi 0.2.0

* Addressing review comments

* Refreshing requirements (adding pynzbgetapi)

* Remove period from logging message

* Updating requirements file

* Add nzbget init to .coveragerc

* Adding nzbget codeowner

* Updating codeowners file
2019-09-15 02:44:19 +02:00
Florent Thoumie a71cd6e90e Add iaqualink binary sensor and unique_id (#26616)
* Add binary_platform to iaqualink integration, add unique_id

* Revert Mixin changes, move self.dev to AqualinkEntity

* Style fixes
2019-09-14 07:05:47 +02:00
Zach 1eef758ecc Add support for DOODS Image Processing (#26208)
* Add support for doods

* Move connection to external module

* Fix for CI

* Another update for CI

* Reformatted via black

* Updated linting stuff

* Updated per code review

* Removed none check for something with a default

* Updated config parsing

* Updated if statements, need to disable lint check

* Fixed formatting and bug that should make linter happy

* Fixed one more issue with box drawing for areas

* removed extra imports

* Reworked per suggestion

* Changed output to debug for informational detection message
2019-09-11 22:51:05 +02:00
Daniel Shokouhi 2b30f47f4b Add Obihai integration (#26537)
* Add Obihai integration

* Lint

* Lint and bump library for multiple ports fix

* Review comments

* Review comments

* Correct errors

* Review comments

* Review comments
2019-09-11 19:26:50 +02:00
Florent Thoumie 1a73e6b44e Add switch platform to iaqualink integration (#26545)
* Add switch platform to iaqualink component

* Remove unnecessary call to constructor
2019-09-11 19:24:41 +02:00
Pascal Vizeli f3fa073045
Bump UPC connect / fix auth issue (#26570)
* Bump UPC connect / fix auth issue

* Fix lint

* Fix platform schema

* Fix config value

* Address comment / add session cleanup

* Fix device handling
2019-09-11 13:17:07 +02:00
Florent Thoumie a7830bc2d2 Add sensor platform to iaqualink component (#26544)
* Add sensor platform to iaqualink component

* Remove unnecessary icon, fix case where value is 0
2019-09-10 22:01:12 +02:00
indykoning a4fd991ab5 Add growatt server integration (#25635)
* Added growatt server integration

* Ran black formatter

* Processed feedback.

* Made attributes more readable.

* Create a sensor for each property.

* Added unique_ids

* Accidentally flipped functions

* Added dynamic device classes.

* Fixed stale session.
2019-09-09 23:47:44 +02:00
Florent Thoumie 3c629db096 Add light platform to iaqualink integration (#26484)
* Add light platform to iaqualink component.

* Style changes.

* Polling moved to timer in the component
2019-09-09 23:10:25 +02:00
Maikel Punie 28beebac61 Enable SolarEdge config entries (#26282)
* Initial commit for the solaredge configflow

* rerun the hassfest script

* Adding testcases

* Rerun hassfest, problem with black?

* Requirements for the tests

* Remove CONF_MONITORED_CONDITIONS from configuration.yaml

* Remove the options flow strings

* Resolve some comments

* Comments

* More comments

* Move the config from the sensor platform to the component itself

* More comments

* More comments

* Added solaredge __init__

* Added more test to increase coverage
2019-09-08 21:49:20 +02:00
Kevin McCormack 0983367abe Add vivotek camera component (#26071)
* Add vivotek camera component

* Update vivotek camera compontent

Use async request to enable/disable motion detection

* Update Vivotek camera

- Use HTTPS
- Use IP address for still and stream

* Update vivotek component

- Add brand and model properties
- Add state property
- Use attribute to save motion detection status

* Add vivotek camera to .coveragerc

* Update vivotek camera

Fix lint errors

* Update vivotek camera

Remove unused method

* Update Vivotek integration to use libpyvivotek

Use libpyvivotek instead of directly making HTTPS API calls.

* Update Vivotek component

Address code review.

- Remove unused code
- Replace async methods with synchronous methods
- Update docstrings

* Linter fixes for Vivotek component

* Update Vivotek camera component

- Add SSL option
- Remove authentication options as only basic authentication
  is currently working

* Update Vivotek camera component

- Make frame rate configurable
- Require username and password

* Remove unused constants in Vivotek component

* Update Vivotek camera integration

- Use libpyvivotek v0.2.1 with better response parsing
- Use add_entities instead of async_add_entities

* Update Vivotek camera component

- Build camera and stream source ouside VivotekCam
- Remove unnecessary _stream_source attribute

* Update Vivotek camera component

- Move brand to constant
- Move _supported_features to property

* Update Vivotek camera compontent to remove unused property
2019-09-08 21:36:48 +02:00
Florent Thoumie 0abb2f3eb8 Add new integration for Jandy iAqualink pool control (#26034)
* Import new iaqualink component with climate platform.

* Style and unittest changes, fix async_step_import.

* Reorder imports.

* Fix stale doctstrings and add unittest.
2019-09-06 22:21:56 +02:00
Hans Oischinger a72d9da9f4 Add Viessmann ViCare Climate platform (#26151)
* Add Viessmann ViCare Climate platform

* Add water_heater and fix review comments
Update to latest PyVicare (0.1.0)

* Move PyVicare API creation to component

* More review fixes

* Return false if api creation fails

* Fix logging format

* Update PyVicare 0.1.1 to fix json issues

* Formatting fixes
2019-09-06 22:09:03 +02:00
jjlawren 2cd845fb25 Standardize Plex server connections (#26444)
* Common connection class

* Omit tests for new Plex files

* Oops

* Add missing properties

* Remove redundant log message

* Stopgap to avoid duplicate setups

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Not needed with previous setup check

* Remove username/password support

* Reduce log level

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Don't do setup in __init__

* Oops

* Committing too fast...

* Connect after init

* Catch update exceptions like media_player

* Pass in validated PlexServer instance

* Remove unnecessary check

* Counter should be unknown on init

* Remove servername config option
2019-09-05 19:50:26 +02:00
Pierre 6acfede512 Add atome sensor platform (#26197)
* Atome sensor platform - provides live data from Linky energy meters with Atome device from Total/Direct energie

* Proper requirements, added code ownership

* Do not cover atome component

* Proper PEP8 import, proper use of const, added missing docstring etc

* Proper PEP8 import, proper use of const, added missing docstring etc

* Integrate recommendations from MartinHjelmare

* Init shall remain as clean as possible, we don't want side effect

* Add daily,weekly,monthly,yearly sensors. Now depends on pyatome 0.1

* Requirements regenerated for atome component

* Refactored the way we update sensors

* Removed some un-necessary returns and unused variable
2019-09-04 20:20:20 +02:00
Quentame b4058b5c7f Add config flow to linky (#26076)
* Linky: setup ConfigFlow

* async_track_time_interval

* Review from @MartinHjelmare 1

* Review from @MartinHjelmare 2

* Review from @MartinHjelmare 3

* Review from @MartinHjelmare 4

* black --fast homeassistant tests

* Bump pylinky to 0.4.0 and add error user feedback

* Fix .coveragerc

* Linky platform moved to integration in config.yml and with multiple accounts

* Remove useless logs

* Review from @MartinHjelmare 5

* Add config flow tests

* Add config flow tests : login + fetch on failed
2019-09-04 07:04:26 +02:00
Alexander 330ae0d885 Add support Slide cover (#25913)
* Add support GoSlide cover

* Fixed Parameters differ from overridden
Fixed Removed other pylint warnings

* Renamed GoSlide to Slide, because of Innovation in Motion rebranding

* Fixed codeowners file

* Fixed requirements file

* Removed pylint: disable=unused-argument
Removed DOMAIN not exist check
Changed if to min/max
Changed 3rd party import to top of the module
Removed timeout/retry parameters
Removed unused constants
Added check for discovery_info is none
Changed pass slide object instead of full hass object
Changed pass api object instead of full hass object
Added unique_id functionality
Removed entity_id/name properties
Removed supported_features/state functions

* Fixed unused variables

* Changed Slide API uses snake names
Changed Improved exception handling
Changed Updated Slide API to 0.50.0

* Changed moved exceptions into goslide-api
Changed retry setup into coroutine

* Changed str(err) to err
Changed invert if result to if not result
2019-09-03 10:09:25 -07:00
Aleix Murtra 1617c2cd64 Add BeeWi SmartClim BLE sensors (#26174)
* Add BeeWi SmartClim BLE temperature and humidity sensor

* Update missing CODEOWNERS and .coveragerc files

* Updated requirements file

* Update documentation

* Fixed requested changes and decoupled IO library

* Add unique_id property

* Improve unique_id
2019-09-01 18:05:46 +02:00
Jeff Irion 789ad38c38 Bump androidtv to 0.0.25 and add tests (#26202)
* Add tests for androidtv

* Test that the error and reconnection attempts are logged correctly.

> "Handles device/service unavailable. Log a warning once when
> unavailable, log once when reconnected."

https://developers.home-assistant.io/docs/en/integration_quality_scale_index.html

* Clarify comment

* Add test for when the ADB shell command returns None

* Bump androidtv to 0.0.25
2019-08-29 12:03:03 +02:00
Maikel Punie 33bd9c83fb Enable cert_expiry config entries (#25624)
* Enable cert_expiry config entries

* add black

* lint fixes

* Rerun black

* Black on json files is a bad idea

* Work on comments

* Forgot the lint

* More comment work

* Correctly set defaults

* More comments

* Add codeowner

* Fix black

* More comments implemented

* Removed the catch

* Add helper.py from cert_expiry to .coveragerc
2019-08-28 19:35:09 +02:00
Joakim Sørensen d96edea6e2 Remove the googlehome integration (#26035) 2019-08-20 10:54:54 -07:00
Tomas Kislan eee2b2d543 Add Minio component (#23567)
* Add minio implementation

* Static check changes

* Added docstrings

* Update docstrings

* Update docstrings

* Fix linter errors

* Finally fix all docstring errors

* Create services.yaml

* Update CODEOWNERS

* Final changes

* Remove double underscores

* Minor changes

* Update config.yml

* Review changes

* Added tests

* Fix lint errors

* Move tests from unittest to pytest

* Add minio as test requirement

* Update test_minio_helper.py

* Better event thread handling, added hass test

* Update tests

* Fixed lint errors

* Update test_minio.py

* Review changes

* More review changes

* Removed tests

* Applied code style changes

* Reformat test code
2019-08-20 11:56:11 +02:00
Philipp Danner 75e18d4282 Add Keba charging station/wallbox as component (#24484)
* Add Keba charging station wallbox component

* Added start/stop commands (ena 0 and ena 1)

* added refresh_interval parameter and fixed authorization

* fixed max line length

* deactivate failsafe mode if not set in configuration

* extracted I/O code to pypi library

* updated services.yaml

* pinned version of requirements

* fixed typos, indent and comments

* simplified sensor generation, fixed unique_id and name of sensors

* cleaned up data extraction

* flake8 fixes

* added fast polling, fixed unique_id, code cleanup

* updated requirements

* fixed pylint

* integrated code styling suggestions

* fixed pylint

* code style changes according to suggestions and pylint fixes

* formatted with black

* clarefied variables

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* fixed behaviour if no charging station was found

* fix pylint

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-19 14:29:26 +02:00
Joakim Sørensen ef8bc78c53 Remove the ruter integration (#26041) 2019-08-18 10:55:19 +02:00
Abílio Costa a64dccc80b edp_redy: remove component (#25971)
The service has moved to a new portal and the previous API does not work
anymore.
2019-08-15 15:53:12 -07:00
Jeff Irion 68ee828674 Move Kodi services from 'media_player' domain to 'kodi' (#25753)
* Create const.py

* Register services to 'kodi' domain, not 'media_player'

* Add const.py to .coveragerc

* 'DATA_KODI' -> 'DOMAIN'

* Move the Kodi services descriptions to the Kodi component

* Register Kodi services in __init__.py

* Finish registering Kodi services in __init__.py

* Remove logging statement intended only for testing

* Combine homeassistant.const imports

* Add __init__.py to .coveragerc
2019-08-10 14:31:04 -07:00
Robert Dunmire III 4bcef25486 Add Mikrotik hub and rework device tracker (#25664)
* Add const.py for Mikrotik hub

* Add Mikrotik hub component

* Rework device tracker to use hub

* Fix validation errors

* Fix line spacing

* Bump librouteros version to 2.3.0

* Bump librouteros version to 2.3.0

* Used black code formatter

* Fix validation errors

* Fix errors

* Fix errors

* Renamed MikrotikAPI to MikrotikClient

* Fix method

* Fix device_tracker and rename ssl to use_ssl

* Moved device tracker functions into device tracker

* Fix missing constants

* Fix device tracker host_name

* Fix errors

* Fix device tracker typo

* Adding device tracker attributes

* Change attributes order

* Change attributes order

* Add one more attribute

* Reformat black

* Exclude Mikrotik modules

* Remove async calls

* Remove unused import

* Adding scan interval to device tracker

* Fix errors and update code

* Fix error

* Fix missing period

* Update device tracker to use setup_scanner

* Fix hass.data HOSTS

* Fix errors

* Fix errors

* Fixes and updates

* Fixing and reworking

* Fixes

* Fix constant INFO

* get_hostname fix and return value
2019-08-08 13:58:13 +02:00
Sébastien RAMAGE 5b02555255 Add zigate support to zha (#25552)
* Add zigpy-zigate support
* update requirements
* fix
* update
* fix flake8
* update requirements
* fix
* update
* add test to make codecov happy
* fix flake8
* Try to add test
* add test
* remove unneeded test
* exclude registries.py from coverage
exclude homeassistant/components/zha/core/registries.py  since untestable

* Fix merge: black formatting and flake8.
2019-08-05 18:05:07 -04:00
Tom 9f3e388b04 Add Plugwise component (#25533)
* Added Plugwise component

* pylint fixes

* Additional pylints (local tox not noticing these)

* Changes according to review

* CI flake8 correction

* Applying Black

* Review changes, without exception and schema

* Review changes, exception improvement

* Review changes, exception correctio and schema cleanup

* Further cleaning as per review

* Removed blank line

* Add debugging to API init

* Add debugging to API init without dot
2019-08-01 22:22:57 +02:00
ktnrg45 2e300aec5a Add PS4 tests for media player (#25415)
* Add tests for media_player

* remove ps4/media_player.py

* Add unsubscribe method to unload

* Add_to_hass instead of add_to_manager

* Use hass.states for states

* Fix assertions

* fix tests

* Add schedule update

* Remove entity assertions
2019-07-29 09:38:17 -04:00
Maikel Punie 1f9f201571 Enable velbus config entries (#25308)
* Initial work on config_flow

* Finish config flow

* Pylint checks, make sure the import only happens once

* Added support for unloading, small fixes

* Check in the hassfest output files

* Flake8 fixes

* pylint mistake after flake8 fixes

* Work on comments

* Abort the import if it is already imported

* More comments resolved

* Added testcases for velbus config flow

* Fix pylint and flake8

* Added connection test to the config flow

* More sugestions

* renamed the abort reason

* excluded all but the config_flow.py from the velbus component in coveragerc

* Rewrote testcases with a patched version of _test_connection

* Docstyle fixes

* Updated the velbus testcases

* just yield

* flake8 fixes
2019-07-29 09:21:26 +02:00
Bram Goolaerts 0fc2813177 Add De Lijn (Flemish Public Transport) component (#24265)
* Initial commit of De Lijn (Flemish Public Transport) component

* Code corrections as per HA dev's requests

* changes to variable naming, setting attribution and states, plus some smaller optimizations

* Overlooked some linting issues, these are now fixed

* Updated pydelijn version requirement to 0.5.1 so UTC timestamps can be used instead of relative/local times.
Removed unused definition

* Updated pydelijn version requirement to 0.5.1 in requirements_all.txt

* Update the self._attributes dict directly instead of replacing it
Assign ATTRIBUTION while creating the _attributes dict
Remove the ATTRIBUTION assignment in device_state_attributes as it's updated in the async_update now.

* Linting issue (lenght of 2 lines) solved

* Removed a relative time attribute
Updated a linting issue in the LOGGER (used % instead of the format)
2019-07-26 16:41:02 +02:00
Kim Frellsen f5d0f36caf Add new device tracker supporting Fortinet FortiGate (#23078)
* Create device_tracker.py

initial version

* Update device_tracker.py

set verify SSL to false as default. Normally users do not have a verified certificate at home

* Update device_tracker.py

pep8 compliant

* Update device_tracker.py

upgraded fortiosapi requirements

* Create __init__.py

* tox compliant

* Update device_tracker.py

* Create manifest.json

* Update .coveragerc

added fortios

* Update device_tracker.py

circle ci, blank line required

* Update manifest.json

removed code owners

* Update manifest.json

removed dependencies

* Update manifest.json

removed codeowners

* Update requirements_all.txt

added fortios

* Update requirements_all.txt

* Update device_tracker.py

pylint corrections

* Update device_tracker.py

pylint exceptions

* Update device_tracker.py

disable pylint broad exceptions

* Update device_tracker.py

pylint

* Update device_tracker.py

removed pointless string statements

* Update device_tracker.py

removed blank line

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update manifest.json

added codeowners

* Update CODEOWNERS

added kimfrellsen as codeowner

* fortiosapi 0.10.8

Updated to use latest version of fortiosapi 0.10.8

* Update requirements_all.txt

updated fortiosapi to 0.10.8

* Update device_tracker.py

fixed some requests.

* Update device_tracker.py

better exception handling.

* Update device_tracker.py

exception handling

* Update CODEOWNERS

* Update device_tracker.py

corrected exception handling

* Update device_tracker.py

exception handling.

* Update device_tracker.py

lint corrections

* Update device_tracker.py

removed broad exception.

* Update device_tracker.py

fix lint errors

* Update device_tracker.py

minor changes, mostly cosmetic
2019-07-24 01:18:58 +02:00
Farid 4fb1937f65 Suez water (#23844)
* Add suez water sensor

* flake8 test

* pylint test

* edition to fix flake8 and pylint issues

* edition to be okay with the musts

* Added a blank line to __init.py__ for flake8

* added blank line for flake8

* changer scan interval from 10 to 720 minutes

* use of pysuez

* bug fix and isort

* use of pysuez

* fixed flake8 and pylint errors

* update requirements_all.txt

* added a method to test login/password befire adding device

* flake8 edition

* update requirements_all.txt

* add of .coveragerc file with untested files

* update of .coveragerc

* Update homeassistant/components/suez_water/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* bug fix in check credentials

* flake8 and pylint fixes

* fix codeowner

* update requirements_all.txt

* Sorted suez_water line

* edition to answer comments from @MartinHjelmare on #23844

* Attribute keys formatting to lowercase snakecase, name and icon constants returned directly, and remove of  attribute. Update of .

* pylint edition

* correction wrong keys in client attributes

* remove of unnedeed return and move add_entities
2019-07-24 01:14:41 +02:00
Sören 4c067ecff7 Add Elgato Avea integration (#24281)
* Adds Elgato Avea integration

* Revert "Adds Elgato Avea integration"

This reverts commit 8607a685eb.

* Adds Elgato Avea integration

* Removed debug

* Improved readability

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Adds Elgato Avea integration

* Fixes for flake8

* More Fixes for flake8

* Hopefully last fixes for flake8

* Unnecessary rounding and typo removed

* Duplicate calls removed

* raise PlatformNotReady if communication with bulb failes

* Fixes: flake8, missing import of exception and better handling of ble problems

* Update requirements_all.txt

Add requirements_all.txt file

* Revert "Update requirements_all.txt"

This reverts commit 2856025ed3.

* Update requirements_all.txt

* conform with snake_case naming style

https://circleci.com/gh/home-assistant/home-assistant/31823

* Fixed variable rename

* Unnecessary calculation removed

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Better Exception Handling

* Changed position of import, renamed add_entities to add_devices, remove unnecessary comment

* Unnecessary comments removed.
2019-07-24 01:02:00 +02:00
Joe Trabulsy a8ec826ef7 Add Support for VeSync Devices - Outlets and Switches (#24953)
* Change dependency to pyvesync-v2 for vesync switch

* async vesync component

* FInish data_entry_flow

* Update config flow

* strings.json

* Minor fix

* Syntax fix

* Minor Fixs

* UI Fix

* Minor Correct

* Debug lines

* fix device dictionaries

* Light switch fix

* Cleanup

* pylint fixes

* Hassfest and setup scripts

* Flake8 fixes

* Add vesync light platform

* Fix typo

* Update Devices Service

* Fix update devices service

* Add initial test

* Add Config Flow Tests

* Remove Extra Platforms

* Fix requirements

* Update pypi package

* Add login to config_flow

Avoid setting up component if login credentials are invalid

* Fix variable import

* Update config_flow.py

* Update config_flow.py

* Put VS object into hass.data instead of config entry

* Update __init__.py

* Handle Login Error

* Fix invalid login error

* Fix typo

* Remove line

* PEP fixes

* Fix change requests

* Fix typo

* Update __init__.py

* Update switch.py

* Flake8 fix

* Update test requirements

* Fix permission

* Address change requests

* Address change requests

* Fix device discovery indent, add MockConfigEntry

* Fix vesynclightswitch classs

* Remove active time attribute

* Remove time_zone, grammar check
2019-07-23 23:40:55 +02:00
Greg 3fd138bbdd Add support for Rainforest Eagle-200 (#24919)
* Add support for Rainforest Eagle-200

* Removed direct access selector to monitored conditions

* Refactored code to use throttle on the update function

* Fixed issue in new code to use only one EagleReader instance

* Resolve comments

* Resolved comments

* Resolved comments and added Debug statement

* Added return statements

* Fixed typo

* Resolved comments and added debug statements

* Moved get_status method into Data object and decorated it with @staticmethod

* Resolved comments
2019-07-18 23:37:26 +02:00
Thomas Le Gentil 3d3dd05789 Add Fortigate integration (#24908)
* Add Fortigate integration

* added feedback changes

* removed the only case

* fixed a description

* removed the CONFIG_PLATFORM

* deleted README

* added return from setup

* added return from setup

* fixed reviews

* Link updated

* Rename var and a couple of other minor changes

* Typos
2019-07-16 11:15:59 +02:00
ktnrg45 99c6c60bec PS4 Add tests for init (#25161)
* Add some tests for init

* Remove init

* Add config entry version

* Use const for version

* Remove var
2019-07-15 08:47:47 -07:00
Franck Nijhof 9d4b5ee58d Add Twente Milieu integration (#25129)
* Adds Twente Milieu integration

* Addresses flake8 warnings

* Adds required test deps

* Fixes path typo in coveragerc

* dispatcher_send -> async_dispatcher_send

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Removes not needed __init__

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Remove explicitly setting None default value on get call

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Correct typo in comment

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Clean storage for only the unloaded entry

Signed-off-by: Franck Nijhof <frenck@addons.community>

* asyncio.wait on updating all integrations

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Use string formatting

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Set a more sane SCAN_INTERVAL

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small refactor around services

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small styling correction

* Extract update logic into own function

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Addresses flake8 warnings
2019-07-14 12:30:23 +02:00
Austin Mroczek 369e6a3905 Move totalconnect from platform to component config (#24427)
* Move totalconnect component toward being a multi-platform integration.  Bump total_connect_client to 0.28.

* add missing total-connect alarm state mappings

* Made recommended changes of MartinHjelmare at
https://github.com/home-assistant/home-assistant/pull/24427

* Update __init__.py

* Updates per MartinHjelmare comments

* flake8/pydocstyle fixes

* removed . at end of log message

* added blank line between logging and voluptuous

* more fixes
2019-07-14 09:24:40 +02:00
Wim Haanstra f25f44a75b Rename RitAssist to FleetGO (#25093) 2019-07-12 16:14:58 +02:00
Aaron Bach 69cc6affd5 Add support for recording history to Apache Kafka (#25085)
* Add support for Apache Kafka

* Simplified

* Revert "Simplified"

This reverts commit fde4624e07.

* Revert "Revert "Simplified""

This reverts commit 5ae57e64c2.

* Completed

* Updated requirements

* Updated .coveragerc

* Removed unused import

* Updated codeowner
2019-07-12 13:13:51 +02:00
Aaron Bach 9ccb85d959
Add support for World Wide Lightning Location Network (#25001)
* Add support for World Wide Lightning Location Network

* Updated .coveragerc

* Added test

* Updated requirements

* Fixed tests

* Use local time for nearest strike

* Base geo location in place

* Finished geolocation work

* Fixed tests

* Cleanup

* Removed no-longer-needed method

* Updated requirements

* Add support for window and attrs

* Add strike ID to entity name

* Member comments
2019-07-10 16:40:11 -06:00
Aaron Bach c2e843cbc3 Add support for Notion Home Monitoring (#24634)
* Add support for Notion Home Monitoring

* Updated coverage

* Removed auto-generated translations

* Stale docstrings

* Corrected hardware version

* Fixed binary sensor representation

* Cleanup and update protection

* Updated log message

* Cleaned up is_on

* Updated docstring

* Modified which data is updated during async_update

* Added more checks during update

* More cleanup

* Fixed unhandled exception

* Owner-requested changes (round 1)

* Fixed incorrect scan interval retrieval

* Ugh

* Removed unnecessary import

* Simplified everything via dict lookups

* Ensure bridges are properly registered

* Fixed tests

* Added catch for invalid credentials

* Ensure bridge ID is updated as necessary

* Updated method name

* Simplified bridge update

* Add support for updating bridge via_device_id

* Device update guard clause

* Removed excess whitespace

* Whitespace

* Owner comments

* Member comments
2019-07-09 10:29:06 +02:00
Joakim Plate ab832cda71 Add support for arcam fmj receivers (#24621)
* Add arcam_fmj support

* Just use use state in player avoid direct client access

* Avoid leaking exceptions on invalid data

* Fix return value for volume in case of 0

* Mark component as having no coverage

* Add new requirement

* Add myself as maintainer

* Correct linting errors

* Use async_create_task instead of async_add_job

* Use new style string format instead of concat

* Don't call init of base class without init

* Annotate callbacks with @callback

Otherwise they won't be called in loop

* Reduce log level to debug

* Use async_timeout instead of wait_for

* Bump to version of arcam_fmj supporting 3.5

* Fix extra spaces

* Drop somewhat flaky unique_id

* Un-blackify ident to satisy pylint

* Un-blackify ident to satisy pylint

* Move default name calculation to config validation

* Add test folder

* Drop unused code

* Add tests for config flow import
2019-07-08 17:14:19 +02:00
Dave T 6e24b52a7e Add support for aurora ABB Powerone solar photovoltaic inverter (#24809)
* Add support for aurora ABB Powerone solar photovoltaic inverter

* Add support for aurora ABB Powerone solar photovoltaic inverter

* Update stale docstring

* Fixed whitespace lint errors

* Remove test code

* Delete README.md

Website documentation contains setup instructions.  README not needed here.

* Only close the serial line once.

* Correct newlines between imports

* Change add_devices to add_entites and remove unnecessary logging.

* Use new style string formatting instead of concatenation

* Directly access variables rather than via config.get

* Update sensor.py
2019-07-07 11:22:21 +02:00
Niels Mündler 333e1d6789 Fronius (solar energy and inverter) component (#22316)
* Introduced fronius component that adds ability to track Fronius devices from Home Assistant

* Use device parameter for fetching inverter data

* Fixed handling of default scope

* Handle exceptions from yield

* Fulfill PR requirements

* Fixed houndci violations

* Found the last hound violation

* Fixed docstring (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776934)

* Fixed import order with isort (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776957)

* CONF_DEVICE is now CONF_DEVICEID (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777161)

* Added docstring to class FroniusSensor (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777792)

* Fixed docstring for state (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777885)

* Added/fixed docstrings (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778108 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778125)

* Remove redundant log entry (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779213)

* Fixed error message if sensor update fails (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779435)

* Fixed error log messages (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779751 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779761)

* Satisfy hound

* Handle exceptions explicit (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940902)

* Removed unnecessary call of update (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940894)

* The point makes the difference.

* Removed unrelated requirements

* Remove config logging (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968748)

* Reorder and fix imports (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968725, https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968691)

* Update fronius requirement

* Various small fixes

* Small fixes

* Formatting

* Add fronius to coverage

* New structure and formatting

* Add manifest.json

* Fix data loading

* Make pylint happy

* Fix issues

* Fix parse_attributes

* Fix docstring and platform schema

* Make use of default HA-Const config values

* Change configuration setup, introducing list of monitored conditions

* Change the structure slightly, allowing for a list of sensors

* Remove periods from logging

* Formatting

* Change name generation, use variable instead of string

* small fixes

* Update sensor.py

* Incorporate correction proposals

* Setting default device inside validation

* Move import on top and small format

* Formatting fix

* Rename validation method to _device_id_validator
2019-06-28 20:48:52 -07:00
Andre Richter 236820d093 Add integration for Vallox Ventilation Units (#24660)
* Add integration for Vallox Ventilation Units.

* Address review comments #1

* Address review comments #2

* Replace IOError with OSError.

* Bump to fixed version of vallox_websocket_api.
2019-06-25 11:38:24 +02:00
endor 98ba529ead Add Trafikverket train component (#23470)
* Added Trafikverket train component

* Updated manifest with proper name and codeowner

* Updated requirements and manifest

* Updated CODEOWNERS

* Corrected requirements

* Added trafikverket_train/sensor.py to .coveragerc

* Added error handling and log if API call fails

* Corrected styles, removed dev log, improved validation

* Method calls to async_update(), improved error handling

* Minor cleanup/reorg for effeciency

* Added station cache and corrected to fit standards

* Simplified trainstop id  and cleaned up dict.get

* Corrected mistake after change from dict to array

* Change device class to timestamp
2019-06-24 10:38:50 +02:00
Rodrigo Pérez d468d0f71b Vlc telnet (#24290)
* Vlc telnet first commit

First functional version, remains to add more functionality.

* New functions added and bugfixes

* Compliance with dev checklist

* Compliance with dev checklist

* Compliance with pydocstyle

* Removed unused import

* Fixed wrong reference for exception

* Module renamed

* Fixed module rename in other

* Fixed wrong reference for exception


Module renamed


Fixed module rename in other

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Suggestions by @OttoWinter

+Manage error when the VLC dissapears to show status unavailable.

* Removed error log, instead set unavailable state

* Changes suggested by @pvizeli

-Import location
-Use of constants

* Implemented available method

* Improved available method
2019-06-21 11:13:47 +02:00
majuss 14752baf27 Added ELV PCA 301 smart emeter switch (#23300)
* added pca

* removed req from py

* try to fix codeowners

* redo req

* ran codeowners

* processed comments

* fix style

* fix style

* fix style

* Set availalbe to False when communication fails.
2019-06-19 15:41:43 -07:00
Johan Nenzén 266b3bc714 Adds integration for Plaato Airlock (#23727)
* Adds integration for Plaato Airlock

* Updates codeowners and coveragerc

* Fixes lint errors

* Fixers lint check error

* Removed sv translation file

* Adds en translation file

* Sets config flow to true in manifest

* Moves config flow and domain to seperate files

* Fixes lint errors

* Runs hassfest to regenerate config_flows.py

* Adds should poll property and fixes for loop

* Only log a warning when webhook data was broken

* Fixes static test failure

* Moves state update from async_update to state prop

* Unsubscribes the dispatch signal listener

* Update sensor.py
2019-06-17 20:23:59 -07:00
GoNzCiD ddeb6b6baa Battery attribute & accuracy filter (#24277)
* Extract const to a const file, Add battery as tracker attribute, add accuracy filter option

* Update homeassistant/components/traccar/device_tracker.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/traccar/device_tracker.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/traccar/device_tracker.py

Use [] syntax for keys that are in the validated data.

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Fix indentation
2019-06-17 07:44:11 +02:00
tetienne 0a7919a279 Somfy open api (#19548)
* CREATE Somfy component

* CREATE cover Somfy platform

* USE somfy id as unique id

* UPDATE all the devices in one call to limit the number of call

* FIX Don't load devices if not yet configured

* IMP Replace configurator by a simple notification

* ADD log in case state does not match

* IMP wording

* REMOVE debug stuf

* ADD support for tilt position

* UPDATE requirements

* FIX Use code instead of authorization response

 - Will allow to setup Somfy without https

* HANDLE stateless devices (Somfy RTS)

* FIX import locally 3rd party library

* UPDATE pymfy to 0.4.3

* ADD missing docstring

* FIX For Somfy 100 means closed and 0 opened

* FIX position can be None

* ENHANCE error management when error 500 occurs at setup

* FIX indent

* ROLLBACK tilt modification

 - See https://community.home-assistant.io/t/somfy-tahoma-official-api/61448/90?u=tetienne

* FIX Look for capability instead of state

* DON'T use exception to test if a feature is available

* UPDATE dependency

* ADD device_info property

* AVOID object creation in each method

* REMOVE unused constants

* ADD missing doc

* IMP Only make one call to add_entities

* USE dict[key] instead of get method

* IMP Don't pass hass object to the entities

* FIX Don't end logging messages with period

* USE config entries instead of a cache file

* IMPLEMENT async_unload_entry

* CONSOLIDATE package

 - see home-assistant/architecture#124

* UPDATE to pymfy 0.5.1

* SIMPLIFY config flow

* ADD French translation

* FIX 80 vs 79 max length

* ABORT flow asap

* FIX A tupple was returned

* MIGRATE to manifest.json

* ADD a placeholder async_setup_platform coroutine

 - It's currently required and expected by the platform helper.

* FIX codeowner

* ADD missing translations file

* USE new external step

* UPGRADE pymfy version

* Close Somfy tab automatically

* ADD manufacturer

  - Somfy only for the moment.

* HANDLE missing code or state in Somfy request

* REMOVE unused strings

* DECLARE somfy component to use config_flow

* APPLY static check remarks

* FIX async method cannot be called from sync context

* FIX only unload what has been loaded during entry setup

* DON't catch them all

* DON'T log full stacktrace

* ABORT conflig flow if configuration missing

* OMIT Somfy files for coverage

* ADD tests about Somfy config flow

* ADD pymfy to the test dependencies
2019-06-11 08:45:34 -07:00
Phil Bruckner 1c1363875c Life360 integration (#24227) 2019-06-06 16:07:15 -07:00
z0p 6cd9667364 Support for Salda Smarty XV/XP Ventilation Unit (#21491)
* Support for Salda Smarty XV/XP Ventilation Unit

* Update binary_sensor.py

* Update fan.py

* Update sensor.py

* Update __init__.py
2019-06-06 15:23:00 -07:00
cpopp 1bca313421 Add Streamlabs Water Monitor (#21205)
* Add Streamlabs Water Monitor

* Fail Streamlabswater component setup when given invalid parameters

The Streamlabs Water component is unable to recover if it is given
an invalid API key or location id so this change is to ensure
we validate they are correct during setup and return a failure
if they are not.

* Prime Streamlabswater component sensors so data is available immediately

The sensors for the component were not causing an immediate load of
data from the API when being set up so there was some lag after
startup before values would show up.  This change does an explicit
update when the sensors are setup to ensure data is viewable
immediately after startup.

* Switch Streamlabswater logging to use %s for string formatting

* Update Streamlabswater component with correct dependencies

Dependencies were incorrectly specified using DEPENDS rather
than DEPENDENCIES

* Streamlabswater pull request feedback

Remove detailed class docstrings since they're in the documentation,
reduce code duplication in sensor classes, and remove periods from
the end of log messages.

* Reduce line length in Streamlabswater sensor

* Add docstring on Streamlabswater service callback method

* Get rid of unnecessary initializers in Streamlabswater sensor

* Add manifest file for Streamlabs Water Monitor

* Remove unused REQUIREMENTS
2019-06-06 13:55:08 -07:00
Дубовик Максим 984d41e334 Google Cloud Platform component (TTS) (#23629)
* Added Google Cloud TTS service component feature

* Added Neutral voice gender

* Added line break at the end of files

* Updated CODEOWNERS, reqirements_all.txt and .coveragerc

* Fixed some ci/circleci: static-check errors

* Fixed some ci/circleci: static-check error

* Fixed some ci/circleci: pylint errors

* Fixed some ci/circleci: pylint errors

* * made supported_options const
* fixed direct env variable access

* Fixed import order

* * Component renamed
* Added encoding parameter
* Other fixes

* Changed folder name in .coveragerc

* * Removed whitespaces in blank lines
* Split long line

* Removed whitespaces in blank lines

* ci/circleci: static-check

* Fixed requirements_all.txt

* Added speed, pitch and gain parameters

* Added speed, pitch and gain as supported options

* Split too long line

* * Added profiles parameter
* Changed supported languages and encodings values
* Added parameters validations

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Changed options validation

* Added ToggleEntity save and restore state mechanism

* Revert "Added ToggleEntity save and restore state mechanism"

This reverts commit 0e275014
2019-06-06 12:45:29 -07:00
michaeldavie fcfbdd2d89 Add Environment Canada weather, sensor, and camera platforms (#21110)
* Added Environment Canada weather platform

* Added Environment Canada weather platform

* Migrate to new folder structure

* Migrate to new folder structure

* Fix updates

* Fix updates again

* Bump env_canada to 0.0.4

* Bump env_canada to 0.0.4

* Bump env_canada to 0.0.4 in requirements_all.txt

* Change daily forecast timestamp and high/low test

* Change daily forecast timestamp and high/low test

* Bump env_canada to 0.0.5

* Break alerts into multiple sensors, bump env_canada to 0.0.6

* Bump env_canada to 0.0.7

* Remove blank line

* Remove 'ec' sensor prefix, bump env_canada to 0.0.8

* Corrections

* Change to manifests.json

* Add docstring to __init.py__

* Update CODEOWNERS

* pylint correction

* pylint correction

* Add alert details, bump env_canada to 0.0.9

* Update requirements_all.txt

* Update .coveragerc

* Bump env_canada to 0.0.10

* Update requirements_all.txt
2019-06-06 11:47:27 -07:00
David Roberts 4c6ddd435c SolarEdge Local Component (#23996)
* Basic local SolarEdge monitoring for energy / power

* Basic local SolarEdge monitoring for energy / power

* generated CODEOWNERS, requirements, excluded tests

* generated CODEOWNERS, requirements, excluded tests

* lint fixes, etc

* lint fixes, etc

* Fix docstyle for init

Of course thats the file I forgot to run tests on

* Load all sensors by default

They use the same API endpoint.  This changes was made per https://github.com/home-assistant/architecture/pull/244

* remve unneded date/time

* ran hassfest again

* add throttle when updating

* readd solax, mistakenly removed

* Update sensor.py
2019-06-05 16:45:05 +02:00
Franck Nijhof 9220270948 Adds AdGuard Home integration (#24219)
* Adds AdGuard Home integration

* 👕 Addresses linting warnings

* 🚑 Fixes typehint in async_setup_entry

* 👕 Take advantage of Python's coalescing operators

* 👕 Use adguard instance from outer scope directly in service calls

* 👕 Use more sensible scan_interval default for sensors

* 👕 Adds specific files to .coveragerc

*  Added tests and small changes to improve coverage

* 🔨 Import adguardhome dependencies at the top

* 🚑 Converted service handlers to be async

* 🔥 Removed init step from config flow
2019-06-01 22:13:14 -07:00
Otto Winter 1ce2d97d3d Fix ESPHome discovered when already exists (#24187)
* Fix ESPHome discovered when already exists

* Update .coveragerc
2019-05-30 09:48:58 -07:00
Morten Trab 85dfea1642 Add Repetier-Server Component (#21658)
* Bumped to version 2.0

* Updated requirements

* Updated requirements and coveragerc

* Removed long lines, changes to coveragerc and requirements

* Fixed under-indented lines

* Fixed invalid syntax

* Updated .coveragerc to include repetier/__init__.py and sensor.py

* Module update

* Rebased to latest dev

* Blank lines fix

* Add missing manifest.json

* Update requirements

* Bumped component to new API module style

* Removed whitespaces and line feeds

* Added missing newline

* Added missing heated chamber sensor

* Fixed wrong indentation

* Various fixes

* Various build fixes

* Clean up

* Load platform only once

* Sort imports

* Add printer api

* Clean up

* Build out sensor classes

* Clarify temperature sensor variable names

* Move constants

* Clean up name

* Run script/gen_requirements_all.py

* Working code, missing auto add of new sensors

* Updated code to return proper device_class and timestamp

* Removed unnessecary code

* Renamed elapsed and remaining sensors

* Dynamically adding sensors as they become available

* Rebased .coveragerc due to conflicts

* Code changes and cleanup

* Removed whitespace and code simplification
2019-05-29 08:31:04 -04:00
Eduard van Valkenburg afeb13d980 Azure Event Hub history component (#23878)
* v1 of Azure Event Hub History component

* updates to EH

* small fix

* small updates and changed requirements_all

* new version of Event Hub component

* redid config to just ask names

* small edit

* latest version of EH component

* updated codeowners

* codeowner fix

* typo in domain

* updates based on reviews.

* using built-in jsonencoder for DT

* delete unused import
2019-05-26 13:55:40 +02:00
jgriff2 6e1728542e Add Remote RPi Component (#23518)
* Add Remote RPi Component

* Add Remote RPi Component

* fix imports

* Added support for setup as switch and binary_sensor

* remove pylint error handling

* Changed to domain config

* Changed to domain config

* Changed to domain config

* Changed to domain config

* Update __init__.py

* Update manifest.json

* Update requirements_all.txt

* Update switch.py

* Update binary_sensor.py

* Changed to domain config
2019-05-26 13:52:06 +02:00
Robin Wohlers-Reichel 7959c04d1e Solax Inverter Sensor Component (#22579)
* Solax inverter direct API

* Linter compliance

* lint++

* move api communication to external lib

* lint++

* requirements

* Revert "requirements"

This reverts commit 82a6c0c095.

* potentially?

* Addressing review comments

* Also update CODEOWNERS

* Only update sensor state if data has changed
2019-05-25 21:55:30 -05:00
Jardi Martinez 1d022522cd MCP23017 (#23127)
* Added support for MCP23017 I2C GPIO extender.

* Updated .coveragerc to exclude mcp23017 component from tests.

* Generated CODEOWNERS for mcp23017 usign script.

* Removed .svn folder that had been accidentally uploaded.

* Added link to www.home-assistant.io docs in manifest.json

* Fixed logic error in switch platform.

* Cleaned up code and removed unnecessary should_poll() function.

* Limited the options for pull mode to UP and DOWN

* Fixed line too long in binary sensor.

* Fixed line too long on switch.py

* Changed to setup_platform.

* Reorder constants
2019-05-25 08:09:53 +02:00
András Rutkai eebd094423 Adding Watson TTS (IBM Cloud) (#23299)
* Adding Watson TTS (IBM Cloud)

* Code review changes
2019-05-18 23:05:59 +02:00
Baptiste Candellier 1a051f038d Add new SmartHab light and cover platform (#21225)
* Add SmartHab platform

* Remove url config entry, improve error handling

* Upgrade smarthab dependency

* Address comments

* Lint
2019-05-13 03:35:31 -07:00
Jc2k b8cbd39985 HomeKit Controller: Adopt config entries for pairing with homekit accessories (#23825)
* Fix user initiated pairing + show more user friendly name

* Add lock around async_refresh_entity_map

* Migrate homekit_controller to config entries.

* Improve docstring

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Add dummy async_setup_platform

* add_service -> async_add_service

* Add missing returns

* Enable coverage checks for homekit_controller
2019-05-12 23:56:05 -07:00
David Bonnes 7181d639fd Add Intergas InComfort Lan2RF gateway (#23736)
* fixed __init__.py

* add sensors

* switch to parent-child architecture

* make binary_sensor the parent

* revert parent - to water_heater

* first working version

* working, delinted (except TODO)

* update to latest client library

* remove debug code

* delint

* tweak device_state_attributes

* tweak device_state_attrbutes

* minor tweaks

* bump client library for bugfix

* improve state attributes for pumping

* update .coverage

* bugfix - binary sensors not updating

* rename to incomfort from intouch

* fix coveragerc regression

* bump client (bugfix for /protected URL)

* bump client (bugfix for /protected URL) 2

* bump client

* remove debug code

* ready for PR

* fix regression

* use xx._boiler instead of xx._objref

* improve current_temperature and delint

* use current_operation instead of state

* refactor vol.Schema

* remove unneeded instance attribute

* remove unneeded instance attribute 2

* refactor device_state_attributes

* change 'boiler' to 'heater'

* change 'boiler' to 'heater' 2

* correct a typo

* bugfix: add missing comma

* small tidy-up
2019-05-07 23:53:55 +02:00
rolfberkenbosch c07c557298 Added new binary sensor meteoalarm to get weather alerts in Europe (#23663)
* Added new component meteoalarm

* Update sensor.py

* Update manifest.json

* Update manifest.json

* Update manifest.json

* Added file CODEOWNERS

* Modified some code, thanks @amelchio

* removed Throttle because is not being used anymore

* Update _attributes ad _state

* some cleanup

* Update sensor.py

Change sensor to binarysensor

* Rename sensor.py to binary_sensor.py

rename the file

* Update binary_sensor.py

Removed BinarySensorDevice from class

* Update binary_sensor.py

Made a mistake with BinarySensorDevice

* Update binary_sensor.py

clean up white spaces

* Update binary_sensor.py

Fix BinarySensorDevice

* Update binary_sensor.py

cleanup the import libs

* modified __init__

* fix

* final fix, thanks @amelchio

* forgot to change the sensor.py

* correct some typo in text

* fix typos

* fix another typo

* fix typo
2019-05-07 08:19:29 +02:00
Fabian Affolter b60c815cde Share snmp constants across all platforms (#23678)
* Share constants across all platforms

* Update .coveragerc
2019-05-06 23:31:03 +02:00
UgaitzEtxebarria 8da600adff Add Bizkaibus, Biscays (Spain) bus service component (#22934)
* Updated to the current version of dev

* Added the component to .coveragerc

* Added __init__.py and manifest.json

* Changed the manifest to comply the json format

* Changes in for complete the PEP8 Code

* Fixed the api call to use PyPI package

* Fixed API correrct call

* Fixes for complete the requirements

* Added dependencies in manifest.json

* Changed the __init__.py to complete PEP8

* Simplified the __init__.py

* Runned codeowner script

* executed gen_requirements_all.py

* Direct call for dicts and unit changed to minutes

* Fixed the optional dict call, sorry, my bad, I did not that

* Deleted unused vars

* Changed optional parameter to required

* Remove blank first line
2019-05-05 11:00:15 +02:00
Daniel Høyer Iversen 19aee50bbc
Ambiclimate (#22827)
* Ambiclimate

* Ambiclimate

* style

* Add config flow to ambicliamte

* Add config flow to ambicliamte

* update requirements_all.txt

* ambiclimate

* tests

* typo

* ambiclimate

* coverage

* add manifest.json

* services

* codeowner

* req

* ambicliamte

* style

* ambicliamte

* add to requirements all tests

* add to requirements all tests

* .coveragerc

* Add tests

* add doc

* style

* fix test

* update tests

* update tests

* update tests

* update tests

* update tests

* tests

* tests

* fix comment
2019-05-01 22:05:40 +02:00
Penny Wood b0843f4a38 Ptvsd debugger component. (#23336)
* ptvsd debugger component.

* Add test case

* ptvsd as test dependency

* Fix for 3.5

* Fixed bootstrap test

* Use dict direct lookup.

* Don't need to load dependencies.

* Get the test working.

* 3.5 fix

* Set mock return value

* Put tests back, but skip them

* Change log level
2019-05-01 00:07:34 +02:00
Sylvia van Os 603e2cd961 Essent sensor (#23513)
* Initial commit for Essent

* Cleanup Essent component

* Update CODEOWNERS

* Move stuff to PyEssent

* Update requirements_all

* Fix PyEssent

* Move meter list to PyEssent library

* Update requirements_all

* Only check for updates once an hour

* Use PyEssent 0.10

* Fixing up Essent component

* Fix crash

* Don't add unused meter/tariff combos

* Fix lint

* Get tariffs per meter

* Don't hammer Essent API

* Fix linting errors

* Fix old description

* Fix old call

* Cleanup Essent component
2019-04-30 21:02:16 +02:00
Aaron Bach 0d796a0fb9
Convert Pollen.com sensor into IQVIA component (#22986)
* Moved pollen integration to iqvia

* Stitched in new library

* Added __init__

* Completed component v1

* Updated requirements

* Updated CODEOWNERS

* Updated .coveragerc

* Removed requirements

* Static check
2019-04-24 21:09:01 -06:00
Tomer Figenblat 9d8d8afa82 Added component named switcher_kis switcher water heater integration. (#22325)
* Added component named switcher_kis switcher water heater integration.

* Fixed conflicts.

* Updated requirements.

* Added manifest.json file and updated CODEOWNERS.

* Fixed requirements_all.txt.

* Better component tests.

* Removed unnecessary parameter from fixture function.

* Removed tests section from mypy.ini.

* Remove unused ENTITY_ID_FORMAT.

* Stop udp bridge when failed to setup the component.

* Replace DISCOVERY_ constants prefix with DATA_.

* Various change requests.

* Fixed constant name change remifications.

* Added explicit name to fixture.

* Various change requests.

* More various change requests.

* Added EventType for homeassistant.core.Event.

* Switched from event driven data distribution to dispatcher type plus clean-ups.

* Removed name and icon keys from the component configuration.

* Various change requests.

* Various change reqeusts and clean-ups.

* Removed unnecessary DEPENDENCIES constant from swith platform.

* Replaced configuration data guard with assert.

* Removed unused constants.

* Removed confusing type casting for mypy sake.

* Refactor property device_name to name.

* Removed None guard effecting mypy only.

* Removed unnecessary function from switch entity.

* Removed None guard in use by mypy only.

* Removed unused constant.

* Removed unnecessary context manager.

* Stopped messing around with mypy.ini.

* Referring to typing.TYPE_CHECKING for non-runtime imports.

* Added test requierment correctyly.

* Replaced queue.get() with queue.get_nowait() to avoid backing up intervals requests.

* Revert changes in mypy.ini.

* Changed attributes content to device properties instead of entity properties.

* Fixed typo in constant name.

* Remove unnecessary async keyword from callable.

* Waiting for tasks on event loop to end.

* Added callback decorator to callable.
2019-04-19 16:54:48 -05:00
Pascal Roeleven df475cb797 Adds Orange Pi GPIO platform (#22541)
* Adds Orange Pi GPIO platform

* Add manifest.json

* Remove cover platform

* Apply requested changes

* Remove switch platform

* Update CODEOWNERS

* Remove obsolete dependecies/requirements
2019-04-18 19:43:34 +09:00
ThaStealth 5b33d952aa Added epson workforce component (#23144)
* Added epson workforce component

* Added __init__ file
2019-04-17 18:33:22 +02:00
GeoffAtHome e02a5f0b31 Genius hub (#21598)
* Adding Genius Hub

* Added Genius hub

* Correct hound errors

* Correct hound errors.

* Correct tox errors.

* Fix travis errors

* Correct sensor names

* Correct travis errors

* Correct hound  errors

* Follow up from code review by Martin Hjelmare

* More changes from code review.

* Attempt to resolve conflicts in requirements_all

* de-lint for the houndci-bot

* better logging message, and small tidy-up

* minor refactor and de-lint

* domain name should be the same as the component name

* use self where appropriate

* minor de-lint

* add entities as a single call

* de-lint

* all read-only attrs almost done

* refactor - near the end

* change state/,ode mapping

* override temp from curr_temp

* all read-only properties working

* working now

* ready for PR, but need to remove logging

* de-lint

* de-linted, ready for merge

* de-linted, ready for merge 2

* didn't like import in climate/__init__

* improve footprint logic

* add manifest.json

* add manifest.json 2

* correct a regression

* fix regression with device.is_on()

* use latest client library

* update to latest client library, 3.3.6

* delint and shoudl be OK to go
2019-04-16 23:54:46 +02:00
Michał Węgrzynek 7251e29e60 Add basic Supla cover support (#22133)
* Added basic Supla (https://www.supla.org) support (covers)

* PySupla upgrade, minor spelling corrections and .coveragerc update

* Linter errors cleanup

* More linter cleanups.

* Documentation link removal and import sorting

* Docstring formatting

* PR suggestions

* Styling and linting

* PySupla version update

* Removal of ALLOW_EXTRA in SERVER_CONFIG

* Return False on failed connection validation, function order cleanup

* Component manifest

* Missing return None and different way of setting unique_id

* CODEOWNERS update

* CircleCI nudge
2019-04-15 13:20:08 -07:00
cgtobi f5878e1f22 Clean coveragerc of removed integrations (#23118) 2019-04-15 10:58:37 -07:00
Martin Fuchs 0a0975b5d9 Add support for Stiebel Eltron heat pumps (#21199)
* Start with Stiebel Eltron heatpump

* STE HP

* Add read of operating mode

* Add read-write operation mode

* Further extract ModBus access

* Separation of platform and API

* Last changes

* Use modbus hub

* Update module doc with config

* Clean up platform code

* Cleanup and update to dev2 of pystiebeleltron

* Remove slave configuration

* Add translation of states

* Make name parameter optional

* Consolidate platform

* Correct .coveragerc after conflict

* Prepare component for sensor platform

* Fix issues found in review

* Remove custom states and map to existing HA states

* Force update, when values are modified

* Update CODEOWNERS and requirements_all.txt

* Fix .coveragerc file

* Exclude stiebel_eltron components in .coveragerc

* Break out to module level constant

* Rename constant

* Removed REQ and DEP constant.
2019-04-13 23:53:36 +02:00
Otto Winter 72af4276b9
Add ESPHome climate support (#22859)
* Add ESPHome climate support

* Adjust line length

* Update .coveragerc

* Update climate.py

* Rename
2019-04-10 22:13:13 +02:00
Evan Bruhn a48c0f2991 Logi Circle public API refactor and config flow (#20624)
* Logi Circle now uses OAuth2 for authentication, added config flow.

* Service calls now dispatched to camera entities via signalled events

* Update from PR review

* Add unit tests for config flow

* Updated CODEOWNERS

* Reverted change to .coveragerc

* Improved test coverage of config flow
2019-04-09 14:26:58 +02:00
Paul Madden 88694c978b Camera component for BOM integration (#22816)
* Work on PR comments

* Work on PR comments

* Update imports

* Work on schema validation

* Fix package

* Add bomradarcam to .coveragerc

* Improve error message for location

* Delinting

* Correct module name in .coveragerc

* Add manifest.json

* Update requirements_all.txt

* Merge bomradarcam into existing bom integration
2019-04-09 05:56:04 -04:00
Ben Dews 6ee23bdf4e Add Somfy MyLink support for Covers (#22514)
* Added MyLink component

* Updated requirements.txt

* Fix lint issues

* Removed ‘Scene’ functionality

* Removed state restoration, as state is no longer tracked

* Add component manifest

* Remove documentation links in Docstring

* Removed redundant try/except block

* Removed default dict

* Removed features already implemented in default CoverDevice

* Removed attributes for tracking state

* Simplified loading of covers

No options exist other than reversal, so just check reversal status directly and update if needed

* Reimplemented is_closed property

* Import ENTITY_ID_FORMAT from base component

* Removed misc unused vars

* Update module docstrings to one line

* Removed too many blank lines, giving one back :)

* Return none on TimeoutError

* Added component to .coveragerc
2019-04-09 08:31:34 +02:00
panosmz 6351c5c6ab Add OASA Telematics greek public transport sensor component (#22196)
* add telematics sensor

* add missing final newline

* code cleanup & add manifest

* fixes from review

* fix flake8 warning

* rerun gen_requirements_all.py script
2019-04-06 15:20:51 +02:00
Markus Ressel 07d739c14e Add N26 component (#22684)
* upgraded n26 dependency
removed card_id config parameter (unnecessary)
get_token is now a public method inside n26 dependency

* Add manifest.json
2019-04-04 10:18:54 -07:00
Jason Hu 6aac49de7e Remove aws_* notify platforms (#22698) 2019-04-03 20:14:02 -07:00
Finbarr Brady a7d49e40c0 Rebrand Cisco Spark notify to be Cisco Webex Teams (#21938)
* Rebrand Cisco Spark notify to be Cisco Webex Teams

* Remove property from class

* Switch to use html for api

* Update notify.py

* Rename CONF_ROOMID to CONF_ROOM_ID

* updated

* Fix lint errors

* Update notify.py

* Update notify.py

* Also validate room  ID

* Update notify.py

* Update .coveragerc

* Update notify.py
2019-04-02 23:25:02 -07:00
Jason Hu d6e2862115 Ignore code coverages for component without test (#22653) 2019-04-02 09:51:44 -07:00
Klaudiusz Staniek 2eafa5f81a Ampio Smog Air Quality Sensor (#21152)
* Initial commit for Ampio Smog Air Quality Sensor

* coveragerc and requirements_all update

* Lint fixed

* Moved to vendor folder

* Updated according to review

* Docs string fix

* Docstring fix

* Docstring fix

* Requirements fixed

* Lint fix

* .coveragerc updated
2019-03-30 18:49:59 +01:00
Andrew Sayre 1bfe86b30d Change HEOS component library and add basic config flow (#22517)
* Update heos lib

* Update requirements files

* Removed unecessary mock_coro usage

* Remove assert_called_once usage

* Updates from review feedback

* Remove extra param to error format
2019-03-29 21:10:00 -07:00
Andrew Sayre 78047c8c3c Fix .coveragerc from merge/rebase (#22516)
* Fix coveragerc

* Fix coveragerc
2019-03-28 20:01:53 -07:00
Andreas Rydbrink 01052f516b Add HEOS media player component (#21721)
## Description:
Denon HEOS media player.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#8848

## Example entry for `configuration.yaml` (if applicable):
```yaml
heos:
  host: HEOS-1                              
```

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [X] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [X] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [X] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [X] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [X] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2019-03-28 19:03:02 -07:00
Robbie Trencheny 7741ec4d5a Great migration notify (#22406)
* Move notify platforms into components

* Move notify tests

* Fix notify tests

* More fixes

* Update requirements

* Update .coveragerc

* Run gen reqs
2019-03-27 20:36:13 -07:00
Rohan Kapoor c4eab21736 Mopar split (#21526)
* Split out mopar into a component and sensor platform

* Add the mopar switch platform

* Add the mopar lock platform

* Clean up and bump version

* Update per review

* Re-add service to trigger horn

* Clean up again

* Don't call async from sync context

* Lint

* Implement changes from review

* Lint

* A little more clean up
2019-03-27 20:09:36 -07:00
Heine Furubotten f11f5255ae Entur upgrade to v0.2.0: async polling, number of departures, omit non boarding departures (#22001)
* The Great Migration

* removed outdated tests

* Upgraded enturclient to v0.2.0
- client has gone async
- configurable if non boarding departures should be omitted from result
- configurable how many departures should be shown
- more clear which attributes are included and when

* reduced nesting and clearing of attributes

* Removed test data

* ensure attribution and stop id in attributes

* docstring fixes

* fix rebase errors
went a bit too fast on continue on one of the conflicts..

* fix test requirements comment from gen
2019-03-27 20:04:35 -07:00
Fredrik Erlandsson b6987a1235 Add support for Tfiac Climate component (#21823)
## Description:

Add support for AC-models that follows the Tfiac protocol. Built together with @mellado.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#8910

## Example entry for `configuration.yaml` (if applicable):
```yaml
climate:
   platform: tfiac
   host: 192.168.10.26
```

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [x] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [x] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [x] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [x] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [x] New files were added to `.coveragerc`.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Robbie Trencheny <me@robbiet.us>
2019-03-24 17:57:53 -07:00
Robert Svensson 6988fe783c
Axis config flow (#18543)
* Initial draft

* Add tests for init
Fix hound comments

* Add tests for device
Change parameter handling to make device easier to test

* Remove superfluous functionality per Martins request

* Fix hound comments

* Embedded platforms

* Fix device import

* Config flow retry

* Options default values will be set automatically to options in config entry before component can be used

* Clean up init
Add populate options
Fix small issues in config flow
Add tests covering init

* Improve device tests

* Add config flow tests

* Fix hound comments

* Rebase miss

* Initial tests for binary sensors

* Clean up
More binary sensor tests

* Hound comments

* Add camera tests

* Fix initial state of sensors

* Bump dependency to v17

* Fix pylint and flake8

* Fix comments
2019-03-24 16:16:50 +01:00
Penny Wood 1ddc65a0ce Fixing the api_streams sensor (#22200)
* Fire events with websocket messages.

* Added tests to validate

* Fixed api_streams sensor to use new sensor

* Delete from coverageac as now works.

* Removed websocket request event.

* Use dispatcher instead of events.

* Moved sensor to under websocket_api

* Changes as per code review

* Fixed tests.

* Modified test

* Patch
2019-03-22 11:59:10 -07:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
Jeff Irion 007bf2bcb5 Rename 'firetv' to 'androidtv' and add Android TV functionality (#21944)
* Working on adding androidtv functionality to firetv component

* 'should_poll' must return True

* Change 'properties' to 'device_properties'

* Also mention 'Android TV' in services.yaml

* Use GitHub for 'androidtv' requirement

* Add 'androidtv==0.0.10' to requirements, remove 'firetv==1.0.9'

* Add 'GET_PROPERTIES' adb command option; use pypi for REQUIREMENTS

* Rename integration from 'firetv' to 'androidtv'

* Change default name to 'Android TV'

* Rename integration from 'firetv' to 'androidtv'

* Change firetv to androidtv in .coveragerc

* Change firetv to androidtv in requirements_all.txt

* Remove 'DEFAULT_APPS'
2019-03-13 11:18:59 +01:00
Marco Orovecchia e7c85d350e Changed from nanoleaf_aurora to nanoleaf (#21913)
Nanoleaf component now supports both nanoleaf lights, Aurora and Canvas
Changed the dependency to pynanoleaf, nanoleaf does not seem to be
maintained anymore
2019-03-11 20:46:32 +05:30
Zak 896075fa1c Add ClearPass Policy Manger device tracker (#21673)
* Adding ClearPass Policy Manger device tracker. Amending author

* Cleaned redundant code

* Updated .coveragerc

* Updated requirements_all.txt

* Implemented suggested changes partially.

* Implemented more suggested changes.

* Hound was unhappy

* Implement further suggested changes.

* Make Hound happy.

* Satisfy Travic CI

* Satisfy Travis CI #2

* Hound barking

* pylint else: return

* Implemented suggested changes minus AccessToken

* Removed access token logging

* Removed throttle import

* Removed period from debug string

* Make travis happy :(

* Moved source to new component structure.

* Forgot to rename source.
2019-03-09 22:12:29 +01:00
Finbarr Brady 0f189809a9 Add support for Cisco Mobility Express (#21531)
* Move cisco me to new layout

* Add docstring

* Move items out of init method and pass the controller instance to the scanner in get_scanner

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Fix build error

* Cleanup based on comments.
2019-03-09 00:47:06 +01:00
Finbarr Brady 4571f1bf0d Adding enigma2 media player (#21271)
* Updated based on review comments

* fix hound

* Update homeassistant/components/media_player/enigma2.py

* Update homeassistant/components/media_player/enigma2.py

* Update homeassistant/components/media_player/enigma2.py

* Update enigma2.py

* Update enigma2.py

* Move file and update docsstring

* Fix path in coverage rc file

* requirements

* Update media_player.py

* Setup discovery for e2

* Handle discovered devices

* Add reqs

* Update for auth for openwebif

* Forget to set DEFAULT_PASSWORD

* Add source selection

* Fix get current source name

* Update pip version

* - adding some extra attributes
- support better recording playback integration

* bump pip version

* Bump pip

* Adding prefer_picon config option

* Updates to move logic into pypi module

* bump pip

* bump pip

* - remove http dependancy.

- rename prefer_picon to use_channel_icon

* Bump pypi to fix toggle bug.

also fix travis

also move setup out of init
2019-03-08 14:56:10 +01:00
Jose Motta Lopes f705ac6b43 Add Time of Flight Sensor using VL53L1X (#21230)
* Add Time of Flight Sensor using VL53L1X

* Fix issues found by bot

* Fix issues from bot

* Remove extra logs

* Keep removing logs dependencies not used

* Remove log from update

* Add logger info to async_update

* Fix over-indented line

* Fix pylint error

* Remove logger reporting successful operation

* Update requirements

* Update requirements_all.txt

* Update requirements_test_all.txt

* Used isort to keep imports and added STMicroelectronics to docstring

* Replace time.sleep by asyncio.sleep

* Add requirements to COMMENT_REQUIREMENTS and fix typo

* Using async_add_executor_job to schedule the call in the pool

* Fix typo

* Optimize async_update

* Updated requirements files

* Group and schedule calls that should be run sequentially

* Fix lint errors

* Revision showing development history

* Cleaning and typos

* Cleaning and typos

* Fix wrong-import-order

* Fix gen_requirements_all

* Schedule rpi_gpio I/O on the executor thread pool

* Fix partial parameters

* Fix bot error - add blank line

* Fix lint error

* Remove dependencies from requirements

* Review initial commits

* Move all device I/O to async_update

* Update requirements_all.txt

* Revised header with no url to the docs

* Use async_added_to_hass to add and initialize the sensor

* Add docstring to init()

* Move sensor.open() to async_setup_platform

* Remove logging and async

* Fix typo

* Move sensor.open to safe initialization

* Fix typo

* Fix typo

* Add the new tof module to .coveragerc

* Move the sensor platform under a tof package

* Update .coveragerc and requirements_all for tof package
2019-03-08 08:21:22 +01:00
Colby Rome 0e78054195 Xfinity Gateway device_tracker platform (#21026)
* initial commit

* updated .coveragerc, CODEOWNERS, generated requirements_all.txt

* fixed lines exceeding 79 characters

* pylint fixes

* shorten docstring and simplify get_scanner

* extract initialization into get_scanner

* bump pypi version

* name change
2019-03-04 22:57:45 -08:00
Robbie Trencheny 655ada1374 mobile_app component (#21475)
* Initial pass of a mobile_app component

* Fully support encryption, validation for the webhook payloads, and other general improvements

* Return same format as original API calls

* Minor encryption fixes, logging improvements

* Migrate Owntracks to use the superior PyNaCl instead of libnacl, mark it as a requirement in mobile_app

* Add mobile_app to .coveragerc

* Dont manually b64decode on OT

* Initial requested changes

* Round two of fixes

* Initial mobile_app tests

* Dont allow making registration requests for same/existing device

* Test formatting fixes

* Add mobile_app to default_config

* Add some more keys allowed in registration payloads

* Add support for getting a single device, updating a device, getting all devices. Also change from /api/mobile_app/register to /api/mobile_app/devices

* Change device_id to fingerprint

* Next round of changes

* Add keyword args and pass context on all relevant calls

* Remove SingleDeviceView in favor of webhook type to update registration

* Only allow some properties to be updated on registrations, rename integration_data to app_data

* Add call service test, ensure events actually fire, only run the encryption tests if sodium is installed

* pylint

* Fix OwnTracks test

* Fix iteration of devices and remove device_for_webhook_id
2019-03-01 23:08:20 -08:00
Jeff Irion 27a780dcc9 Register 'firetv.adb_command' service (#21419)
* Register 'media_player.firetv_adb_cmd' service

* Wrap the 'firetv_adb_cmd' service with 'adb_decorator'

* Address reviewer comments

* Move firetv to its own platform

* Move 'adb_command' service description

* Rename DOMAIN to FIRETV_DOMAIN

* Import KEYS in __init__ method

* Change 'self.KEYS' to 'self.keys'

* Update firetv in .coveragerc

* 'homeassistant.components.media_player.firetv' -> 'homeassistant.components.firetv'

* 'homeassistant.components.firetv' -> 'homeassistant.components.firetv.media_player'
2019-02-28 12:29:56 +01:00
Leonardo Merza e739fd8a31 Reddit Sensor (#21344)
* init

automated commit 22/02/2019 22:55:49

cr comments

cr comments

automated commit 24/02/2019 14:41:08

automated commit 24/02/2019 14:41:59

automated commit 24/02/2019 14:54:16

automated commit 24/02/2019 14:54:49

automated commit 24/02/2019 19:46:15

automated commit 25/02/2019 10:10:46

automated commit 25/02/2019 10:10:52

automated commit 25/02/2019 10:12:16

automated commit 25/02/2019 10:15:59

* automated commit 25/02/2019 12:26:38

* automated commit 25/02/2019 13:55:52
2019-02-26 13:55:11 -08:00
Alistair Galbraith 1eba90d2a1 Add initial support for Sony SDCP projector control (#20269)
* Add initial support for Sony SDCP projector control

* Changes to reflect code review

* Added code per change requests

- Validation of connection during setup_platform
- Docs pending

* Removed blank lines per CI build

* Lint fix

* Update homeassistant/components/switch/sony_projector.py

Co-Authored-By: alistairg <alistair@alistairs.net>

* Updated .coveragerc, made requested logger changes

* Update docstring
2019-02-23 15:57:10 -06:00
Rohan Kapoor dc5b8fd8c4 Split out iperf3 into a component with a sensor platform (#21138)
* Move iperf3 sensor to a standalone component

* Split out iperf3 into a component with a sensor platform

* Update coverage and requirements

* Add services.yaml

* Clean up a little bit

* Lint

* Lint
2019-02-23 15:55:08 -06:00
Miroslav Ždrale 565f513b77 Added device tracker support for Ubee Router (#19586)
* Added Ubee Router Device Tracker.

* Updated code to meet requirements.

* Code clean-up.

* Code clean-up.

* Code clean-up.

* Minor error message update

* Ubee device tracker: Minor code clean-up

* Bump pyubee version

* Code clean-up
2019-02-21 09:24:37 -08:00
David F. Mulcahey 3be8178035 Refactor ZHA listeners into channels (#21196)
* refactor listeners to channels

* update coveragerc
2019-02-19 09:58:22 -08:00
ktnrg45 72ef9670e6 Add component media player.ps4 (#21074)
* Added PS4/ __init__.py

* Create en.json

* Create config_flow.py

* Create const.py

* Create media_player.py

* Create services.yaml

* Create strings.json

* Create __init__.py

* Add test_config_flow.py/ Finished adding PS4 files

* Rewrote for loop into short-hand

* bumped pyps4 to 0.2.8

* Pass in helper()

* Rewrite func

* Fixed test

* Added import in init

* bump to 0.2.9

* bump to 0.3.0

* Removed line

* lint

* Add ps4 to flows list

* Added pyps4-homeassistant with script

* Added pyps4

* Added pypys4 to test

* removed list def

* reformatted service call dicts

* removed config from device class

* typo

* removed line

* reformatted .. format

* redefined property

* reformat load games func

* Add __init__ and media_player.py to coveragerc

* Fix for test

* remove init

* remove blank line

* remove mock_coro

* Revert "remove init"

This reverts commit b68996aa34699bf38781e153acdd597579e8131f.

* Correct permissions

* fixes

* fixes
2019-02-17 15:41:55 -05:00
Matt Snyder 4c23ccad98 Owlet baby monitor component (#21108) 2019-02-16 10:12:16 +01:00
Phil Cole 656d39e3ec Nissan Leaf Integration (Carwings / NissanConnect EV) (#19786)
* Added work so far.

* Change interval so nobody drains their battery when I put this online

* Added the warning notice.

* Async setup

* Still broken, but we're getting there.

* Back to synchronous, moved refresh stuff into DataStore

* Functional sensors!

* Added working switches, tweaked intervals a bit

* Fixed turn off result

* Moved plug status to binary_sensor, added smart intervals

* Documentation and car nickname stuff

* Syntax fixes and coveragerc additions

* Style fixes

* Fixing the final line length

* Fixed an issue with newer models and bad climate data

* Forgot to check my line endings.

* New icons for most of the components

* Hotfix for handling Nissan's awful servers

* Merge in fixes made by Phil Cole

Remove invalid FIXMEs and update TODOs
Fixes for pylint and test for CarwingsError exception rather than Exception
Flake8 fixes
Add pycarwings2 to requirements_all.txt
Add extra configuration documentation.
Use pycarwings2 from pip. Check server dates between requests.
Add sensor device class for battery.
Async conversion fixes
flake8 fixes and docstrings
Non-async charging is OK
Handle multiple cars in the configuration
Convert to async. Better imports for platforms
Fix scanning interval & prevent extra refreshes.  async switchover
Check discovery_info to prevent load of platforms
Ensure update frequency is always above a minimum interval (1 min).
Platforms don't have return values
Use values() instead of items() when not using key
Use snake_case (LeafCore becomes leaf_core)

commit 418b6bbcc49cf2909aac85869440435410abf3fd

* Add pycarwings2 to requirements_all.txt

* Make stopping charge error an 'info'. Remove TODO.

* Request update from car after sending start charging command.

* Delay initial (slow) update for 15 seconds and make async

* Flake8 line length fixes

* Try to fix D401 'imperative mood' git diff tox errors

* Try to fix more D401 'imperative mood' tox errors

* Default interval of an hour in code, to match comments.

* Update to pycarwings2 2.3

* Update to pycarwings2 2.3 in requirements_all.txt

* Remove documentation, instead refering to home-assistant.io

* Remove unneeded dispatcher_send()

* Remove unneeded requirements comments

* Combine excess debugging.

* Remove single line method signal_components()

* Bump to version 2.4 of pycarwings2

* Remove unused dispatcher_send

* Simplify logging of LeafEntity registration

* Update requirements_all.txt

* Multiple changes

Increase timeout to 30 seconds
Only consider battery_status
Fix plugged in status
Better attempts at try/exception handling

* Fix line length

* Use pycarwings 2.5

* Remove pointless 'is True'

* Remove unnecessary 'is True/False'

* Remove unnecessary 'is True/False'

* Use LENGTH_MILES and LENGTH_KILOMETERS

* Remove excess logging in setup_platform()

* Remove unnecessary 'is True'

* Use pycarwings2 version 2.6

* Require pycarwings2 version 2.7.

* Increase sleep delay for climate and location reponses.

* Remove unnecessary 'is True'

* Increase frequent polling warning to _LOGGER.warning()

* Use DEVICE_CLASS_BATTERY

* Remove extraneous 'is True'.

* Move icon strings to constants.

* Remove unneeded key.

* LeafRangeSensor ac_on property is internal.

* Flake8 missing line

* Remove homebridge attributes.

* Remove round battery % and range to whole numbers

* Use pycarwings2 2.8

* Move to embedded component model

* Reduce maximum attempts to 10 (5 mins)

* Include attempt count in 'waiting' log message

* Use await instead of yield. Remove @asyncio.coroutine decorators.

* Add @filcole as nissan_leaf codeowner

* Fix checking for if not data returned from vehicle. Don't double send signal on location update.

* Exposed updated_on, update_in_progress and next_update attributes.

* Add nissan_leaf.update service that triggers an update.

* Flake8 line fixes

* Remove excess and double logging.

* Add updated_on attribute for device tracker.

* Fix crash if pycarwings2 doesn't provide cruising ranges.

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes
2019-02-15 14:35:25 +01:00
Fabian Affolter eb573c2701
Meteo france (#21065)
* Move files

* Move file

* Update .coveragerc

* Sort import and update file header

* Minor changes
2019-02-15 10:57:47 +01:00
Victor Cerutti f4b2573c4b Météo-France platform for the weather component (#18404)
* new weather component for meteofrance

* linting

* upgrade meteofrance package version

* Update .coveragerc

* Remove updates to the weather component architecture

* Rewrite Météo-France as a component

* Update .coveragerc

* Update requirements_all.txt

* remove Weather Card option

* Update conf name

Changing conf name to something more universal for worldwide weather forecast (postal code was only relevent for France)

* Update meteofrance pypi package

* fix line too long

* Update requirements_all.txt

* prevent from calling an API endpoint if not in monitored conditions

* fix stale url and remove blank line

* Insure that all cities are unique

* rename CONF_ATTRIBUTION

* Updating data from component setup

* fix missing extra lines
2019-02-14 14:40:27 +01:00
Daniel Høyer Iversen 2702c75fb0 Norway air quality (#20683)
* Add norway air quality sensor

* style

* library

* Refacotr to air_quality

* fix norway air comments
2019-02-12 16:40:22 +01:00
Thomas Passer Jensen 69df620ad6 Add Rejseplanen danish public transport sensor component (#19885)
* Add Rejseplanen danish public transport sensor component

* Removed commented out code and fixed style errors

* Use rjpl pypi package for API calls.

* Fix platform schema config and code cleanup.

* Use updated rjpl library with specific exceptions

* API error message is now logged, unknown state attributes excluded
2019-02-12 09:26:46 +01:00
CrazYoshi fd991bd1a4 Ebusd integration (#19607)
* ebusd component and sensor splitted

ebusd component and sensor splitted and tested

* houndci-bot fixes

* pep8 validated

* Update requirements_all.txt

* travis fixes

* Fix __init__.py for travis

* translation updated

* proposed changed

* move logic from component to ebusdpy lib

* hound fixes

* Update requirements_all.txt

* update pypi library to V0.0.11

* error management in command_result

Avoid sensor status change in case an error in reading occurs

* add opMode translations

add opMode translations

* send type to read ebusdpy API

* timeframe as attribute for time schedule type sensors

* hound fix

* bugfix on library

* ebusd sensor moved to ebusd component directory

* update ebusdpy dependency

* improvement proposed

* travis fix

* update error managing

* insert log debug start setup

* changes requested

* exception tuple on init

* cla-bot stucked pull

* added bai circuit support

* merged coveragerc from dev

* configuration get change
2019-02-10 13:04:18 -08:00
On Freund d8993af548 CoolMasterNet Climate platform (#20787)
* CoolMasterNet Climate platform

* Address Coolmaster PR comments

* Fix docstrings on climate demo platform

* Additional CoolMaster PR review fixes
2019-02-10 19:34:39 +01:00
Markus Ressel 542f024356 XS1 component (#19115)
* added xs1 main component
added implementations for switch, sensor, climate and binary_sensor

* updated code
fixed styling
added comments
removed binary_sensor (wasn't working)

* ran "gen_requirements_all.py" script

* fixed linting issues

* added config options for port and ssl
small fixes

* use already defined config constants instead of defining new ones

* avoid passing in hass to the entity

* use async keyword and proper asyncio calls
limit updates with a global lock to prevent overwhelming the gateway with concurrent requests
change info logger calls to debug

* update dependency

* removed unneeded constant

* fix lint issues

* updated requirements

* removed unused imports

* fixed some flake8 errors

* fixed some flake8 errors

* changed imports to absolute paths

* fixed some lint errors

* fixed some lint errors

* fix update of attached sensor

* reordered imports
added config defaults
check if platform is available
changed docstring

* lint fix

* review fixes

* isort

* import fix

* review fix

* review fix

* review fix

* removed unused imports

* lint fix

* lint fix

* climate fix
exclude sensors that will be used in climate component from default sensor category

* .coveragerc fix

* lint fix

* moved platform to it's own package
2019-02-07 23:21:41 +01:00
Timmo 968f98706e GitHub Sensor (#19561)
*  Add GitHub sensor

* 👕 fix tox lint warning

* 🔨 Add GitHub to .coveragerc

* 👕 Fix pylint warning

* 🔨 Use config.get

* 🔥 Tighten validation

* 👕 fix linter error

* 🔨 Add path for context in errors

*  Add releases

*  Add GitHub Enterprise server support

* 🔨 remove unused constant

* 🔨 Requested changes

* 🔨 Reorder imports

* 🔨 Change to CONF_URL

* 🔨 Add docstring

* 🔨 Add validation for repo list

* ⬆️ Update PyGithub to 1.43.5

* 🔨 Sort attributes

* 🔥 Fix validation

* 👕 Fix linting issue

* 🔨 Fail platform setup when data init fails with bad credentials etc

* 👕 Fix whitespace lint error

* 🔨 Fix requirements_all version

* 👕 Linter fix attempt

* 🔥 Missing bracket

* 🔥 Another attempt to at a linter fix

* 🔥 Fix indentation

* 🔨 Reduce exception down to main one

* 🔥 Remove update throttle logic

* 🔨 Reduce calls

* 👕 Remove unused imports

* 🔥 🔨 Reduce attribute data

* 👕 Remove unused json import

* 🔨 Remove username and password

* 🔥 Fix counts

* 🔨 Update attrs and add any missing

* 🔨 Add unique_id

* 🔥 Convert uuid to string

* 🔥 Replace UUID with repository path

* 🔨 Cleanup

* 🔨 Cleanup

* 🔥 Remove unused variable

* 🔨 Change to update instead of _update

* 🔨 Improved consistency

* 🔨 Improve consistency

* 👕 Fix line lengths

* 🔨 Fix length

* 🔨 Fix syntax
2019-02-07 18:34:27 +01:00
David F. Mulcahey e6cd04d711
ZHA component rewrite (#20434)
* rebase reorg

* update coveragerc for now

* sensor cleanup

* remove availability tracking for entities

* finish removing changes from tests

* review comments pass 1

* use asyncio.gather - review comments

* review comments

* cleanup - review comments

* review comments

* review comments

* cleanup

* cleanup - review comments

* review comments

* review comments

* use signal for removal

* correct comment

* remove entities from gateway

* remove dead module

* remove accidently committed file

* use named tuple - review comments

* squash bugs

* squash bugs

* add light and sensor back to coveragerc until % is higher
2019-02-06 13:33:21 -05:00
Paulus Schoutsen b8cc547fa3
Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00
Rohan Kapoor a3c8439ce2
Split out speedtest into a component and a sensor platform (#20527)
* Move sensor.speedtest to the new speedtestdotnet component.

* Split out speedtest.net into a component and sensor platform

* Remove the throttle and add async_track_time_interval

* Add should_poll and cleanup

* Update requirements_all.txt

* Move time interval tracking out of the data class and into the setup method

* Add now=None argument to update
2019-02-04 00:47:04 -08:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00
Rohan Kapoor fcccf133ba
Split out fastdotcom into a component and a sensor platform (#20341)
* Split out fastdotcom into a component and a sensor platform

* Update .coveragerc

* Switching to async and using a Throttle

* Add the async_track_time_interval call

* Remove the throttle

* Reorder sensor methods and add should_poll property
2019-02-01 21:50:22 -08:00
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Joakim Sørensen 632b2042e4 Split googlehome to a component with device tracker platform (#19971)
* Add component for googlehome

* Add missing name in CODEOWNERS

* Linting issues

* googledevices version bump

* Use NAME from component instead of DOMAIN

* Cleaner handling of accepted devices in for loop

* Fixes one linting issue

* Validate device_types

* Fixes one linting issue

* Fixes linting issue

* Revert 0abb642 and import DOMAIN as GOOGLEHOME_DOMAIN

* Return false if discovery_info is None

* Combine if's in for loop

* Use async_load_platfrom

* Fix line length

* Add error message to user

* Shorter log message

* error -> warning, remove period

* Update .coveragerc

* Move to correct place
2019-01-31 21:16:31 +01:00
David F. Mulcahey ed75549123
ZHA component rewrite part 4 - add device module (#20469)
* add device module

* spelling

* review comments

* filter out endpoint id 0 (ZDO)

* review comments

* change name

* remove return
2019-01-30 16:44:22 -05:00
Gido 542160fc56 Add sensor platform for Rova Garbage Collection (#18868)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Added Rova platform to retrieve garbage pickup times

* Update async to new syntax
Added async_update to sensor class
Added Throttle to Rova update function
Minor code style changes

* Small style fixes

* Removed domain

* Update debug to error messages
Change CONF_MONITORED_VARIABLES to CONF_MONITORED_CONDITIONS
Update async update call to normal update

* Update requirements to rova v0.0.2
Add address check to see if ROVA collects in the given area

* Rename entity names to English
Add json_key to Sensor entities

* Add device_class to the RovaSensor

* Fix pylint and flake8 messages

* Add check for None in case collection date is unknown

* Return device class constant
2019-01-30 21:58:41 +01:00
MatteGary e95c50c742 New Transmission component (#19230)
* New Transmission component and interaction

First commit for New Transmission component and interaction

* Fix commit

* Fix commit

* Fix + Switch checkin

Fix according to failed build and request, first checkin for Turtle Mode Switch in Transmission, still have to figure it out why it's not working.

* Bugfixing

* Fix commit

Multiple fix

* Fix

* fix for missing config

* Update on requirements_all.txt

* Fix in requirements_all.txt

* Fix

* Fix for build

* fix

* Fix

* Fix (again)

* Fix

* Fix indentation

* Fix indentation

* Fix Throttle

* Update .coveragerc

* Fix import and coveragerc
2019-01-29 10:27:26 +01:00
Stealth Hacker 6ff4ea1126 Add Recollect Waste (#20121)
* Added Recollect Waste Curbside Collection sensor for tracking next collection date and for which types of waste.

* Added missing schema attributes.

* Adding requirements and coverage entries for Recollect Waste platform.

* Added exception handling, some other fixes and suggestions from code review.

* Fixed reference to incorrect exception type.

* Updated requirements_all.txt with new version of recollect-waste.

* Added true to add_entities. Created constant for default time interval. Used different pylint exclusion comment.

* Using HA's CONF_SCAN_INTERVAL now. Unique_id is now set in @property.

* Changed parameter of timedelta from seconds to days.

* Added test run of recollect client during setup_platform. Using built in SCAN_INTERVAL now.

* Return nothing in setup_platform if there is an exception.
2019-01-29 09:38:01 +01:00
Julien Brochet 6859d5216e Add Synology SRM device tracker (#20320) 2019-01-29 09:12:10 +01:00
Aaron Bach 2c7060896b Make Ambient PWS async and cloud-push (#20332)
* Moving existing sensor file

* Initial functionality in place

* Added test for config flow

* Updated coverage and CODEOWNERS

* Linting

* Linting

* Member comments

* Hound

* Moving socket disconnect on HASS stop

* Member comments

* Removed unnecessary dispatcher call

* Config entry fix

* Added support in config flow for good accounts with no devices

* Hound

* Updated comment

* Member comments

* Stale docstrings

* Stale docstring
2019-01-28 15:35:39 -08:00
Eliseo Martelli 3d4f2926e9 Add Iliad Italy (Mobile Telephony Provider) Sensor (#19645)
* working state

* Attrs

* > requirements generated

* linting

* fixes

* coveragerc

* ordered imports and fixed auth

* Added Throttle

* moved throttle to decorator

* remove scan interval

* lower throttle

* moved to scan interval

* Add attribution
2019-01-27 21:44:19 +01:00
Heine Furubotten 7412d0f97c Add nilu air_quality platform (#19674)
* Add nilu air_pollutants platform

* Code Review - validation, DRYs, rm state override, new attr
- Repeated code moved to own method.
- Removed override of state property.
- New attr for showing nilu pollution recommendations.
- More validation of stations input.
- Minor fixes and typos.

* Removed unused prop

* Check for none result from client before entity add

* Moved platform to air_quality component

* Updated outdated docstrings

* Minor changes
2019-01-27 21:32:23 +01:00
Rohan Kapoor 7368c623d4 Split out dovado to a component and sensor platform (#20339)
* Split out dovado to a component and sensor platform

* Lint

* Address code review comments (#20339)

* Switch to using a notify platform for dovado SMS (#20339)

* Optimizing imports

* Remove return on `setup_platform`.

* Clean up unneeded constants
2019-01-27 10:36:10 +01:00
David F. Mulcahey 05d41bc0ee
introduce gateway (#20460) 2019-01-26 13:28:13 -05:00
David F. Mulcahey a0b93c2add
ZHA component rewrite part 1 (#20456)
* rearrange files

* add init to module

* update imports

* update coveragerc

* put blank line back... git raw view be damned
2019-01-26 08:54:49 -05:00
Jc2k cea2bf94bd Move homekit_controller entity types under homekit_controller platform (#20376)
* Move homekit_controller entity types under homekit_controller platform

* Update coveragerc as homekit_controller moved
2019-01-25 07:43:01 -08:00
Jonas Pedersen c6cee1ccd3 Add Danfoss Air HRV support (#20138)
* Add support for Danfoss Air HRV systems.

* Correct lint errors after initial commit of Danfoss Air HRV support.

* A couple of lint fixes for danfoss_air.

* Refactor to comply with HA standards.

* Style fix.

* Use wildcard for danfoss_air in .coveragerc.

* Remove config example from header documentation.
Correct import name for platforms.
2019-01-23 11:58:45 -05:00
Mateusz Korniak 9b7780edf0 Ecoal (esterownik.pl) static fuel boiler and pump controller (#18480) - matkor
* Starting work on ecoal boiler controller iface.

* Sending some values/states to controller.

* Basic status parsing, and simple settings.

* Platform configuration.

* Temp sensors seems be working.

* Switch from separate h/m/s to datetime.

* Vocabulary updates.

* secondary_central_heating_pump -> central_heating_pump2

* Pumps as switches.

* Optional enabling pumps via config.

* requests==2.20.1 added to REQUIREMENTS.

* Optional enabling temp sensors from configuration yaml.

* autopep8, black, pylint.

* flake8.

* pydocstyle

* All style checkers again.

* requests==2.20.1 required by  homeassistant.components.sensor.ecoal_boiler.

* Verify / set switches in update().
Code cleanup.

* script/lint + travis issues.

* Cleanup, imperative mood.

* pylint, travis.

* Updated .coveragerc.

* Using configuration consts from homeassistant.const

* typo.

* Replace global ECOAL_CONTR with hass.data[DATA_ECOAL_BOILER].
Remove requests from REQUIREMENTS.

* Killed .update()/reread_update() in Entities __init__()s.
Removed debug/comments.

* Removed debug/comments.

* script/lint fixes.

* script/gen_requirements_all.py run.

* Travis fixes.

* Configuration now validated.

* Split controller code to separate package.

* Replace in module docs with link to https://home-assistant.io .

* Correct component module path in .coveragerc.
More vals from  const.py.
Use dict[key] for required config keys.
Check if credentials are correct during component setup.
Renamed add_devices to add_entities.

* Sensor/switch depends on ecoal_boiler component.
EcoalSwitch inherits from SwitchDevice.
Killed same as default should_poll().
Remove not neede schedule_update_ha_state() calls from turn_on/off.

* lint fixes.

* Move sensors/switches configuration to component setup.

* Lint fixes.

* Invalidating ecoal iface cache instead of force read in turn_on/off().

* Fail component setup before adding any platform entities.
Kill NOTE.

* Disallow setting entity names from config file, use code defined default names.

* Rework configuration file to use monitored_conditions like in rainmachine component.

* Killed pylint exception.
Log error when connection to controller fails.

* A few fixes.

* Linted.
2019-01-22 08:14:27 -05:00
Mattias Welponer 89ba374d51 HomematicIP add cover FROLL and BROLL devices (#19794)
* Add cover FROLL and BROLL devices

* Fix import

* Fix async calls

* Update cover functions and async fixes

* Update test

* Cleanup code

* Update header

* Merge imports

* Update

* Remove init

* Update coveragerc file

* Update coveragerc
2019-01-22 09:22:45 +01:00
Jon Caruana 9482a6303d Add EverLights light component (#19817)
* EverLights light integration. Supports single color (with color and brightness parameters) or saved pattern (with effect parameter).

* Fix pylint parameter name warning.

* Code review feedback.

* Add tests for the two helper functions of EverLights component.

* Fixes for review feedback.

* Change test style.

* Style fixes for hound.
2019-01-21 04:23:36 +01:00
zhujisheng 81a5208762 Add platform image_processing.qrcode (#20215)
* Add platform image_processing.qrcode

* Update qrcode.py
2019-01-18 13:40:49 +01:00
Rohan Kapoor 2de6a94506 Embed zoneminder platforms into component (#20182) 2019-01-17 11:13:15 +01:00
Rohan Kapoor 48127cade0 Embed mailgun platform into component (#20147)
* Embed mailgun platform into component

* #20147: Update .coveragerc

* #20147 update requirements.txt
2019-01-16 10:01:08 -08:00
Aaron Bach af2949f85f
Embed OpenUV platforms into the component (#20072)
* Embed OpenUV platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:44:00 -07:00
Aaron Bach b3886820b4
Embed SimpliSafe platforms into the component (#20069)
* Embed SimpliSafe platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:42:48 -07:00
Aaron Bach d717d9f6be
Embed RainMachine platforms into the component (#20066)
* Embed RainMachine platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:42:21 -07:00
Otto Winter f225570980 Move ESPHome Source Files (#20092)
* Move ESPHome source files

* Update .coveragerc

* Update CODEOWNERS
2019-01-14 09:00:48 -07:00
Spencer Oberstadt 7db28d3d91 Add Roku hub and remote (#17548)
* add roku remote component

* remove name config (for now)

* update coveragerc and requirements_all

* fix linting errors

* remove extra requirements entry

* fix flake8 errors

* remove some references to apple tv

* remove redundant REQUIREMENTS

* Update requirements_all.txt

* Pass hass_config to load_platform

* don't expose registry constant

* remove unnecessary registry list

* use await instead of add_job

* use ensure_list

* fix code style

* some review fixes

* code style fixes

* stop using async

* use add with update

* fix whitespace

* remove I/O from init loop

* move import
2019-01-14 08:44:30 +01:00
Rohan Kapoor 7f3871028d Split out gpslogger into a separate component and platform (#20044)
* Split out gpslogger into a separate component and platform

* Lint

* Lint

* Increase test coverage
2019-01-14 01:09:47 +01:00
David F. Mulcahey ba21608042 Repackage ZHA component (#19989)
* move files

* rename files

* rename files

* move files

* relative import

* update coveragerc
2019-01-11 20:34:48 -08:00
pbalogh77 7dac7b9e5e Support for multiple Fibaro gateways (#19705)
* Preparing for transition to config flow

Added multiple gateway support
Reworked parameter flow to platforms to enable multiple controllers
Breaking change to config, now a list of gateways is expected instead of a single config

* Updated coveragerc

Added new location of fibaro component

* Fixes based on code review and extended logging

Addressed issues raised by code review
Added extended debug logging to get better reports from users if the device type mapping is not perfect

* Changhes based on code review

Changes to how configuration is read and schemas
Fix to device type mapping logic

* simplified reading config

* oops

oops

* grr

grr

* change based on code review

* changes based on code review

changes based on code review
2019-01-11 15:29:54 -08:00
David F. Mulcahey 7be015fcc6 Add services and helper functions to support a config panel for ZHA (#19664)
* reconfigure zha device service

add log line to reconfigure service for consistency

* add entity functions to support new services

* added new services and web socket api and split them into their own module

* support manufacturer code

logging to debug

get safe value for manufacturer

* update services.yaml

* add comma back

* update coveragerc

* remove blank line

* fix type

* api cleanup - review comments

* move static method to helpers - review comment

* convert reconfigure service to websocket command - review comment

* change path

* fix attribute
2019-01-11 11:34:29 -08:00
Eliseo Martelli 3a5ba77e04 Rename air pollutants to air quality (#19448)
* mv component folder

* moved in airquality

* changed names in files

* renamed test init

* renamed test air quality

* renamed in tests

* renamed coverage

* fixed naming

* corrected attr names

* changed attr names
2019-01-05 11:42:36 -05:00
Dan Cinnamon dbb3802b4e Move envisalink component to package and add services.yaml (#19731)
* Moved component to a package and added a services.yaml file.

* Fixing coverage issue and grammar issue on the services.yaml file.

* Fixed typo in the services.yaml file.
2019-01-04 09:57:32 -05:00
Robin ff80fc347b Fix london_underground issue (#19642)
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
2018-12-31 06:24:52 -08:00
Michael Dubno 4b541f4058 Add IDTECK proximity card component (#18309)
* Added IDTECK proximity card sensor component.

* Moved from sensor to platform

* Made requested standards changes
2018-12-30 20:15:45 -08:00
Markus Ressel 9aa6037219 Add RaspyRFM switch platform (#19130)
* added components and requirement

* change config to allow the definition of multiple switches without redefining the gateway

* dont assume false state
fix default value

* added exclude to coveragerc

* sorted imports

* review fixes

* review fixes

* bugfix
review fixes

* review fix
2018-12-29 16:40:03 -08:00
Andre Lengwenus f09cea1499 LCN component and light platform (#18621)
* Initial commit of LCN component and light platform

* Corrected pre-review comments

* Fixed dimming behaviour in combination with transitions for lcn lights

* Removed unused logger

* Combined __init__.py and core.py into lcn.py component. Bumped to pypck==0.5.6

* Fixed .coveragerc

* Bumped to pypck==0.5.7

* Bump to pypck==0.5.8

* Fixed requirements_all.txt

* Moved unique generation of connection names to config schema's validator

* Minor changes due to review comments.
Bump to pypck==0.5.9.

* Address_connection is passed into LcnDevice

* Set should_poll property on LcnDevice to return False

* Moved platform config validation to component. Load platform using discovery helper

* Furtehr changes due to the review

* Light configuration is set required as there are no other platforms up to now
2018-12-28 03:39:06 -08:00
SNoof85 699a38de52 Add Freebox component with sensors and device tracker (#18472)
* Add freebox component with sensor and device tracker

* script/gen_requirements_all passed and pylint fixes

* Fix docstring in wrong place

* Fix indentation

* Lint fixes

* More lint fixes

* Lint fixes again

* Pylint fixes

* Bump aiopyfreebox version

* Close freebox connection on HA Stop

* Fixed docstring

* Fixed ident

* Lint fixes

* Fix cloing session when HA stop

* Fix URL

* Fix URL

* Fix double look up in discovery datas

* Fix logging level

* Fix get_device_name

Thx for the hint Martin

* Fix async_update_info

* Update requirements_all.txt
2018-12-27 15:26:09 -08:00
Max Rydahl Andersen b32e6fe0d5 Add AfterShip sensor for packages (#18034)
* Add AfterShip sensor for packages

Why:

 * I receive a lot of packages from many different shipping companies.
 * I would like to see in haas how many packages are being delivered.

This change addreses the need by:

 * Adding a sensor for AfterShip (aftership.com)
 * AfterShip supports ~490 couriers world wide thus should cover
   almost any sensible tracking.

Notes:
  - For now this sensor assumes you somehow have added trackings to
    aftership manually.
  - Future idea is to expose service that allows adding a tracking
    based on incoming mails.
  - Other improvments would be to add map markers for package locations.

Related:
- https://community.home-assistant.io/t/package-tracking/858
- https://community.home-assistant.io/t/aftership-package-tracking/24068
- https://community.home-assistant.io/t/aftership-shipment-tracking-platform/14074
- https://community.home-assistant.io/t/aftership-state-card/57912

* Fix typo and update ordering
2018-12-27 10:01:57 -08:00
Michael Dubno 6f9943787a Pencom (#19369)
* Added Pencom relay switch.

* Added Pencom relay switch.

* Cleaned up for submission.

* Fixed attribute keys. Switched to add_entities.
2018-12-26 08:49:34 +01:00
Michael Dubno 30841ef4da Add Lutron Homeworks component (#18311)
* Added Lutron Homeworks components.

* Made all requested changes other than config.

* Removed commented out code.

* Removed binary_sensor.
Implemented new signal/events for button presses.
Cleaned up some data passing.

* Fixed minor formatting.

* Got rid of unused config stuff.
Reordered imports.

* Missed removing vol, and forgot an extra line.

* More requested changes
Removed HomeworksController, it wasn't needed.

* Removed stale code.

* Imperative doc change.
2018-12-21 18:11:00 -05:00
Gido 258fe1f09b Add sensor platform for SolarEdge Monitoring API (#18846)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Update solaredge to pass lint and flake8

* Added solaredge.py to .coveragerc

* Added extend for Voluptuous schema

* Fixed styling issues

* Removed rova.py for later feature

* Replaced API requests with python pip package

* Fixed styling issues

* Updated to new async syntax
Added async_update to sensor class
Added Throttle to SolarEdge data update
Added CONF_NAME to platform settings
Added credentials check for api
Minor code style changes

* Remove unnecessary debug logging

* Updated dict keys

* Added SCAN_INTERVAL
Updated platform setup

* Remove DOMAIN variable
Correct import for PLATFORM_SCHEMA

* Change some debug to error messages
Correct return statements
Remove initial update call

* Fix pylint and flake8 errors
2018-12-19 09:56:45 +01:00
Eliseo Martelli 51e6371991 Add Prezzibenzina (Italian Fuel Price) Sensor (#19297)
* complete(?)

* fixed linting

* update requirements

* added to coveragerc

* fixed linting

* added ability to set custom name

* fixed linting

* added filter

* spacing

* Added list of possible fuels

* Minor updates
2018-12-18 15:47:38 +01:00
Fabian Affolter 9c8e10936b
Add openSenseMap air pollutants platform (#19357)
* Add openSenseMap air pollutants platform

* Fix issues (Docstring, log entries and check)

* Use SCAN_INTERVAL and name handling
2018-12-18 09:15:07 +01:00
Eliseo Martelli 6e26713184 Add GTT Sensor (#18449)
* added gtt sensor

* removed trailing space

* updated requirements_all

* fixed two errors in the code style

* fixed imperative in docstring

* disabled pylint false positive

* fixed description on top of the file

* added files to .coveragerc

* fixes

* linting

* fixed linting 👍

* left a trailing space, now it's gone.

* fix
2018-12-17 18:03:34 -05:00
Otto Winter a08bab7b18 Add native ESPHome API component (#19334)
* Create esphomelib component

* Update requirements

* Remove python 2 string literals

* MVP

* Remove config flow

* Remove config flow translations

* Use dispatcher more

* Use data classes

* Type Hints

* Cleanup on remove

* Use helper and cleanup

* Fix HA stop listener cleanup

* Add config flow

* Fix SyntaxError for Py3.5

* Update

* Lint

* Re-do tests

*  Rename to ESPHome

* Better error message for resolve errors

* Fix tests when aioesphomeapi not installed

* Refactor mock

* Update requirements

* Add strings.json

* 🍵 100% config flow  test coverage
2018-12-17 01:29:32 +01:00
Fredrik Erlandsson 5a295ad42b Add config flow for Daikin (#19182)
* config flow for daikin

* tox test

* return fixes

* tox test fixes

* tox formatting
2018-12-16 16:19:18 +01:00
Christian Biamont c26c8affc7 Add Brottsplatskartan sensor (#19018)
* Added brottsplatskartan sensor

* Update brottsplatskartan sensor

* Remove redundant configuration checks.
* Set attributes during initialization.
* Setup brottsplatskartan module in setup_platform().
* Just do a simple return, no need for returning false.

* Remove file that was used during testing

* Better variable name and remove excessive newline.

* More updates to brottsplatskartan

* Import uuid at the top of the module.
* Use sensor as domain.
* Don't fire custom events.
* Remove period from logging message.

* Adding validation for area parameter

* Validate empty area configuration

* Fixing indentation.

* Fixing the config schema
2018-12-16 12:21:07 +01:00
tmd224 d60b7d46b7 Add Ambient Weather PWS Sensor component (#18551)
* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Fixing bug, things are working well now

* removing nosetests file

* Adding changes as requested in pull request #18551

* Updating with more change requests from PR code review

* Removing SCAN_INTERVAL from PLATFORM_SCHEMA

* Removing unused import

* Adding platform schema validation for monitored_conditions and conf_units

* Updating link to documentation in doc-string.  File already named in doc repo

* Only setup platform if component can successfully communicate with API

* Inverting check for platform setup success
2018-12-14 23:53:49 +01:00
Colin Harrington 9c62149b00 Adding support for Plum Lightpad (#16576)
* Adding basic Plum Lightpad support - https://plumlife.com/

* Used Const values
is_on is a bool

* Added LightpadPowerMeter Sensor to the plum_lightpad platform

* Moved to async setup, Introduced a PlumManager, events, subscription, Light and Power meter working

* Added PlumMotionSensor

* Added Glow Ring support

* Updated plum library and re-normalized

* set the glow-ring's icon

* Naming the glow ring

* Formatting and linting

* Cleaned up a number of linting issues.  Left a number of documentation warnings

* setup_platform migrated to async_setup_platform Plum discovery run as a job

* bumped plumlightpad version

* On shutdown disconnect the telnet session from each plum lightpad

* Cleanup & formatting. Worked on parallell cloud update

* Moved setup from async to non-async

* Utilize async_call_later from the helpers

* Cleanedup and linted, down to documentation & one #TODO

* Remove commented out debug lines

* Fixed Linting issues

* Remove TODO

* Updated comments & fixed Linting issues

* Added plumlightpad to requirements_all.txt

* Fixing imports with isort

* Added components to .coveragerc

* Added PLUM_DATA constant for accessing hass.data[PLUM_DATA]

* used dictionary syntax vs get(...) for config

* Linting needed an additonal line

* Fully async_setup now. removed @callback utilize bus events for detecting new devices found.

* Upgraded to plumlightpad 0.0.10

* Removed extra unused PLATFORM_SCHEMA declarations

* Moved listener attachment to `async_added_to_hass` and removed unused properties & device_state_attributes

* Utilized Discovery when devices were located

* Linting and cleanup

* used `hass.async_create_task` instead of `hass.async_add_job` per Martin

* Removed redundant criteria in if block

* Without discovery info, there is no need to setup

* Better state management and async on/off for Glow Ring

* renamed async_set_config back to set_config, fixed cleanup callback and Plum Initialization

* Fixed flake8 linting issues

* plumlightpad package update

* Add 'motion' device_class to Motion Sensor

* Fixed last known Linting issue

* let homeassistant handle setting the brightness state

* String formatting vs concatenation

* use shared aiohttp session from homeassistant

* Updating to use new formatting style

* looks like @cleanup isn't neccesary

* ditch the serial awaits

* Ensure async_add_entities is only called once per async_setup_platform

* Creating tasks to wait for vs coroutines

* Remove unused white component in the GlowRing

* Used local variables for GlowRing colors & added a setter for the hs_color property to keep the values in sync

* Linted and added docstring

* Update the documentation path to point to the component page

* Removed the extra sensor and binary_sensor platforms as requested. (To be added in later PRs)

* Update plum_lightpad.py

* Update plum_lightpad.py
2018-12-14 14:42:04 +01:00
Thibault Maekelbergh 4a23d4c7d3 Add NMBS (Belgian railway) sensor platform (#18610)
* Add custom component to core

* Add pyrail to reqs

* Format & lint

* Sort nmbs.py into place on coveragerc

* Only set up station live if provided

* Only set up sensor if config is provided

* Fix line too long linting error

* PR Remarks

* Add docstrings

* Fix hound line to long error

* Fix quotes

* Rebase coveragerc

* PR Review

* Init empty attrs

* Dont include delay if there is none

* PR review

* Safer check

* Rebase reqs

* Generate req

* Update homeassistant/components/sensor/nmbs.py

Co-Authored-By: thibmaek <thibault.maekelbergh@iCloud.com>

* PR remarks
2018-12-14 09:52:34 +01:00
Sander Geerts 0fa7186296 Support for the Harman Kardon AVR (#18471)
* Feature: support for the HK AVR

* Remove testcode

* Feature: support for the HK AVR

* Remove testcode

* Added checklist

* Review fixes whitespaces

* Lint fixes

* Review fixes, add current source

* Remove unused imports

* Review fixes; State constants, dict[key]

* More review fixes, Unknown state and Sources

* Review fix; rename devices to entities
2018-12-13 16:31:14 +01:00
David F. Mulcahey 031ee71adf Add ZHA device handler library (#19099)
* event foundation

* implement quirks

* lock zha-quirks version

* allow quirks handling to be toggled on and off

* revert event commit

* disable warning

* update requirements_all

* Remove fix in favor of #19141

#19141 should be what ultimately corrects this issue.

* review comment
2018-12-12 17:06:22 +01:00
Fabian Affolter b2b4712bb7
Remove Instapush notify platform 2018-12-05 21:17:02 +01:00
Fredrik Erlandsson d6a4e106a9 Tellduslive refactoring (#18780)
* move component to a package

* move TelldusLiveEntry to separate file

* refactor

* move entities from a shared container
* using the dispatch helper instead for communication between component and platforms

* updated covereagerc and codeowners

* suggestions from MartinHjelmare

* don't make update async

* "Strip is good!"
2018-12-04 10:08:40 +01:00
James Hilliard 832fa61477 Initial hlk-sw16 relay switch support (#17855)
* Initial hlk-sw16 relay switch support

* remove entity_id and validate relay id's

* Bump hlk-sw16 library version and cleanup component

* refactor hlk-sw16 switch platform loading

* Use voluptuous to coerce relay id to string

* remove force_update for SW16Switch

* Move to callback based hlk-sw16 relay state changes

* fix hlk-sw16 default port and cleanup some unused variables

* Refactor to allow registration of multiple HLK-SW16 device

* Store protocol in instance variable instead of class variable

* remove is_connected

* flake8 style fix

* Move reconnect logic into HLK-SW16 client library

* Cleanup and improve logging

* Load hlk-sw16 platform entities at same time per device

* scope SIGNAL_AVAILABILITY to device_id

* Fixes for connection resume

* move device_client out of switches loop

* Add timeout for commands and keep alive

* remove unused variables
2018-12-03 09:31:53 +01:00
GeoffAtHome eb584a26e2 Add lightwave components for switches and lights (#18026)
* Added lightwave components for switches and lights.

* Address warnings raised by Hound

* Correcting lint messages and major typo. This time tested before commit.

* Trying to fix author

* Minor lint changes

* Attempt to correct other lint error.

* Another lint attempt.

* More lint issues.

* Last two lint errors! Hurrah.

* Changes after review from fabaff.

* Moved device dependent code to PyPi.

* Replaced DEPENDENCIES with REQUIREMENTS

* Updated following code review from Martin Hjelmare.

* Added lightwave to requirements_all.txt

* Omit lightwave from tests.

* Updated requirements_all.txt

* Refactored how lightwave lights and switches load.

* Removed imports that were no longer required.

* Add guard for no discovery_info.

* Make it a guard clause and save indentation. Rename LRFxxx to LWRFxxx.

* Sorted imports to match style guidelines.

* Correct return value.

* Update requirements_all.txt

* Catch case where we have no lights or switches configured.

* Improve configuration validation.
2018-12-02 20:58:31 +01:00
Eliseo Martelli 5c026b1fa2 Added qbittorrent sensor platform (#18618)
* added qbittorrent sensor platform

* Added requirements

* linting

* disabled broad-except

* added noqa

* removed pass statement (left that from development session)

* Added to coveragerc & moved to async

* fixed linting

* fixed indentation

* removed white space

* added await

* Removed generic exception

* removed pylint disable

* added auth checks

* linting

* fixed linting

* fixed error

* should be fixed now

* linting

* ordered imports

* added requested changes

* Update homeassistant/components/sensor/qbittorrent.py

Co-Authored-By: eliseomartelli <martely98@gmail.com>

* Update qbittorrent.py

* Minor changes
2018-11-29 20:40:26 +01:00
David F. Mulcahey 67aa76d295 Refactor ZHA (#18629)
* refactor ZHA

* lint

* review request

* Exclude more zha modules from coverage
2018-11-22 19:00:46 +01:00
Jonathan McDowell 1e3930a447 Add support for Panasonic Blu-Ray players (#18541)
* Add support for Panasonic Blu-Ray players

* Update panasonic_bluray.py

* Update panasonic_bluray.py
2018-11-21 14:22:24 +01:00
Fredrik Erlandsson c1ca7beea1 Support for Point component (#17466)
* Minut Point support

* tox tests for Point

* config flow fixes

* fixes requested by @MartinHjelmare

* swedish translation :)

* fix tests
2018-11-19 12:52:21 +01:00
Aaron Bach 8aa1283adc
Add Rainmachine config entry (#18419)
* Initial stuff

* More work in place

* Starting with tests

* Device registry in place

* Hound

* Linting

* Member comments (including extracting device registry)

* Member comments (plus I forgot cleanup!)

* Hound

* More Hound

* Removed old import

* Adding config entry test to coverage

* Updated strings
2018-11-14 13:23:49 -07:00
pbalogh77 312872961f Initial support for Fibaro HomeCenter hubs (#17891)
* Fibaro HC connection, initial commit

Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.

* Cover, switch, bugfixes

Initial support for covers
Initial support for switches
Bugfixes

* Some cleanup and improved lights

pylint based cleanup
light switches handled properly
light features reported correctly

* Added status updates and actions

Lights, Blinds, Switches are mostly working now

* Code cleanup, fiblary3 req

Fiblary3 is now in pypi, set it as req
Cleanup based on pylint

* Included in .coveragerc and added how to use guide

Included the fibaro component in coveragerc
Added usage instructions to file header

* PyLint inspired fixes

Fixed pylint warnings

* PyLint inspired fixes

PyLint inspired fixes

* updated to fiblary3 0.1.5

* Minor fixes to finally pass pull req

Fixed fiblary3 to work with python 3.5
Updated fiblary3 to 0.1.6
(added energy and batteryLevel dummies)

* module import and flake8 fixes

Finally (hopefully) figured out what lint is complaining about

* Fixed color support for lights, simplified callback

Fixed color support for lights
Simplified callback for updates
Uses updated fiblary3 for color light handling

* Lean and mean refactor

While waiting for a brave reviewer, I've been making the code smaller and easier to understand.

* Minor fixes to please HoundCI

* Removed unused component

Scenes are not implemented yet

* Nicer comments.

* DEVICE_CLASS, ignore plugins, improved mapping

Added support for device class and icons in sensors and binary_sensors
Improved mapping of sensors and added heuristic matching
Added support for hidden devices
Fixed conversion to float in sensors

* Fixed dimming

Fibaro apparently does not need, nor like the extra turnOn commands for dimmers

* flake8

* Cleanup, Light fixes, switch power

Cleanup of the component to separate init from connect, handle connection error better
Improved light handling, especially for RGBW strips and working around Fibaro quirks
Added energy and power reporting to switches

* Missing comment added

Missing comment added to please flake8

* Removed everything but bin.sensors

Stripdown, hoping for a review

* better aligned comments

OMG

* Fixes based on code review

Fixes based on code review

* Implemented stopping

Implemented stopping of StateHandler thread
Cleanup for clarity

* Minor fix

Removed unnecessary list copying

* Nicer wording on shutdown

* Minor changes based on code review

* minor fixes based on code review

* removed extra line break
2018-11-14 20:58:32 +01:00
Levi Govaerts 15c77fe548 Add niko-home-control support (#18019)
* Add niko-home-control support

* Remove the sensor platform

* Minor changes

* Fix docstring
2018-11-12 15:59:52 +01:00
Joakim Sørensen d34c47a9e1 Rename sensor.launch to sensor.launch_library (#18337) 2018-11-09 22:24:26 +01:00
Aaron Bach f971309113
Add support for sensors from Flu Near You (#18136)
* Add support for sensors from Flu Near You

* Added sensor for total reports with symptoms

* Member comments

* Member comments
2018-11-09 08:23:07 -07:00
Brig Lamoreaux 05eac915d1 Srpenergy (#18036)
* Add srp_energy

* Update message on TypeError. Add check for None state.

* Add check for none in history

* Add srpenergy to Test requirements.

* Add srpenergy to requirments.

* Change = to ==.

* Change import for srpenergy

* Fix Flak8 errors

* Add srp to gen requirements script

* Change config name.

* Add daily usage test

* Add test for daily usage.

* Fix Flake8 message.

* Remove blank after docstring.

* Add srpenergy to coverage

* Bump requires version to srpenergy

* Fix type in coverage. Import from Sensor. Use dict.

* Update to 1.0.5. Check credentials on setup. Standalone test.

* Fix formating.

* Remove period. Rename _ variables.

* Fix rebase merge

* Add rebase requirement

* Improve Mock Patching.
2018-11-08 19:19:30 +01:00
horga83 8f107c46fe W800rf32 (#17920)
* Initial commit of w800rf32 component and binary_sensor.

The W800 family is an X10 RF receiver used with keypads and motion sensors etc.

* Initial commit of w800rf32 switch platform.

The W800 family is an X10 RF receiver used with keypads and motion sensors etc.

* Remove unused code.

* Additions for w800rf32 component and platform code

* Fix w800rf32 minor lint issues and make sure gen_requirements.py correctlly adds w800rf32

* Added dispatch_connect/send and refactor somewhat

* Fix missed indentation lint

* Removed shared entity dict and use async_dispatch code

* Fix long line not caught by lint

* One more line too long, missed it

* Remove unused code and changes for async

* Remove  @callback that shouldn't be there.

* Remove switch platform, can't have read only switch.

* Remove unused CONF_DEBUG

* Remove used vars and make CONF_DEVICES required

* Move CONF_OFF_DELAY to platform, only used there
2018-11-08 18:49:00 +01:00
Joakim Sørensen fd2987e551 Add new launch sensor to keep track of space launches. (#18274)
* Add new launch sensor to keep track of space launches.

* Added attribution to Launch Library.

* Adds data class and throtle, reuse aiohttp session.

* Add one extra blank line before the new class..

* Change throttle to simpler SCAN_INTERVAL.

* Remove the usage of the LaunchData class.

* Bump pylaunches, remove . from log, fix line breaker for agency_country_code, remove CONF_ from ATTRIBUTION.
2018-11-08 16:37:11 +01:00
Aaron Bach 954191c385
Add support for 17track.net package sensors (#18038)
* Add support for 17track.net package sensors

* Updated CODEOWNERS

* Addressing comments

* Fixed requirements

* Member comments

* Revert "Member comments"

This reverts commit 61a19d7966.

* Member comments

* Member comments
2018-11-07 22:25:08 -07:00
majuss ec732c896d Add support for Lupusec alarm control panel (#17691)
* Adds support for Lupusec alarm control panel

* fixed various mostly cosmetic issues

* fixed generic type of binary sensors

* fixed some formatting; removed scan interval completely -> defaults now to 2 secs

* removed unused data caches; added check if binary sensor class exists

* cosmetics

* generic type fix

* small fix

* small fixes

* guard clause added

* small fixes
2018-11-07 12:51:12 +01:00
Joakim Sørensen c41ca37a04 Add Norwegian Public Transportation sensor (Ruter). (#18237)
* Add Norwegian Public Transportation sensor (Ruter).

* Corrected typo.

* change stopid to stop_id, actually use attributes, changed logging, corrected link, removed unused variable.

* Change to RuterSensor for the class, and move logic to me more readable.

* Use correct sensor class.

* Add return if blank list, remove else
2018-11-06 19:49:38 +01:00
Joakim Sørensen 2c36b9db1f Add support for Google Home device tracking (#18190)
* Add support for Google Home device tracking.

* Use dict[key] for options.

* Delete googlehome.py.save

* Change stylling of name, and attr mac_address to btle_mac_address, removed unesssesarry attributes copying.
2018-11-06 12:47:53 +01:00
Joakim Sørensen a901c594a9 Add Traccar device tracker (#18200)
* Add Traccar device tracker.

* Updated pytraccar to 0.1.1

* Adds default values for optional options.

* Use dict[key] for options.

* remove logging, duplicate by core
2018-11-05 09:28:02 +01:00
Andrea Tosatto 1c3ef8be55 Implemented tplink_lte components and notify service via SMS (#17111)
* Implemented tplink_lte components and notify service

* Device discovery for the notify component

* Improved the config schema. Small fixes

* Improved login retry mechanism

* Log successful connection only on retries

* Removed CancelledError handlers and small fixes
2018-11-05 02:09:29 +01:00
Joakim Sørensen 610b0b6494 Add Tautulli sensor platform (#17835)
* Adds Tautulli as a sensor platform.

* Remove blank last line.

* Rewrite the platform to comply with review.

* Linting issues.

* Remove tailing newline.

* Corrected typo

* Correcte check_connection, removed wierd defaults, added line in imports, removed unused var, use the correct user list.

* Use dict[key] for required config options.

* Minor changes
2018-11-03 23:47:31 +01:00
Jason Hunter 45484ba569 TensorFlow image_processing component (#17795)
* initial tensorflow image_processing component

* linting fixes

* make displayed attribute a summary of objects

* fix missed merge conflict and add warning supression back in for CPU type

* restructure tensorflow component to install on the fly, remove from Docker

* add both matches and summary as attributes

* address review comments

* do not use deps folder as default, as it should only be managed by HA.  Update to have tensorflow in root config directory
2018-11-02 21:57:03 +01:00
kbickar 6eba7c4ff3 Add binary sensors for sense energy monitor (#17645)
* Added error handling for sense API timeouts

* Moved imports in function

* Moved imports to more appropriate function

* Change exception to custom package version

* Updated sense_energy library to 0.4.2

* Added binary sensors for individual devices

* Whitespace updates

* Split into component, sensors, binary sensors

* Fixed whitespace

* Fixed whitespace

* Moved time constant into sensor file

* Regenerated requirements

* Fixed whitespace

* Updated component dependency

* Fixed whitespace

* Code cleanup

* High and low target temps are also supported if target is supported

* Revert "High and low target temps are also supported if target is supported"

This reverts commit 66b33dc2b8.

* Added all sense components to .coveragerc

* Added check authentication exception

* binary/sensor platforms loaded in setup

* Changed to add all detected devices

* Changed to add all sensors on setup

* Code cleanup

* Whitespace

* Whitespace

* Added sense as requirement for platform

* pylint fixes

* Whitespace

* Switched requirement to dependency

* Made non-class function

* Whitespace

* Removed unneeded checks

* Increased API delay to 60 seconds

* Added guard clause for discovery_info

* Tidy code

* Whitespace
2018-11-02 10:13:14 +01:00
Andy Castille e9ae862fca Update to DoorBirdPy v2 (again) (#14933)
* Update to DoorBirdPy v2

* Move get_schedule_entry to DoorBirdPy, general cleanup

* Update requirements_all.txt

* Requested changes.

* Update requirements post merge.

* Correct call to async_add_executor_job

* Update clear schedule endpoint to be async

* Refactor view and device favorite reset

* Register listeners so events show in GUI

* Add token based authorization

* Update requirements

* Linting issues

* Linting issues

* Linting issues

* Correct logging and inheritance
2018-11-01 21:23:06 +01:00
Jonathan Keljo 19ebdf2cf1 Add a component for GreenEye Monitor (#16378)
* Add a component for GreenEye Monitor

[GreenEye Monitor](http://www.brultech.com/greeneye/) is an energy
monitor that can monitor emergy usage of individual circuits, count pulses
from things like water or gas meters, and monitor temperatures. This component
exposes these various sensors in Home Assistant, for both data tracking and
automation triggering purposes.

* Consolidate sensors

* lint

* .coveragerc

* - cv.ensure_list
- DOMAIN, where appropriate
- defaults to schema
- single invocation of async_load_platform
- async_create_task instead of async_add_job
- fail if no sensors
- monitors required
- async_add_entities
- call add_devices once
- remove unused schema
- use properties rather than set fields
- move _number and unique_id to GEMSensor
- remove unnecessary get(xxx, None)
- keep params on one line when possible
- new-style string format

* Fix `ensure_list` usage, log message

* Pass config through
2018-11-01 10:46:11 +01:00
Robert Svensson a9140dc8f5
deCONZ - retry if setup fails (#17772)
* Make component retry if setup fails
* Improve overall test coverage
2018-10-31 22:38:04 +01:00
mvn23 b12e79e5cf Add opentherm_gw services (#17762)
* Move components/opentherm_gw.py to components/opentherm_gw/__init__.py

* Update requirements-all.txt

* Await set_clock coroutine rather than scheduling it.

* Create task for async_load_platform
2018-10-31 12:33:43 +01:00
Adam Belebczuk eef9246db1 Support for WeMo Humidifier (#17996)
* Fix Vera climate component to use correct states

Changed the Vera climate component so it uses the STATE_* states from the base climate component. This will allow it to work with Google Assistant.

* Wemo Humidifier - Initial Commit

* WeMo Humidifier - First draft of component

* WeMo Humidifier - Removed direct IO from property

* WeMo Humidifier - Trivial comment change

* Added myself as codeowner for WeMo

* WeMo Humidifier - Fixed various syntax & lint issue

* WeMo Humidifier - Small comment addition

* WeMo Humidifier - Fix TypeError: 'WemoHumidifier' object is not iterable

* WeMo Humidifier - Rename set humidity service

* WeMo Humidifier - Add to .coveragerc

* WeMo Humidifier - Fixed lint/pylint issues

* WeMo Humidifier - First round of requested changes

* WeMo Humidifier - Round two of requested changes

* WeMo Humidifier - Third round of requested changes

* WeMo Humidifier - Fixed whitespace issue on dict comprehension

* WeMo Humidifier - Fourth round of requested changes

* WeMo Humidifier - Corrected typo in async_add_executor_job call

* WeMo Humidifier - Fixed spacing before inline comments
2018-10-30 21:19:49 +01:00
Victor Cerutti cb73a8bbb0 Météo-france sensor : current weather and 1 hour rain forecast (#17773)
* 🌧 Meteo France rain forecast

* do not fail on wrong config

* Update name of sensor class

* do not show sensor if not working

* Update .coveragerc

* ability to submit insee location code without final 0 needed by meteo-france

* Lynting

* more lynting

* update comment

* block comment linting

* reducing length of long lines

* linting

* Update météo-france platform

Now work with pypi package and monitored conditions

* remove error log

* Update requirements_all.txt

* Increase scan interval to 5 minutes

* Update meteo_france according to review

* better error handling of location missing some monitored conditions

* fix lint error

* moving error log

Errors are now catched at sensor initialization and state is set when updating the data

* Update updating of sensor
2018-10-29 23:22:47 +01:00
Rohan Kapoor 5024a80d61 Migrate twilio webhooks to the webhook component (#17715)
* Migrate twilio webhooks to the webhook component

* Fix typos in twilio

* Mock out twilio in the tests

* Lint

* Fix regression in twilio response
2018-10-25 09:46:22 +02:00
jxwolstenholme 7be7a8de30 Add device tracking for the BT Smart Hub router (#17158)
* Support for BT smarthub router device tracking

* Update requirements_all.txt for bt_smarthub device tracker

* Added bt_smarthub.py exclusion

* Update .coveragerc

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Fix linting issues

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update .coveragerc

* Update bt_smarthub.py

* Minor changes

* Update bt_smarthub.py

* Update bt_smarthub.py
2018-10-23 18:35:21 +02:00
Rohan Kapoor d5a5695411 Migrate Mailgun to use the webhook component (#17464)
* Switch mailgun to use webhook api

* Generalize webhook_config_entry_flow

* Add tests for webhook_config_entry_flow

* Add tests for mailgun

* Remove old mailgun file from .coveragerc

* Refactor WebhookFlowHandler into config_entry_flow

* Remove test of helper func from IFTTT

* Lint
2018-10-23 11:14:46 +02:00
Richard Patel b2faa67ab7 Add new rtorrent sensor (#17421)
* New rtorrent sensor

* Fix lint issue

* Fix another lint issue

* Fix pylint issue

* how many python linters do you guys use

* Cleanup code

* python linting

* newline
2018-10-21 20:12:51 +02:00
Daniel Høyer Iversen 7e3d0f0700 Remove ryobi from .coveragerc (#17647) 2018-10-21 11:21:09 +02:00
mvn23 7baffed7b7 Add sensor support to opentherm_gw (#17314)
* Add OpenTherm Gateway sensor platform.

* Add OTGW_ variables to list of supported sensors.

* Order imports.

* Add OpenTherm Gateway binary sensor support.

* Revert "Add OpenTherm Gateway binary sensor support."

This reverts commit 115acaa912.

* Import COMP_SENSOR from sensor component rather than defining it.

* Update opentherm_gw sensor platform docs url.

* Update dependency to v0.2b1
Old version had incorrect variable names for some of the sensors

* Update requirements_all.txt

* Address review findings.

* Update .coveragerc
2018-10-19 07:31:19 +02:00
Matthew Garrett e2a1e21c8d Add support for LG soundbars (#17570)
* Add LG soundbar support

We can autodiscover these, so for now let's skip any local configuration.
Currently we expose volume, source and equaliser preset - we can expose the
other volume controls and options as well if necessary, but I don't know
whether it's worth it.

* Add discovery of LG devices

This is a generic discovery type that doesn't obviously contain enough
information to identify whether we're talking to a speaker system or any
other kind of device - on the other hand I haven't been able to find any
other LG devices that respond like this, so we can cross that bridge when
we get to it.

* Lint
2018-10-18 10:39:33 +02:00
Daniel Høyer Iversen a401be9b1b
New climate device (#17313)
* initial version of millheater

* Remove unused imports

* Add some comments

* separate lib

* fix review comments
2018-10-14 20:22:20 +02:00
William Scanlon 6a8eb8d0a1 Moved econet from climate to water heater (#17322)
* Moved econet from climate to water heater

* Updated .coveragerc

* Fixed requirements_all.txt
2018-10-13 23:16:44 +02:00
Keiran S 78e29cd3fa Add AWS Route53 Dynamic DNS support (#17072)
* Add AWS Route53 dynamic DNS support to Home Assistant

* Remove line breaks
2018-10-13 21:03:30 +02:00
Aaron Bach 401e22fc0c Add config entry for SimpliSafe (#17148)
* Initial move into component

* Base functionality in place

* Starting tests in place

* All config entry tests in place

* Made default scan interval more obvious and removed extra logging

* Inherit default scan interval from alarm_control_panel

* Updated coveragerc and CODEOWNERS

* Member-requested changes

* Hound

* Updated requirements

* Updated tests

* Member-requested changes

* Owner-requested changes

* Constant cleanup

* Fixed config flow test

* Owner-requested updates

* Updated requirements

* Using async_will_remove_from_hass

* Corrected scan interval logic

* Fixed tests

* Owner-requested changes

* Additional logging

* Owner-requested changes
2018-10-12 19:07:47 +02:00
Martin Mois cb3d62eeef notify.homematic (#16973)
* Add notify.homematic_signalgen

* Update homematic_signalgen.py, test_homematic_signalgen.py

* Added new files to .coveragerc

* Fixed review comments from houndci-bot

* Fixed pylint errors

* Regenerate requirements_test_all.txt by script/gen_requirements_all.py

* Fix flake8 warnings

* Renamed notify.homematic_signalgen to notify.homematic and made it generic

* Update .coveragerc and requirements_test_all.txt

* Removed the terms signal generator from the sources.
2018-10-12 09:36:52 +02:00
Rohan Kapoor d7cd1a2b4b Implement ZoneMinder run states (#17198) 2018-10-11 09:38:31 +02:00
Colby Rome 419725e1a9 Add Verizon Fios Quantum Gateway device_tracker platform (#17023)
* wrote quantum_gateway.py

* ran gen_requirements script

* fixed linting errors, added docstrings

* update .coveragerc

* fixed typo

* add myself to contributors

* single quotes for single words

* added error handling to prevent stacktrace

* updated my pypi library

* houndci fixes - added RequestException

* added password to config schema
2018-10-10 08:23:31 +02:00
mvn23 fc67f5eef3 Rewrite opentherm_gw to a component (#17133)
* Rewrite opentherm_gw to a component which loads the opentherm_gw climate platform.

* Add OpenTherm Gateway sensor platform.

* Remove library imports from platforms (use hass.data instead)
* Update .coveragerc
* Update docstrings to use new component documentation url

* Add OpenTherm Gateway binary sensor support.
Fix houndci findings.

* Revert "Add OpenTherm Gateway binary sensor support."

This reverts commit 5711dc4c25.

* Revert "Add OpenTherm Gateway sensor platform."

This reverts commit b3505ed561.

* Remove import from platform, use hass.data instead.
Update .coveragerc
Update docstrings
Update requirements_all.txt
General code cleanup

* Fix review findings.
Avoid using hass.data within connect_and_subscribe.
2018-10-09 21:06:24 +02:00
marcolertora 0c34c50d2f Added lumitek/ankuoo recswitch component (#15764)
* Added lumitek/ankuoo recswitch component

* cosmetics

* remove callback

* cosmetics

* update requirements pyrecswitch==1.0.2

* add in .coveragerc
2018-10-09 10:13:03 +02:00
Nick Horvath 1393766659 Thermoworks Smoke Sensor (#16139)
* Add support for monitoring the temperature of a thermoworks smoke thermometer.

* Use string formatting.

* Add line break.

* Add error handling for authentication.

* Fix linting errors.

* Fix quotes.

* Bump thermoworks_smoke library version.

* Review changes for @MartinHjelmare

* Add unique id attribute and change battery attribute to the standard "battery_level".

* requested changes to snake case and monitored conditions

* fix lint error

* exclude firmware from state attrs. rename original_unit to unit_of_min_max so it's more clear what it is for.

* add device_info

* add regex validator for exclude

* undo device info stuff

* remove serial number from attributes even though other components are allowed to have it...

* exclude firmware
2018-10-08 22:15:38 +02:00
Glenn Waters 06a64c0167 Add support for ElkM1 alarm/automation panel (#16952)
* Add support for ElkM1 alarm/automation panel.

* fix lines too long

* Address PR comments

* Fix hound ci errors

* Changes for PR comments

* Use vol.Range for checking range value

* Address PR comments

* Fix lint errors

* Added elkm1-lib requirement

* Update coverage to exclude elk

* Fix flake8 errors

* Fix flake8 error

* Cleanup config parsing

* Add housecode converter

* fix PR comments

* fix syntax error

* Fix PR comment
2018-10-07 21:45:36 +02:00
Florian Klien ce1e8f8ace YesssSMS handling more errors, upgrade to version 0.2.3 (#17052)
* YesssSMS handling more errors, upgrade to version 0.2.1

 - handling missing internet connection nicely
 - disabling login with non-working credentials (website locked account for 1 hour)
 - upgrade to new upstream version of YesssSMS

* notify.yessssms tests

* test requirements

* flake8 fix

* fixing tests, new upstream version 0.2.3

fixing tests based on requested changes, coverage

* removing unmotivated print

* passing exception to ConnectionError and SMSSendingError logger
2018-10-04 17:34:04 -04:00
Heiko Thiery 178bf736f6 Add new component fritzbox binary_sensor (#17057)
* Add new component fritzbox binary_sensor

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix failed flake8 test

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add new file to .coveragerc

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* use wildcard to cover all platforms

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* remove polling because polling is true by default

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add blank line to keep imports ordered

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* Minor changes
2018-10-04 12:16:27 +02:00
Daniel Høyer Iversen 05d8c57212 Tibber component and notify (#17062)
* Refactor tibber, and Tibber notify

* update Tibber lib.

* tibber

* Tibber coveragerc

* Tibber upgrade lib

* style

* comments

* use async_get_service

* event
2018-10-04 09:29:49 +02:00
Diogo Gomes cf0147098a
Merge pull request #16300 from StevenLooman/igd
Adds discovery and config flow
Breaking change: no longer possible to map ports other than the port used by Home Assistant
2018-10-03 22:55:01 +01:00
Kevin Fronczak c78850a983 Overhaul of Blink platform (#16942)
* Using new methods for blink camera

- Refactored blink platform (breaking change)
- Camera needs to be uniquely enabled in config from now on
- Added motion detection enable/disable to camera platform

* Fix motion detection

- bumped blinkpy to 0.8.1
- Added wifi strength sensor

* Added platform schema to sensor

- Added global variables for brand and attribution to main platform

* Removed blink binary sensor

* Add alarm control panel

* Fixed dependency, added alarm_home

* Update requirements

* Fix lint errors

* Updated throttle times

* Add trigger_camera service (replaced snap_picture)

* Add refresh after camera trigger

* Update blinkpy version

* Wait for valid camera response before returning image

- Motion detection now working!

* Updated for new blinkpy 0.9.0

* Add refresh control and other fixes for new blinkpy release

* Add save video service

* Pushing to force bot to update

* Changed based on first review

- Pass blink as BLINK_DATA instead of DOMAIN
- Remove alarm_arm_home from alarm_control_panel
- Re-add discovery with schema for sensors/binar_sensors
- Change motion_detected to a binary_sensor
- Added camera_armed binary sensor
- Update camera device_state_attributes rather than state_attributes

* Moved blink.py to own folder. Added service hints.

* Updated coveragerc to reflect previous change

* Register services with DOMAIN

- Change device add for loop order in binary_sensor

* Fix lint error

* services.async_register -> services.register
2018-10-03 04:17:14 +02:00
Sean Wilson 284d4d49c7 Add AquaLogic component (#16763)
* Add missing ups.status states.

* Add missing DISCHRG state.

* AquaLogic work-in-progress

* - Fix dependencies
- Switch updates

* Add support for aqualogic 0.8 features.

* Remove debugging.

* Switch to async updates rather than using polling.

* Rebase

* Fix lint errors

* Fix lint errors

* Fix lint errors

* Fix lint errors

* Fix lint errors.

* Bump aqualogic version to 0.11

* Update .coveragerc

* Remove integration-specific I/O

* Resolve code review issues.

* Fixed init() call.
2018-10-02 07:32:03 +02:00
cdce8p e5c0e4336d Update coverage to exclude not tested file (#17039) 2018-10-01 14:41:35 +02:00
Steven Looman f511920a04 Merge remote-tracking branch 'upstream/dev' into igd 2018-09-30 20:22:10 +02:00