Commit Graph

734 Commits (113bdc493a89314b0263c67dcfb1ba07942f4935)

Author SHA1 Message Date
Aaron Bach 8bc497ba1d Move RainMachine to component/hub model (#14085)
* Moves RainMachine to component/hub model

* Updated requirements

* Updated coverage

* Hound violations

* Collaborator-requested changes

* Small formatting updates

* Removed references to remote API

* Collaborator-requested changes

* Collaborator-requested changes

* Fixed attribution
2018-04-28 15:46:58 +02:00
Mitko Masarliev f23f9465d3 New sensor domain expiry (#14067)
* domain expiry

* domain expiry

* domain expiry

* scan interval

* change host to domain
2018-04-25 12:33:47 +02:00
Viorel Stirbu 3180c8b0fb Add support for Sensirion SHT31 temperature/humidity sensor (#12952) 2018-04-19 11:37:30 +02:00
Robin 569f5c111f Adds SigFox sensor (#13731)
* Create sigfox.py

* Create test_sigfox.py

* Update .coveragerc

* Fix lints

* Fix logger message string

* More lints

* Address reviewer comments

* edit exception handling

* Update sigfox.py

* Update sigfox.py

* Update sigfox.py

* Update sigfox.py
2018-04-17 13:08:32 +02:00
Heiko Thiery 9487bd455a Add AVM fritzbox smarthome component (#10688)
* initial commit

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

* fix failed flake8 tests

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

* add fritzhome files to .coveragerc

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

* fix wrong module import

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

* remove too general exception

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

* incorporate review comments

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

* remove blank line

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

* fix wrong import

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

* fix issue with operations

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

* incorporate review comments

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

* remove unused attributes

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

* adapt to supported_features

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

* change checking of kwargs to canonical way

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

* remove unused self._state

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

* Don't overwrite the platform domain

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

* Remove parenthesis from import without line break

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

* Do not pass hass to the components on init

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

* Remove check for available in current_operation

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

* Remove redundant logging message

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

* Add blank line between standard and hass imports

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

* Use states from base climate component

Also add the new state STATE_MANUAL to the base.

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

* add reconnect when access failed

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

* add device specific attributes

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

* group the imports from the same module

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

* change domain data to fritz instance

This let us use the fritz instance to reconnect from platform without accessing
protected attributes.

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

* fix typo

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

* rename platform from fritzhome to fritzbox

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

* Add device_state_attributes

Add attributes to have compatiblity to fritzdect.

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

* add support for multiple fritzboxes

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

* fix pylint issues

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

* fixed pyfritzhome version

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

* fix import

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

* fix component name in requirements_all.txt

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

* upgrade pyfritzhome to 0.3.7

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

* rename platform/component also in .coveragerc

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

* use DEFAULT_HOST when no host is in dict

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

* add config schema for dict

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

* remove check

The check since since the config scheme takes case.

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

* add check for empty devices

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

* use standard attribute from base class

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

* remove STATE_MANUAL from operation list

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

* remove set DEFAULT_HOST

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

* don't pass hass to the SwitchDevice

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

* remove unsed DEFAULT_HOST

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

* refactored device attributes

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

* add info output if no fritzbox is configured

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

* small fixes according review comment

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

* remove unneeded default value

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

* remove non required code from try..except block

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

* line break for line that is too long

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

* remove too many empty lines

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
2018-04-17 12:40:36 +02:00
Mohamad Tarbin 99ded8a0a6 Adding USCIS component (#13764)
* Adding USCIS component

* Adding Line after the class DOC

* Update : Extract USCIS logic code to Component

* Update : Extract USCIS logic code to Component

* Adding CURRENT_STATUS

* Change Error handling, remove date from attributes

* Update the Version for USCIS

* Update uscis.py
2018-04-13 21:54:23 -04:00
Matthew Garrett ac2298189e Add support for controlling homekit lights and switches (#13346)
* Add support for controlling homekit lights and switches

This adds support for controlling lights and switches that expose a HomeKit
control interface, avoiding the requirement to implement protocol-specific
components.

* Comment out the homekit requirement

This needs to build native code, so leave it commented for now

* Review updates

* Make HomeKit auto-discovery optional

Add an "enable" argument to the discovery component and add a list of
optional devices types (currently just HomeKit) to discover

* Further review comments

* Update requirements_all.txt

* Fix houndci complaints

* Further review updates

* Final review fixup

* Lint fixups

* Fix discovery tests

* Further review updates
2018-04-13 19:25:35 +02:00
Marco Orovecchia b752ca3bef Rename from aurora light to nanoleaf_aurora (#13831) 2018-04-12 09:24:07 +02:00
Matthew Garrett 8d48164f25 Add support for Eufy bulbs and switches (#13773)
* Add support for Eufy bulbs and switches

Add support for driving bulbs and switches from the Eufy range.

* Fix hound checks

* Satisfy pylint

* Handle review comments

* Review updates and test fixes

* PyLint is a bit too aggressive
2018-04-10 21:38:23 -04:00
Johann Kellerman b01dceaff2
Qwikswitch sensors (#13622) 2018-04-08 21:59:19 +02:00
David Broadfoot bd51143ac1 Added gogogate2 cover (#13467)
* Added gogogate2 cover

* Hound fixes

* PR feedback

* Hound comments

* Bump gogogate2 version

* Update requirements all

* Add device_class and features

* Fix lint issues

* Again lint

* Fix imports

* Fix end of file
2018-04-06 15:53:00 +02:00
Marco Orovecchia 0a25d30ba6 Add support for Nanoleaf Aurora Light Panels (#13456)
* Added support for Nanoleaf Aurora Light Panels

* aurora light module - fixed lint errors

* aurora light module - use SUPPORT_COLOR instead of SUPPORT_RGB_COLOR

* nanoleaf aurora light - support_hs_color instead of rgb

* review comments from armills implemented

* nanoleaf aurora lights - put attributes into constructor (pylint)
2018-04-06 09:34:56 -04:00
Johann Kellerman 1b3c3494e8 Coverage & Codeowners (#13700) 2018-04-05 17:58:55 +02:00
Fabian Affolter 7b3d17bae4
Add mastodon (#13441)
* Add mastodon

* Move login

* Revert "Move login"

This reverts commit 2c8446f629.
2018-03-31 23:20:58 +02:00
Rene Nulsch 3b4faa74a0 Remove MercedesME component (#13538) 2018-03-31 15:10:56 +02:00
Michaël Arnauts 0f24fea6bb Google Maps location sharing device tracker (#12301)
* Google Maps location sharing device tracker.

* Use ConfigType and change debug logging to _LOGGER.debug()

* Update to locationsharinglib 0.3.0

* Remove unneeded lines.

* Use hass.config.path for config file location.

* Fixed remarks

* Return boolean in setup_scanner
2018-03-30 22:47:20 +02:00
Robin df78eecc1b Adds folder_watcher component (#12918)
* Create watchdog_file_watcher.py

* Rename watchdog_file_watcher.py to folder_watcher.py

* Address a number of issues

* Adds filter

* Adds pattern matching

* Adds create_event_handler()

* Update folder_watcher.py

* Adds run_setup()

* Remove stop_watching()

* Adds shutdown()

* Update config to allow patterns on each folder

* Update to patterns from filters

* Adds watchdog

* Fix indents on schema

* Update folder_watcher.py

* Create test_file_watcher.py

* Fix lints

* Add test_invalid_path()

* Adds folder_watcher

* Update test_file_watcher.py

* Update folder_watcher.py

* Simplify config

* Adapt for new config

* Run observer.schedule() on EVENT_HOMEASSISTANT_START

* Amend Watcher removing entity and tidying startup

* Tidy config

* Rename process to on_any_event for consistency

* Rename on_any_event back to process

Using `on_any_event` resulted in 2 events being fired

* Update folder_watcher.py

* Fix return False on setup

* Update test_file_watcher.py

* Update folder_watcher.py

* Adds watchdog

* Undo adding watchdog

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Add event

* Update test_file_watcher.py

* Update .coveragerc

* Update test_file_watcher.py

* Update test_file_watcher.py

* debug + join

* test event

* lint

* lint

* Rename test_file_watcher.py to test_folder_watcher.py

* hound

* Tidy test

* Further refine test

* Adds to test_all

* Fix test for py35

* Change test again

* Update test_folder_watcher.py

* Fix test

* Add watchdog to test

* Update folder_watcher.py

* add watchdog

* Update folder_watcher.py
2018-03-29 18:10:20 -07:00
cgtobi e9cdbe5d8c Add language parameter to darksky sensor (#13297) 2018-03-22 13:34:02 +01:00
Qxlkdr 2bc7e58780 Add trafikverket_weatherstation sensor platform (#12115)
* Create trafikverket_weatherstation.py

Created PR 12111 but due to permission issue I'm creating a new fork and PR.

* Added dot

Added dot to the first (second) row of the file, after the description.

* Corrections based on feedback

Done:
- Run flake8 before this commit
- Fixed invalid variables
- Shortened the xml variable/query via if statement (air_vs_road)
- Moved imports if update() to top of the file
- Imported CONF_API_KEY and CONF_TYPE
- Updated documentation (api_key): home-assistant/home-assistant.github.io#4562

Actions left:
- Error handling
- Request timeout
- Add sensor (file) to .coveragerc

* Multiple corrections

Done:
- Executed pylint and flake8 tests before commit
- Fixed import order
- Implemented request timeout
- Used variable air_vs_road in the return as well

Actions left:
- Error handling
- Add sensor (file) to .coveragerc

* Error handling

Done:
- Error handling for network
- Error handling for JSON response

* Added trafikverket_weatherstation.py

Added trafikverket_weatherstation.py in correct order.

* Road as default

Changed if statement to check for 'road' which means it will always defaulting to 'air' in other cases. Even if it will only accept 'air' and 'road' from the PLATFORM_SCHEMA.

* Updated variable names

Updated variable names to be more understandable as requested by @MartinHjelmare

* Standard Libraries

Grouped Standard Libraries

* Return None

Changed return None to only return as suggested.
2018-03-19 21:38:07 +01:00
nielstron 6b059489a6 Adding a discoverable Samsung Syncthru Printer sensor platform (#13134)
* Added a simple component to support the BLNET

Adds a component based on pyblnet, that hooks up the blnet to home assistant

* Adds support for custimzation of blnet sensor devices

* Setting up blnet as a platfrom

* Updated use of state_attributes

Now the friendly_name (and for digital values the mode) is set in the state_attributes whereas the name is defined as "blnet_(analog|digital)_{sensornumber}" so you can reliably add them to groups.

* Added support for the SyncThru printer web service

* Added pysyncthru to the requirements

* Changed to Dependencis, import inside setup_platform

* Switch back to REQUIREMENTS

Looks like DEPENDENCIES is not meant for python packages but for other HA components

* Fixed access to _attributes

* Final fix

* Several Bugfixes

When the printer goes offline, the last state will be kept.
Also now checks if the printer is reachable upon setup

* Register syncthru as discoverable

* Included possible conditions to monitor

* Split the printer sensor in several seperate sensor entities

* Fixed bug at sensor creation, pep8 conform

* Bugfix

* Bugfix

* Removed Blnet components

* Fixed unused import

* Renamed discoverable to samsung_printer

* Removed unused Attribute _friendly_name

* Inserted missing space

* Pinned requirements and added to coveragerc

* Reduced redundancy by condensing into multiple sub-classes

* Fixed indentation

* Fixed super constructor calls

* Fixed super constructor calls

* Fixed format

* Resolving style issues and using name instead of friendly_name

* Pinned pysyncthru in requirements_all, having trouble with friendly_name

* Iterating over dictionary instead of dict.keys()

* ran gen_reqirements_all.py

* Fixed flake 8 issues

* Added a simple component to support the BLNET

Adds a component based on pyblnet, that hooks up the blnet to home assistant

* Implemented requested changes

* raised dependecies to pysyncthru version that has timeouts

* Raised required version for full timeout support

* Adds support for custimzation of blnet sensor devices

* Setting up blnet as a platfrom

* Updated use of state_attributes

Now the friendly_name (and for digital values the mode) is set in the state_attributes whereas the name is defined as "blnet_(analog|digital)_{sensornumber}" so you can reliably add them to groups.

* Added support for the SyncThru printer web service

* Added pysyncthru to the requirements

* Removed Blnet components

* Pinned requirements and added to coveragerc

* Fixed indentation

* Fixed format

* Pinned pysyncthru in requirements_all, having trouble with friendly_name

* ran gen_reqirements_all.py

* Updated requirements_all

* Renamed sensor objects, removed passing of hass entity

* Removed merge artifacts

* Reset syncthru to newest state

* Updated requirements_all

* switched to using the newest version of pysyncthru

* Sorted coveragerc
2018-03-18 09:26:33 -07:00
maxclaey 022d8fb816 Support for security systems controlled by IFTTT (#12975)
* Add IFTTT alarm control panel

* Update .coveragerc

* Add support for code

* Bugfix

* Fix logging problem

* Pin requirements

* Update requirements_all.txt

* Fix lint errors

* Use ifttt component as a dependency instead of interacting with ifttt manually
Take into account review comments

* No default value for code

* Take into account review comments

* Provide a "push_alarm_state" service to change the state from IFTTT

* Add service description

* Fix @balloob review comments. Thanks!

* Fix service description name
2018-03-18 09:00:08 -07:00
Mattias Welponer b45dad507a Add initial support fo HomematicIP components (#12761)
* Add initial support fo HomematicIP components

* Fix module import

* Update reqirments file as well

* Added HomematicIP files

* Update to homematicip

* Code cleanup based on highligted issues

* Update of reqiremnets file as well

* Fix dispatcher usage

* Rename homematicip to homematicip_cloud
2018-03-18 08:57:53 -07:00
BioSehnsucht 99f7e2bd97 Added Stride notification component (#13221)
* Added Stride notification component

* Fix trailing whitespace in Stride notify

* More whitespace fixes and rogue comment for Stride notify

* More whitespace fixing for Stride notify

* Correcting hanging indents for Stride notify
2018-03-15 20:36:03 -07:00
Fabien Piuzzi 0deef34881 Adding Foobot device sensor (#12417)
* Added Foobot device sensor

* Added error handling tests

* Corrections after PR review.

* Migrated to async/await syntax

 * lint fixes
 * stop raising HomeAssistantError
 * debug log for number of requests

* Moved shared data between sensors from a class attribute to a separate class

* Made test more async-aware

disabled setup error test for now as it's not working

* Working failure scenarios tests
2018-03-15 19:50:58 -07:00
Paulus Schoutsen e2029e3970 Add vesync to coveragerc 2018-03-14 12:05:17 -07:00
Paulus Schoutsen 7e2fc19f5a Sort coveragerc 2018-03-14 11:39:38 -07:00
Otto Winter ca5f470956 Clean up Light Groups (#12962)
* Clean up Light Groups

* Fix tests

* Remove light group from .coveragerc

* async_schedule_update_ha_state called anyway
2018-03-09 06:15:39 -08:00
Paulus Schoutsen 60d7e32f81
Flaky tests (#12931)
* Skip flaky DDWRT tests

* Import APNS before running tests
2018-03-05 14:13:18 -08:00
JC Connell a9d242a213 Add support for Zillow Zestimate sensor (#12597)
* Added Zillow Zestimate sensor.

* Add zestimate.py to .coveragerc

* Fix line 167 81>80

* Incorporate tinloaf changes.

* Saving work

* Incorporate changes requested by MartinHjelmare

* Remove unnecessary import

* Add a blank line between standard library and 3rd party imports
2018-03-03 17:41:33 +01:00
Jeroen ter Heerdt 7a979e9f72 Egardia redesign - generic component and sensor support (#11994)
* Egardia redesign - generic component and sensor support

* Updating .coveragerc and requirements_all

* Fixing linting errors

* Fixing linting errors (again)

* Fixing linting errors

* Responding to review

* Responding to review.

* Updating requirements_all.txt

* Responding to review.

* Responding to review

* Removing unnessesary logging line.

* Responding to review

* Responding to review.

* Fixing copying mistake.

* Responding to review.

* Improving validation.

* Updating package requirement to .38

* Fixing syntax error.

* Updating requirements_all.txt

* Fixing bug handling alarm status.

* Updating requirements_all.txt

* Updating requirements_all.txt

* Changing parsing of configuration.

* Changing code lookup.

* Fixing linting error.
2018-03-02 12:50:00 +01:00
Otto Winter 03970764d8 Add light.group platform (#12229)
* Add grouped_light platform

* 📝 Fix Lint issues

* 🎨 Reformat code with yapf

* A Few changes

*  Python 3.5 magic

* Improvements

Included the comments from #11323

* Fixes

* Updates

* Fixes & Tests

* Fix bad-whitespace

* Domain Config Validation

... by rebasing onto #12592

* Style changes & Improvements

* Lint

* Changes according to Review Comments

* Use blocking light.async_turn_*

* Revert "Use blocking light.async_turn_*"

This reverts commit 9e83198552.

* Update service calls and state reporting

* Add group service call tests

* Remove unused constant.
2018-03-01 17:14:26 -08:00
Paulus Schoutsen 23c39ebefd
Fix flakiness in tests (#12806) 2018-03-01 11:47:56 -08:00
Mike O'Driscoll 3416d3f5f1 TekSavvy Sensor unlimited bandwidth support (#12325)
* Support TekSavvy Unlimited Plans

Support TekSavvy account usage for unlimited plans.
Seeing cap limit to 0 will now provide unlimited behaviour on usage calculations.

* Add unit tests to sensor.teksavvy

Add coverage unit tests to TekSavvy Sensor component, none existing previously.
2018-02-28 16:21:10 -08:00
kbickar 6fe6dcfac9 Added Sense energy monitor sensor (#11580)
* Added Sense energy monitor sensor

* Added missing =

* Style updates

* Added newline, but not blank line at end of file

* Updated sense API to 0.2.2

* Moved import in function

* Fixed tabs

* Updated requirements

* Removed bare except

* Longer update times and more stats

* sense api update

* Updated to use string formatting

* Setup to use monitored_conditions

* Fix syntax

* API update

* blank space fixes

* More blank fixes

* API version update

* Fixed comment format

* removed unneeded function call
2018-02-28 14:29:24 -08:00
Ville Skyttä bbd58d7357 Add UpCloud platform (#12011)
* Add UpCloud platform

* Update upcloud-api to 0.4.1

* Update upcloud-api to 0.4.2

* Convert UpCloud to use Entity, helpers.dispatcher

* Lint
2018-02-28 13:17:12 -08:00
Teemu R 39cee987d9 Add Songpal ("Sony Audio Control API") platform (#12143)
* Add Songpal ("Sony Audio Control API") platform

This adds support for a variety of Sony soundbars and potentially
many more devices using the same API.
See http://vssupport.sony.net/en_ww/device.html for list of
supported devices.

* add songpal requirement

* update coveragerc

* fix linting

* add service description to yaml

* add entity_id

* make pylint also happy.

* raise PlatformNotReady when initialization fails, bump requirement for better exception handling

* use noqa instead of pylint's disable, fix newline error

* use async defs and awaits

* Make linter happy

* Changes based on code review, fix set_sound_setting.

* define set_sound_setting schema on top of the file

* Move initialization back to async_setup_platform

* Fix linting

* Fixes based on code review

* Fix coveragerc ordering
* Do not print out the whole exception trace when failing to update
* Do not bail out when receiving more than one volume control
* Set to unavailable when no volume controls are available
2018-02-27 13:21:56 -08:00
Adam Mills 4242411089 Disable asuswrt tests (#12663) 2018-02-26 22:53:54 -08:00
Robin bf41674e06 Adds simulated sensor (#12539)
* Create simulated.py

* Create test_simulated.py

* Update .coveragerc

* Drop numpy and fix attributes

Drop numpy and fix attributes to be machine readble

* Update test_simulated.py

* Update simulated.py

* Update test_simulated.py

* Update simulated.py

* Update test_simulated.py

* Update simulated.py

* Update simulated.py

* Update test_simulated.py

* Update simulated.py

* Fix default random seed error

* Update simulated.py

* Addresses balloob comments

* Update simulated.py
2018-02-26 00:01:01 -08:00
Paulus Schoutsen 347ba1a2d8
Remove braviatv_psk (#12669) 2018-02-25 11:50:06 -08:00
Mike Megally 63552abce5 Synology Chat as a notification platform (#12596)
* first attempt at synology chat as a notification platform

* quick fix

* houndci and coverage

* Cleanup

Some cleanup of the file

* Ugh underscore

* Use string formatting

* Remove `CONF_NAME`
2018-02-25 14:47:46 +01:00
Gerard 1af65f8f23 Component for Sony Bravia TV with Pre-Shared Key (#12464) 2018-02-22 21:09:52 +00:00
JC Connell 4fdbbc497d Python spotcrime (#12460)
* Added python-spotcrime sensor

* Added python-spotcrime sensor

* Remove accidental included file

* Update indentation to match PEP8

* Remove days from const.py

* Changed default days to 1

* Incorporate changes requested by MartinHjelmare

* Remove unnecessary import and fix lint error
2018-02-21 23:47:15 -08:00
Robin 4d7fb2c7de Adds folder sensor (#12208)
* Adds folder sensor

The state of the sensor is the time that the most recently modified
file in a folder was modified.

* Address lint errors

* Edit docstrings

Makes the recommended edits to docstrings

* Update .coveragerc

Add sensor/folder.py

* Update folder.py

* Address requests

Address requests changes

* Adds folder

* Adds test, tidy up

* Tidy

* Update test_folder.py

* Update folder.py

* Fix setup

Fix setup with else statement

* Update folder.py

* Update folder.py

* Remove list of files from attributes

* Update test_folder.py

* Update folder.py

* Update test_folder.py

* Update folder.py

* Update folder.py
2018-02-21 23:21:07 -08:00
ChristianKuehnel 316eb59de2 Add new component: BMW connected drive (#12277)
* first working version of BMW connected drive sensor

* extended coveragerc

* fixed blank line

* fixed pylint

* major refactoring after major refactoring in bimmer_connected

* Update are now triggered from BMWConnectedDriveVehicle.
* removed polling from sensor and device_tracker
* backend URL is not detected automatically based on current country
* vehicles are discovered automatically
* updates are async now

resolves:
* https://github.com/ChristianKuehnel/bimmer_connected/issues/3
* https://github.com/ChristianKuehnel/bimmer_connected/issues/5

* improved exception handing

* fixed static analysis findings

* fixed review comments from @MartinHjelmare

* improved startup, data is updated right after sensors were created.

* fixed pylint issue

* updated to latest release of the bimmer_connected library

* updated requirements-all.txt

* fixed comments from @MartinHjelmare

* calling self.update from async_add_job

* removed unused attribute "account"
2018-02-20 23:02:08 +01:00
Robin 17bdcac61b Adds filesize component (#12211)
* Create filesize.py

* Update filesize.py

* Updates filesize

Addresses issues raised in review

* Update .coveragerc

* Addresses requested changes

Addresses the changes requested by @baloob.
Additionally the file size in bytes is now available in attributes.

* Create test_filesize.py

This isn't working yet

* Update test_filesize.py

* Update test_filesize.py

* Update test_filesize.py

* Update test_filesize.py

* Update test_filesize.py

* Update test_filesize.py

* fixed valid file test

* Update test_filesize.py

* Fix indentation

Fix incorrect indentation in setup

* Update filesize.py

* Update filesize.py
2018-02-19 23:55:54 -08:00
Henrik Nicolaisen 72fa170265 added smappee component (#11491)
* added smappee component

* Fixed pylint errors and a few use cases when starting up with invalid credentials

Added coverage omit

* Added support to run only locally
Added a few more sensors
Added more error handling

Better parsing and debug message

* fixed smappee switch after local/remote support was added

* Smappee - update switches for local support (#3)

* Merged with local version

* Updated smappy library with the patched one

Fixed lint, added merge missing param

Fixed missing run for requirements_all.txt

Fixed lint

* Fixed on/off based on library. Reverted change used for testing stacktrace

* Fixed switches to work with both remote and local active

Fixed lint

Fixed switches

Fixed lint

* nothing to update per switch as the states are not saved by smappee system

* added better error handling for communication errors with smappee

* fixed lint errors

* fixed comment

* fixed lint error

* fixed lint error

* update smappee module with reviewer comments
- update smappy module
- cache cloud api requests
- added actuator info
- updated return states
2018-02-18 14:34:28 -08:00
Joe Lu a8444b22e7 Support for August doorbell (#11124)
* Add support for August doorbell

* Address PR comment for August platform

* Address PR comment for August binary sensor

* Address PR comment for August camera

* Addressed PR comment for August lock

* - Fixed houndci-bot error

* - Updated configurator description

* - Fixed stale docstring

* Added august module to .coveragerc
2018-02-18 09:24:51 +01:00
Simon Nørager Sørensen dd7bffc28c Add the Xiaomi TV platform. (#12359)
* Added the Xiaomi TV platform.

* Implemented a more efficient default name.

* Fixed a few style errors that slipped past the eye.

* Indicate that state is assumed.
2018-02-16 15:09:20 -08:00
Conrad Juhl Andersen 49c7b422f2 Add Xiaomi Universal IR Remote (Chuangmi IR) (#11891)
* First version of remote xiaomi-miio

* added to coveragerc

* fixed pylint error

* misc fixes and input validation

* address syssi's requests except device and async_service_handler

* forgot to run linter

* implemented async_service_handler

* fixed delay == None, honor timeout given by user, pythonic compare of None

* Added some whitespace for readability, added error message to turn_on and turn_off, fixed services.yaml examples

* fixed pylint errors

* readd pass for readability

* fixed small stuff

* Use RemoteDevice, Make send_command non-async

* Ready code for next version of python-miio (Support for pronto hex codes)

* cast command_optional to int, better input validation, fixed index out of bounds error.

* revert code now in python-miio

* ready for python-miio 0.3.5

* Removed unneccary return statements

* require 0.3.5

* Rebase and update requirements_all.txt
2018-02-06 19:47:24 +01:00
kennedyshead 8fe339d2a8 Tests for samsungtv (#11933)
* Testing samsungtv

* Remove samsungtv from .coveragerc
2018-02-03 13:09:16 -05:00