Commit Graph

925 Commits

Author SHA1 Message Date
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