Commit Graph

976 Commits (28fec209e0ed065e552ca22d32e196128a667e63)

Author SHA1 Message Date
Mister Wil 8132989f91 Skybell (#9681)
* New Skybell platform with components

* Added skybell components to omit.

* Preemptively fixing lint issues (hopefully).

* Removed unused variable.

* Requested changes.

* Additional CRs

* Hopefully the last of the CR's!
2017-10-08 20:14:39 +02:00
Teemu R e19e9a1f2b switch.tplink, light.tplink: bump the pyhs100 version and adapt to api changes (#9454)
* bump the pyhs100 version and fix api changes

* switch.tplink: avoid I/O during __init__

* initialize _name to None in __init__

* update requirements_all.txt for the new version
2017-10-08 17:31:32 +03:00
jbarrancos e9f36a7e45 Merge pull request #2 from jbarrancos/rainbird
Limited to switch on/off
2017-10-06 15:38:37 +02:00
J.J.Barrancos f036bf9353 Limited to switch on/off
Limited to switch on/off
Lowered loglevel
2017-10-06 15:22:22 +02:00
Fabian Affolter 52561d4f7c Move 'voltage' to const (#9621) 2017-09-29 12:05:02 +02:00
Marcelo Moreira de Mello 19932bce53 Introducing support to Melnor RainCloud sprinkler systems (#9287)
*  Introducing support to Melnor RainCloud sprinkler systems

* Make monitored_conditions optional for sub-components

*  Part 1/2 - Modified attributes, added DATA_ constant and using battery helper

* Part 2/2 - Refactored self-update hub

* Fixed change requested:
- Dispatcher signal connection
- Don't send raincloud object via dispatcher_send()
- Honoring the dynamic scan_interval value on track_time_interval()

* Inherents async_added_to_hass() on all device classes

* Makes lint happy

* * Refactored RainCloud code to incorporate suggestions.
  Many thanks to @pvizelli and @martinhjelmare!!

* Removed Entity from RainCloud sensor and fixed docstrings

* Update raincloud.py

* Update raincloud.py

* fix lint
2017-09-29 10:08:41 +02:00
Dan Chen 44838937d1 Change TP-Link Switch power statistics attribute names (#9607) 2017-09-28 14:12:02 -05:00
jbarrancos c95c8a04ef Merge pull request #1 from home-assistant/dev
Update Fork
2017-09-27 16:17:28 +02:00
Johan Bloemberg 515d1bdbd3 Add test cases and fix for device_defaults fire_event option. (#9567)
* Add test cases and fix for device_defaults fire_event option.

* Also for light.

* Change docstring mood.
2017-09-24 15:47:59 -07:00
Mister Wil e2ce1d05ae Fixed bug with all switch devices being excluded (#9555) 2017-09-24 08:22:15 +02:00
Michael Prokop 08b0629eca Fix a bunch of typos (#9545)
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Julius Mittenzwei a5155a2609 renamed add_devices to async_add_devices according to hass naming scheme (second try after failed #9485) (#9505) 2017-09-20 01:15:20 -04:00
Pascal Vizeli 1bbaa00976 Revert "renamed add_devices to async_add_devices according to hass naming scheme (#9485)" (#9503)
This reverts commit a5a970709f.
2017-09-19 19:51:15 +02:00
Julius Mittenzwei a5a970709f renamed add_devices to async_add_devices according to hass naming scheme (#9485)
* renamed add_devices to async_add_devices according to hass naming scheme

* replaced some occurencies of async_add_entites to async_add_devices

* fixed unit test

* fixed unit test
2017-09-19 17:06:52 +02:00
Mister Wil c44397e257 Abode services, events, lights, cameras, automations, quick actions. (#9310)
* Updated to latest AbodePy version. Added services and events. Added new device types. Added exclude, light, and polling config options.

* Disable the event service if polling is enabled.

* Addressed all CR's

* Removed duplicated super call.

* Name config option now used. Removed deprecated DEFAULT_NAME.

* Modified partial to move event to first param.
2017-09-18 17:39:41 +02:00
Marcel Holle 5851944f80 Telnet switch (#8913)
* Added telnet switch.

* Lint.

* Coverage

* Added port parameter to Telnet switch.

* Removed optimistic attribute from Telnet switch.

* Code cleanup.
2017-09-18 17:35:35 +02:00
Andy Castille 5f24cc229d DoorBird Component (#9281)
* DoorBird Component

* add newlines at end of files

* fix lint

* fix doorbird components conventions

* fix doorbird domain import and log strings

* don't redundantly add switches

* Remove return statement from setup_platform
2017-09-17 20:47:30 +02:00
Daniel Høyer Iversen 4126b8bd13 Rename xiaomi #9425 (#9426)
* rename xiaomi to xiaomi_aqara

* rename xiaomi vacuum and xiaomi phillips light to xiaomi miio

* update discovery and tests

* style

* update discovery and tests

* Still use Philips as name
2017-09-14 18:49:03 -04:00
giangvo 3430c1c8bc update broadlink.py to add support for MP1 switch (#9222)
* update broadlink.py to add support for MP1 switch

* fix code styles

* fix code styles

* optimize state fetching on mp1

* fix code styles

* fix code styles

* fix code styles

* fix code styles

* fix variable

* remove default None

* use string.format
2017-09-13 23:41:52 -07:00
Pascal Vizeli 90f9a6bc0a Cleanup and simplitfy the async state update (#9390)
* Cleanup and simplitfy the async state update

* Update test_entity.py
2017-09-12 10:01:03 +02:00
Anders Melchiorsen 160c7fc685 Add HTTP Basic auth to RESTful Switch (#9162)
* Add HTTP Basic auth to RESTful Switch

* Remove redundant hass passing

* Initialize to current state

The state used to be None until the first periodic poll.

This commit refactors async_update so it can be used during setup as well,
allowing the state to start out with the correct value.

* Refactor turn_on/turn_off device communication

* Remove lint

* Fix Travis errors
2017-09-09 10:20:48 -07:00
Julius Mittenzwei 77d0ad1797 Stable and asynchronous KNX library. (#8725)
* First draft of XKNX module for Home-Assistant

* XKNX does now take path of xknx.yaml as parameter

* small fix, telegram_received_callback has different signature

* changed method of registering callbacks of devices

* removed non async command lines from xknx

* telegram_received_cb not needed within HASS module

* updated requirements

* Configuration if XKNX should connect via Routing or Tunneling

* bumping version to 0.6.1

* small fix within xknx plugin

* bumped version

* XKNX-Switches are now BinarySensors and Logic from Sensor was moved to BinarySensor

* renamed Outlet to Switch

* pylint

* configuration of KNX lights via HASS config, yay!

* changed name of attribute

* Added configuration for xknx to switch component

* added support for sensors within hass configuration

* added support for climate within hass configuration

* Thermostat -> Climate

* added configuration support for binary_sensors

* renamed Shutter to Cover

* added configuration support for cover

* restructured file structure according to HASS requirements

* pylint

* pylint

* pylint

* pylint

* pylint

* pylint

* updated version

* pylint

* pylint

* pylint

* added setpoint support for climate devices

* devices are now in a different module

* more asyncio :-)

* pydocstyle

* pydocstyle

* added actions to binary_sensor

* allow more than one automation

* readded requirement

* Modifications suggested by hound

* Modifications suggested by hound

* Modifications suggested by hound

* Modifications suggested by hound

* xknx now imported as local import

* hound *sigh*

* lint

* 'fixed' coverage.

* next try for getting gen_requirements_all.py working

* removed blank line

* XKNX 0.7.1 with logging functionality, replaced some print() calls with _LOGGER

* updated requirements_all.txt

* Fixes issue https://github.com/XKNX/xknx/issues/51

* https://github.com/XKNX/xknx/issues/52 added raw access to KNX bus from HASS component.

* bumped version - 0.7.3 contains some bugfixes

* bumped version - 0.7.3 contains some bugfixes

* setting setpoint within climate device has to be async

* bumped version to 0.7.4

* bumped version

* https://github.com/XKNX/xknx/issues/48 Adding HVAC support.

* pylint suggestions

* Made target temperature and set point required attributes

* renamed value_type to type within sensor configuration

* Issue https://github.com/XKNX/xknx/issues/52 : added filter functionality for not flooding the event bus.

* suggestions by pylint

* Added notify support for knx platform.

* logging error if discovery_info is None.

* review suggestions by @armills

* line too long

* Using discovery_info to notifiy component which devices should be added.

* moved XKNX automation to main level.

* renamed xknx component to knx.

* reverted change within .coveragerc

* changed dependency

* updated docstrings.

* updated version of xknx within requirements_all.txt

* moved requirement to correct position

* renamed configuration attribute

* added @callback-decorator and async_prefix.

* added @callback decorator and async_ prefix to register_callbacks functions

* fixed typo

* pylint suggestions

* added angle position and invert_position and invert_angle to cover.knx

* typo

* bumped version within requirements_all.txt

* bumped version

* Added support for HVAC controller status
2017-09-07 00:11:55 -07:00
upsert c3a91000ac Improved Lutron Caseta shade support (#9302) 2017-09-05 11:30:36 +02:00
emlt 7694c31814 Change attribute names (#9277)
Remove spaces and capitals in attribute names to be consistent with sensors and other switches.
2017-09-03 16:07:12 +02:00
Abílio Costa 0889e38cb1 flux: fix for when stop_time is after midnight (#8932)
* flux: fix for when stop_time is after midnight

* flux: fix imports

* flux: add missing check when now is after midnight

* flux: one more try; should fix all use cases now

* flux switch: fix lint

* flux switch: add new tests

* flux switch: fix tests lint

* flux switch: fix tests docstrings
2017-09-02 18:02:11 +02:00
Christian Brædstrup 4defd96cd6 Version bump of DLink switch to v0.6.0 (#9252) 2017-09-01 15:27:43 +02:00
Pascal Vizeli 836b528bd3 WIP: Homematic improvments with new hass interfaces (#9058)
* Remove hass to init hack and use official interfaces

* fix lint

* Fix lint

* change style
2017-08-31 21:16:44 +02:00
J.J.Barrancos d2d28fd419 Moved all code into the switch component
Per request moved all the code inside the switch
2017-08-30 16:11:40 +02:00
Mister Wil 33c906c20a Abode push events and lock, cover, and switch components (#9095)
* Updated abodepy version to 0.7.1

* Refactored to use AbodeDevice. Added Abode Lock device.

* Added push updates to abode devices.

* Upgraded to 0.7.2 after finding issue with callbacks.

* Refactored to use AbodeDevice. Added Abode Lock device.

* Added push updates to abode devices.

* Upgraded to 0.7.2 after finding issue with callbacks.

* Bumped version to 0.8.2. Modified code to work with new constants and properties. Added cover and switch.

* Fixed hound violations.

* Updated to 0.8.3 to fix small bug with standby mode. Fixed comment in cover/abode.py.

* Fix lint issues

* Removed excessive logging. Moved device callback registration to async_added_to_hass. Moved abode controller from global into hass data.

* Removed explicit None from dict.get()

* Move device class into the constructor.

* Changed constant name to platforms.

* Changes as requested.

* Removing stray blank line.

* Added blank line of which I'm not sure how it was removed.

* Updated version to 0.9.0. Fixed motion sensor. Added power_switch_meter device type.

* Update abode.py

* fix lint
2017-08-29 17:34:19 +02:00
Daniel Høyer Iversen ee28b439b3 Refactor rfxtrx (#9117)
* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor

* rfxtrx refactor
2017-08-29 16:22:28 +02:00
Dale Higgs 38071501b4 Fix and optimize digitalloggers platform (#9203)
* Fix and optimize digitalloggers platform

* Fix line length

* Fix hanging indentation

* Add missing docstring

* Add period to end of docstring

* Add second blank line
2017-08-29 15:38:42 +02:00
J.J.Barrancos df1c3dfb67 Hound issue "whitespace" 2017-08-29 13:47:47 +02:00
J.J.Barrancos 689484216d Using latest module and fixed state issue
- pyrainbird 0.0.9 allows the override (if ever needed) connection retry/sleep
- Forces state towards the Entity when switching the switches. Gives better UI experience.
2017-08-29 13:45:18 +02:00
J.J.Barrancos 51c6029fe5 Fixed issue with missing key 2017-08-28 21:07:40 +02:00
J.J.Barrancos 0eee544d17 Changed component to use entity and switch
Changed component to use entity and switch.
2017-08-28 17:57:45 +02:00
Martin Hjelmare 8775c54d29 Refactor mysensors callback and add validation (#9069)
* Refactor mysensors callback and add validation

* Add mysensors entity class. The mysensors entity class inherits from
  a more general mysensors device class.
* Extract mysensors name function.
* Add setup_mysensors_platform for mysensors platforms.
* Add mysensors const schemas.
* Update mysensors callback and add child validation.
* Remove gateway wrapper class.
* Add better logging for mysensors callback.
* Add discover_persistent_devices function.
* Remove discovery in mysensors component setup.
* Clean up gateway storage in hass.data.
* Update all mysensors platforms.
  * Add repr for MySensorsNotificationDevice.
  * Fix bug in mysensors climate target temperatures.
  * Clean up platforms. Child validation simplifies assumptions in
    platforms.
  * Remove not needed try except statements. All messages are validated
    already in pymysensors.
* Clean up logging.
* Add timer debug logging if callback is slow.
* Upgrade pymysensors to 0.11.0.

* Make dispatch callback async

* Pass tuple device_args and optional add_devices

* Also return new_devices as list instead of dictionary.
2017-08-25 08:58:05 -07:00
Jan Losinski fd6fd765b2 Pilight switch: restore last state after restart (#8580)
* Pilight switch: restore last state after restart

This uses the restore_state helper to set the last known state to
pilight switches when the devices are initialized after a HA
restart.

Without this HA forget the state on every restart and needs to be told
the sttae by retoggling the switches. This can cause unwanted effects
as a switch toggling may emit an RF signal.

* Make hound happy

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Remove entity_id generation as requested in review.

* Make hound happy again.

* fix comments

* fix lint
2017-08-22 16:40:14 +02:00
timstanley1985 3342db33e4 MQTT Switch - Add configurable availability payload (#8934)
* Add configurable availabilty payload

* Fix

* Fix

* Lint fixes

* Fix tests

* Fix tests

* Move from const.py to mqtt switch

* New test

* Fix flake*
2017-08-15 23:04:57 -07:00
Aaron Bach eb42d59210 Adds port/SSL config options for RainMachine (#8986)
* Adding port/SSL config updates

* New requirements generated

* Made `port` and `ssl` parameters optional

* Add defaults for new parameters

* Re-adding guard clause

* pass > continue
2017-08-15 20:03:40 +02:00
Adam Mills 19d1d748d4 Add support for Automatic OAuth2 authentication (#8962)
* Add support for Automatic OAuth2 authentication

* Fix async conversion of configurator

* Rename method for async

* Use hass.components to get configurator component

* Fix typo

* Move session data to hidden directory

* Make configurator callback optional
2017-08-13 22:37:50 -07:00
Sebastian Muszynski 73d6227021 Remove spaces from Xiami switch attributes (#8952)
* Attributes of the xiaomi zigbee plug changed.

* Reformat.
2017-08-13 09:54:43 +02:00
Martin Hjelmare 49733b7fdf Remove not needed call to update (#8930)
* This will ensure no I/O in entity properties.
2017-08-11 19:55:57 -07:00
William Scanlon d427063acd Update python-wink version to fix Dome water valve bug. (#8923) 2017-08-11 08:35:45 +02:00
karlkar b035577cf5 Fix for Neato D3 Connected state obtaining (#8817) 2017-08-09 23:22:08 +02:00
Fabian Affolter be94f6e939 Do not call update() in constructor (#8892) 2017-08-08 22:36:59 +02:00
Fabian Affolter f513f6271e Do not call update() in constructor (#8878)
* Do not call update() in constructor

* Fix lint issues
2017-08-08 20:21:33 +02:00
Aaron Bach 289c88ff71 Add RainMachine switch platform (#8827)
* Add RainMachine switch platform

* Updated requirements_all.txt

* Cleaning up CI and coverage results

* Small update to deal with older pylint

* Fixed small indentation-based error

* Added some more defensive try/except logic around calls

* I'm not a fan of importing a library multiple times :)

* Making PR-requested changes

* Fixed ref to positional parameter

* Attempting to fix broken linting

* Ignoring no-value-for-parameter pylint error
2017-08-08 09:49:25 +02:00
Eugenio Panadero 96f8c37dcd Xiaomi vacuum as platform of new `vacuum` component derived from ToggleEntity, and services (#8623)
* Xiaomi vacuum as component with switch, sensors and services

- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)

* path change in requirements_all (from switch platform to component)

* copy pasting is a bad habit

* services to the components services.yaml, modify .coveragerc

* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services

* `icon_for_battery_level` util method

* Xiaomi vacuum as platform of new component vacuum

- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.

* fix coveragerc

* fix battery icon helper to use more icons

* remove sensors, create properties and support flags for custom UI

* cleaning

* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`

* fix platform rename

* change fanspeed and expose `fanspeed_list` to use speed steps

* minor fixes

- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes

* rename state attrs

* rename state attrs

* review changes: cut fan__speed, style changes, remove logging, and more

* add ATTR_COMMAND = 'command' to const

* pop entity_id from service data

* remove property accessor for vacuum object

* lint fix

* fix extra attrs names

* module level functions for calling the services

* params as optional keyword for `send_command`

* params as optional keyword for `send_command`, remove debug logs

* explicit parameters for `set_fan_speed` and `send_command`

* Demo platform for the vacuum component

* vacuum tests for the Demo platform

* some fixes

* don't omit vacuum

* vacuum tests for the Xiaomi platform

* fix test

* fix

* fix xiaomi test

* fix coveragerc

* test send command

* fix coveragerc

* fix string formatting

* The coverage is to low. It need 93% or more
2017-08-04 15:27:10 +02:00
Matthew Treinish 57dfe378a1 Add mochad light component (#8476)
* Add mochad light component

This commit adds a new component to control x10 dimmers/lights with
mochad.

* Create comm_type and address constants

The comm_type and address conf constants are shared between all mochad
devices because they are required information used for configuring a
device. This commit moves the definition into const.py so they're
consistent between all component types.
2017-08-03 10:51:01 +02:00
Abílio Costa ccf0559059 mqtt switch: add voluptuous for availability topic (#8797) 2017-08-03 07:18:18 +02:00
Abílio Costa 9d5c61b2f0 MQTT Switch: add availability_topic for online/offline status (#8593)
* mqtt switch: add availability_topic for online/offline status

* fix method doc strings

* MQTT Switch: add test
2017-07-27 08:24:15 +02:00
Thomas Delaet fff269e790 Velbus (#8076)
* add Velbus changes

* update library version

* fix python-velbus version

* bug fix and update python-velbus

* change config handling

* update velbus components/platforms

* add support for Velbus switches

* fix bugs

* typo

* add velbus fan

* update velbus library

* bug fix in logic of fan handling of speed settings

* add Velbus changes

change config handling

update velbus components/platforms

add support for Velbus switches

add velbus fan

* remove duplicate entry

* fix documentation links

* fix linting error

* regen requirements_all.txt

* add support for Velbus cover

* bugfix in cover component

* bugfix in cover component

* remove unused imports

* Travis fixes

* fix style

* fix style

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update requirements_all.txt

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* fix style

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py
2017-07-26 14:03:29 +02:00
Jeff Wilson f3d9086ff4 Properly slugify switch.flux update service name (#8545) 2017-07-23 23:53:03 -07:00
Thomas Klingbeil 9043895407 make attributes in the fritzdect module easier to process (#8436)
* make attributes in the fritzdect module easier to process
* remove spaces in attribute names
* move units to separate attributes

* make attributes in the fritzdect module easier to process
* remove spaces in attribute names
* move units to separate attributes

* Use new python formating syntax and attribute constant

* Shorten too long line

* Fix indent
2017-07-22 20:34:58 +02:00
Teemu R b4f392b181 bump python-mirobo version for more robust protocol handling, make the platform to update on startup (#8602) 2017-07-22 19:36:14 +02:00
Sebastian Muszynski fada6d3f49 Device support for different new sensors of the xiaomi aqara gateway (#8577)
* The gateway configuration accepts a MAC address or a SID value in uppercase already.
The ringtone services accepts the same values now. I hope it will avoid confusion.

* Device support for the new wall switches with neutral lead (ctrl_ln1, ctrl_ln2) added.

* Measurement unit from pressure of weather.v1 fixed.

* Device support for sensor_magnet.aq2 added.

* Device support for sensor_motion.aq2 (motion and lux) added.

* Code reformatted.

* The ringtone service (start/stop) uses the parameter gw_mac instead of gw_sid now.

* Version of the required library updated.
2017-07-21 10:13:42 +02:00
Daniel Høyer Iversen 90639d33ab Xiaomi gw support (#8555)
* xiaomi support

* xiaomi support

* style

* style

* style

* style

* style

* coveragerc

* Update xiaomi.py

* Update xiaomi.py

* Update xiaomi.py

* refactorization

* refactorization

* config validation

* style

* package

* refactorization

* refactorization

* refactorization

* HA integration
2017-07-20 15:20:00 +02:00
William Scanlon 84ebcd8a59 Support for Wink Switch and Light groups also fix fan speed selection (#8501)
* Support for Switch and Light groups, fix fan speed

* Fixed hound violations
2017-07-20 00:27:39 +02:00
Paulus Schoutsen d0275c8075 Persistent notification import (#8507)
* Rewrite persistent notification creation

* Update components.is_on to use auto loading

* Fix two hass parameters
2017-07-16 21:39:38 +02:00
Paulus Schoutsen d29bdddaa7 Add bind_hass to components (#8502)
* Add bind_hass to components

* Add bind_hass to group
2017-07-16 10:14:46 -07:00
Dougal Matthews d8abef9210 Add RGB support to switch.flux (#8417) 2017-07-13 19:53:19 -07:00
Daniel Høyer Iversen 7aad93e90d upgrade broadlink (#8462) 2017-07-13 14:42:30 +02:00
Andrey 60dcc9a5c0 Switch pyW215 to pypi (#8445) 2017-07-11 22:44:01 +02:00
Teemu R b453834b2f bump python-mirobo requirement to support newer firmwares and more (#8431) 2017-07-10 23:18:58 +02:00
Andy Castille 614b5da170 Use upstream RachioPy, fix manual run switches (#8286)
* use upstream RachioPy, fix manual run switches

* Update requirements for PyPi version of rachiopy

* Use upstream RachioPy 0.1.2 (partial revert of 39c6484d89)

* Revert rachiopy downgrade
2017-07-08 11:34:34 +02:00
Sabesto c48c2b00a8 Modbus fixes to work with pymodbus 1.3.1 (#8365)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py

* Fix checking result from a modbus transaction

* Add missing decorator

* Added modbus write coil service and added descriptions

* Removed a hiding debug print
2017-07-06 22:30:23 -07:00
Teemu R 8a7cfce67b Add component for xiaomi robot vacuum (switch.xiaomi_vacuum) (#7913)
* add component for xiaomi robot vacuum (switch.xiaomi_vacuum)

* enforce token length, update requirements_all.txt and .coveragerc

* bump version to avoid catching generic exception
2017-07-06 21:44:34 -07:00
Johan Bloemberg fe6a4b8ae5 Correct spelling of aliases, deprecate old config options. (#8348)
* correct spelling of aliases

* add deprecation

* Fix style.
2017-07-06 15:59:54 +02:00
Paulus Schoutsen 46e030662d Fix pylint 1.7.2 no-else-return issues (#8361)
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Paulus Schoutsen 5779d64e98 Fix some issues for PyLint 1.7.2 (#8356)
* Fix some issues for PyLint 1.7.2

* More fixes

* Revert position change for cover
2017-07-05 20:02:16 -07:00
Sabesto 6496c38ce6 Fix issue #8285 (#8340)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py
2017-07-04 17:01:35 +02:00
Per Sandström 31f17a91e6 verisure component names (#8251) 2017-06-30 08:53:14 +02:00
Fabian Affolter 27c92937f2 Use 'hass.data' instead of global (#8245) 2017-06-30 08:46:03 +02:00
Per Sandström 80c187f8ea WIP: Verisure app api (#7394)
update to verisure app api
2017-06-26 22:30:25 +02:00
Andrey 7b8ad1d365 Switch rachiopy to pypi (#8040)
* Switch rachiopy t pypi

* Update rachio.py

* Update requirements_all.txt
2017-06-22 13:34:00 +02:00
Myles Eftos ef63cfe8e4 Stopping the logfile spam by piping STDERR to /dev/null (#8081) 2017-06-18 11:44:41 +02:00
Pascal Vizeli 814834512a Group service / dynamic handling (#7971)
* Add Service to group

* Finish service

* Add service functions

* fix lint

* Address paulus comments

* fix lint & cleanup

* fix lint

* fix lint

* fix lint p3

* add test for check group

* add more tests

* fix lint

* Update service.yaml

* Fix order for tests

* Fix comment

* Fix test

* Fix tests

* Fix name in tests

* Fix view

* Fix default value

* Fix lint

* Fix key error

* add name

* migrate component entity

* fix tests

* fix import

* migrate device tracker

* fix lint

* fix bug

* fix logic

* fix lint

* fix tests

* fix generator

* fix group

* fix other tests.

* Not need to load group on first stage anymore.

* fix service

* add more group depency

* fix tests

* Revert "fix tests"

This reverts commit 35a922b3a8.

* Real fix

* fix test p2

* fix test p3

* fix test p4

* fix test p5

* fix test p6

* fix lint

* fix test p7

* Rename attribute

* fix group test

* fix bug

* fix flagy tests

* fix service.yaml

* fix lint
2017-06-16 00:52:28 +02:00
Fabian Affolter 843f8ce9ee Allow put as method (#8004) 2017-06-12 22:27:25 -07:00
Daniel Perna a19e7ba3f1 HomeMatic optimizations and code cleanup (#7986)
* Cleanup and optimizations

* Cleanup

* Typo -.-

* Linting
2017-06-10 10:08:36 +02:00
PhracturedBlue 2b850f417e Minor cleanup - Define 'CONF_ICON_TEMPLATE' constant centrally (#7910)
* Add 'icon_template' to switch templates (similar to sensor template)

* Add test for template switch 'icon_template'

* Define 'CONF_ICON_TEMPLATE' constant centrally

* Missed a redundant definition
2017-06-05 17:33:57 +02:00
PhracturedBlue 11dcbd4449 Add 'icon_template' to switch templates (similar to sensor template) (#7862)
* Add 'icon_template' to switch templates (similar to sensor template)

* Add test for template switch 'icon_template'
2017-06-05 11:27:48 +02:00
florincosta 87da2ff1d7 Add raspihats switch (#7665) 2017-06-04 23:56:21 -07:00
Johan Bloemberg d472d81538 Align switch group handling with light. (#7577) 2017-06-02 00:05:34 -07:00
abmantis 9480f41210 dont use default for switch name, so that the object id is used (#7845) 2017-06-01 22:58:57 -07:00
Andy Castille fc1bb58247 Rachio (Sprinklers) (#7600)
* Rachio platform started

* Rachio tests

* detect bad api token

* Documentation, Code cleanup

* Docstrings end with a period, log uses %

* Fix arguments, default run time is now 10 minutes

* Fix typo, remove todo (GH issue exists)

* Revert polymer submodule commit

* Use a RachioPy version with SSL cert validation

* Update requirements
2017-05-29 11:15:27 +02:00
Paulus Schoutsen e68bd0457c Fix more deprecation warnings (#7778)
* Remove setting up an hbmqtt broker

* Don't pass loop to web.Application in tests

* Use .query instead of deprecated .GET for aiohttp requests

* Fix closing file resource

* Do not use asyncio mark

* Notify.html5 - PyJWT: Use options to disable verify

* Yamaha: Test was still using deprecated ip

* Remove pytest-asyncio
2017-05-26 13:12:17 -07:00
Paulus Schoutsen f43db3c615 Replace executor with async_add_job (#7658)
* Remove executor

* Lint

* Lint

* Fix tests
2017-05-26 08:28:07 -07:00
William Scanlon cfbbade6d1 Additional Wink lock features (#7445)
* Additional Wink lock features
2017-05-13 14:09:00 -04:00
Bas Schipper 85e71fc785 Support for the PiFace Digital I/O module (#7494)
* Added rpi_pfio component supporting the PiFace I/O module

* Fixed some code style issues

* Removed global listener

* Update rpi_pfio.py
2017-05-09 22:36:33 -07:00
Adam Mills 40d27cde0e Refactor sun component for correctness (#7295)
* Refactor sun component for correctness

* Convert datetimes to dates for astral

* Fix tests for updated code

* Fix times now that calcs are fixed

* Move sun functions to helpers

* Fix flake on new file

* Additional tweaks from review

* Update requirements
2017-05-09 00:03:34 -07:00
Daniel Høyer Iversen 526abdd329 Add hass to rfxtrx object (#6844) 2017-05-04 23:50:53 -07:00
Fabian Affolter 203f48cadc Update docstrings (#7420) 2017-05-03 10:11:39 +02:00
Luar Roji 1a74c41056 Fixed extra R in variable name. (#7418) 2017-05-03 08:32:19 +02:00
Fabian Affolter 4d52b0ecd5 Update docstrings (#7405)
* Update docstrings

* Fix lint issues

* Update docstrings
2017-05-02 22:47:20 +02:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Andrey 570c5549a9 Clean up requirements (#7391) 2017-05-02 09:15:02 -07:00
Anders Melchiorsen 9f68fd9184 Flux switch: avoid updates when off (#7363)
* Flux switch: avoid updates when off

Calling turn_on when the switch is already on would orphan the existing
time tracker, losing our ability to cancel it when turn_off is called.

* Cleanups

The self.is_on property can now be found from self.unsub_tracker, so
get rid of the self._state attribute.

Add an entry guard to turn_on, making further conditionals unnecessary.
2017-04-30 00:05:29 -07:00
Anders Melchiorsen 64a7be66b1 Remove global limit on white light temperature (#7206)
* Remove global limit on white light temperature

Here are the supported temperatures of some popular bulbs:

 Philips Hue: 2000K-6500K (the current 500-154 mired range)
 LIFX Color 1000: 2500K-9000K
 IKEA TRÅDFRI: 2200K, 2700K, 4000K

Obviously, Home Assistant cannot enforce a global limit and work properly
with all of these bulbs. So just remove the limit and leave it up to each
platform to work it out.

This commit updates the existing users and adds a clamp to Hue (where the
limit appears to have originated). It does not attempt to update other
platforms that might need extra handling of the larger range that is now
possible.

* Add min_mireds/max_mireds state attributes to lights

* Support min_mireds/max_mireds with LIFX lights
2017-04-29 15:04:20 -07:00
Russell Cloran d79f89e168 Add support for Zigbee Home Automation (#6263)
* Add support for Zigbee Home Automation

* Fewer magic numbers

* Make optional device config work

* Remove non-zha device_tracker stuff

* Always return boolean from is_on

* Only pass through JSON serializable discovery_info

* Update to bellows 0.2.4

* Fewer magic numbers in binary sensor

* Populate const structures from a function

* Update bellows to 0.2.6

* Fewer magic numbers in light

* Take all possible clusters when overriding

* Update bellows to 0.2.7
2017-04-24 22:24:57 -07:00
Klaas Hoekema 64da8cd47d Work around bad content-type in Hook api response (#7267) 2017-04-23 23:58:17 -07:00
Greg Dowling 6a8a656fef Workround for wemo subscription bug. (#7245) 2017-04-23 23:18:43 -07:00
Fabian Affolter cfc023e128 Don't use len(SEQUENCE) as condition value (#7249)
* Don't use len(SEQUENCE) as condition value

* Update volvooncall.py
2017-04-23 20:41:09 -07:00
Paulus Schoutsen 76d2154820 Fix wemo discovery (#7183)
* Fix wemo discovery

* Fix key
2017-04-19 21:25:45 -07:00
Thibault Cohen de71fee0a0 Fix #7026 adding a new wol parameter (#7144) 2017-04-18 09:09:06 -07:00
Fabian Affolter c7a11277ac myStrom WiFi bulbs (#7161)
* Add initial support for myStrom WiFi bulbs

* Upgrade python-mystrom to 0.3.8

* Add myStrom light

* Fix lint issue
2017-04-18 09:03:56 -07:00
John Arild Berentsen 38ad5714cd Add support fo map data from Neato (#6939)
* Responsiveness

* Delay was not needed as commands does not return until done.

* Add support for cleaning maps and cleaning data

* Hound

* Docstring

* Update requirements

* Review changes

* External lib now returns the raw data.

* debug

* Sensor did not refresh

* Error handling

* Issue warning on connection error

* Update requirements

* Review changes
2017-04-13 07:41:25 -07:00
Teemu R 475ac52180 switch.tplink: bump pyhs100 version requirement (#6986) 2017-04-08 06:33:25 -07:00
Paulus Schoutsen 29f385ea76 Fix automations listening to HOMEASSISTANT_START (#6936)
* Fire EVENT_HOMEASSISTANT_START automations off right away while starting

* Actually have core state be set to 'starting' during boot

* Fix correct start implementation

* Test and deprecate event automation platform on start

* Fix doc strings

* Remove shutting down exception

* More strict when to mark an instance as finished

* Add automation platform to listen for start/shutdown

* When we stop we should wait till it's all done

* Fix testing

* Fix async bugs in tests

* Only set UVLOOP when hass starts from CLI

* This hangs normal asyncio event loop

* Clean up Z-Wave node entity test
2017-04-05 23:23:02 -07:00
Greg Dowling dcbc0b490c WIP - Fix bug in state handling in Vera Switch and Light (#6931)
* Fix bug in state handling.

* Tidy.
2017-04-04 12:02:09 +02:00
Klaas Hoekema 57a00c1fbf Allow token authentication for 'hook' switch component (#6922)
The Hook switch component currently uses username/password to get a token
from the Hook web app to use for subsequent requests. This adds an option
to specify the token directly in config.

Makes the 'password' and 'token' options mutually exclusive since
otherwise one would have to take precedence, and it seems worth
preventing people from filling their config with passwords that don't
even need to be there.
2017-04-04 10:55:43 +02:00
John Arild Berentsen a107a592de Fix for #6691 Neato Connection error handling (#6731)
* Responsiveness

* Delay was not needed as commands does not return until done.

* Offline error catch

* Remove unneeded code
2017-04-03 14:42:21 +02:00
David McNett c27a526f5b Eliminate needless async_add_job invocation of async_add_devices (#6864) 2017-04-03 00:01:53 -07:00
Paulus Schoutsen 714b516176 aiohttp 2 (#6835)
* Upgrade aiohttp2

* Fix resource caching

* Fix helpers.aiohttp_client

* Lint

* Use static path for api error_log

* Fix ClientErrors import

* Remove not needed DisconnectError

* Remove releasing responses code

* Add timeout if stream starts non responding

* More async_aiohttp_proxy_stream cleanup

* Fix references to ClientError

* Fix fingerprinting

* Fix aiohttp stream tests

* Rename aiohttp_proxy_stream

* Remove impossible darksky test

* Fix sleepiq requests escaping mocker

* Lint

* Remove deprecated parameter

* Break up aiohttp_proxy_stream in 2 methods

* Lint

* Upgrade to aiohttp 2.0.4

* Convert connector close to a callback

* Fix static fingerprinted links
2017-03-30 00:50:53 -07:00
Lewis Juggins 9de4c2b056 [switch.wemo] Fix today_energy_kwh calculation. (#6846)
* [switch.wemo] Fix today_energy_kwh calculation.

* Blank line fail

* Round to two decimal places.
2017-03-29 21:49:28 +02:00
Lewis Juggins 6dba05c79f [switch.wemo] Fix mW to kW conversion. (#6826)
* Fix mW to kW conversion.

* Line length.
2017-03-28 17:24:33 +02:00
goto100 b8c1bc9542 fix WOL in docker/jail (#6810)
* fix WOL in docker/jail

add ip_address parameter to send_magic_packet if host specific.

in docker/jail, WOL doesn't works due to subnet broadcast issues.

* Update wake_on_lan.py

lint
2017-03-27 14:02:43 +02:00
Greg Dowling c53de19246 Update Insight parameters using the subscription data. (#6782)
* Update Insight parameters using the subscription dta.

* Minor refactor.

* Tidy.
2017-03-27 12:43:43 +02:00
Fabian Affolter 22b28d85db Add switch to MQTT discovery (#6733) 2017-03-26 15:48:28 +02:00
Teemu R f5d4f853ba switch.tplink: upgrade to the newest upstream release which adds support for plugs using the newer communication protocol (#6790) 2017-03-26 10:55:17 +02:00
William Scanlon f8005153c9 Fix wink siren (#6775)
* Fix siren/switch attributes and update python-wink

* Updated requirements_all.txt
2017-03-25 15:28:16 +01:00
Mitesh Patel 61730012d8 Adds Support for Lutron Caseta devices. (#6631)
* Adds support for the Lutron Caseta family of devices

* Added external requirement

* Removes unuse import

* Adds requirement to requirements_all.txt

* Removes unuse import

* fixes requirement_all.txt. by regenerating

* Cleans up syantax

* Cleans up syantax

* Cleans up syantax

* Cleans up syantax

* Shortens long line

* adds lutron_caseta component to .coveragerc

* Merges into light, removes component

* Fixes long lines

* Fixes requirement.txt

* Removes 'ERROR' log statements. Adds missing dependency

* savig work to pick up on other machine

* Enables Lutron Caseta component with Light and Switch platforms

* Add missing file to .coveragerc

* Changes based on PR review

* fixes requirements file

* Fixes install of paramiko dependency.

* Moves callback registration to

* comment changes

* Platform have no return value

* Change style for guard

* fix logic

* fix lint
2017-03-23 01:18:14 +01:00
Greg Dowling acf75b5253 Revise power and energy units and property names. (#6212)
* Revise power and energy units and property names.

* Add change for new wemo parameter.
2017-03-19 22:02:11 +01:00
Fabian Affolter 1ab47b5d2b Check if droplet exists (#6663)
* Check if droplet exists

* Add droplet to message and remove else
2017-03-16 19:59:34 +01:00
Paulus Schoutsen e265401cd0 self.loop.create_task -> self.add_job (#6632)
* self.loop.create_task -> self.add_job

* Core to use create task
2017-03-16 06:58:54 +01:00
Paulus Schoutsen 1a7ffdca52 Add "Refactor zwave discovery to entity schema" (#6565)
* Revert "Revert "Refactor zwave discovery to entity schema (#6445)" (#6564)"

This reverts commit 58826b264a.

* Update zwave tests for enitity schema

* Fix merge error

* Switch dict_id to id(self)
2017-03-14 19:55:33 -04:00
Paulus Schoutsen 58826b264a Revert "Refactor zwave discovery to entity schema (#6445)" (#6564)
This reverts commit 56abc7f9b4.
2017-03-12 23:35:10 -07:00
Adam Mills 56abc7f9b4 Refactor zwave discovery to entity schema (#6445)
* Refactor zwave discovery to entity schema

* Address PR concerns

* Split DISCOVERY_SCHEMAS into separate file

* Only check cover reverse workaround once
2017-03-12 23:13:34 -07:00
Tyler Page 0aa8933df6 Fix wake_on_lan ping with None as host (#6532)
* Update configuration validation

With the new update, wake_on_lan requires a host key in the configuration

* cast self._host to str as requested

* Changed host key back to optional
2017-03-12 20:46:58 +01:00
Greg Dowling 10f5e9744b Append vera device id to entity id - but not name. (#6523)
* Append vera device id to entity id - but not name.

* Tidy.

* Tidy.

* Tidy after review.

* Re-order.
2017-03-11 10:06:46 -08:00
Pascal Vizeli 44da43065f Android webcam better error handling / pump library 0.4 (#6518) 2017-03-10 23:10:35 +01:00
Pascal Vizeli b5fb558c62 Bugfix rpi_rf cleanup (#6513)
Add an optional extended description…
2017-03-10 14:56:13 +01:00
Craig J. Ward 330d352d3a Insteon lib (#6505)
* use lib with caching to reduce collisions

* use 0.43

* change requirements

* update the  lib to 0.44

* update req

* fix typo

* just keep checking

* just keep checking - switch

* use 0.45 with file cache

* requirements

* Update requirements_all.txt

* Update insteon_local.py

* Update requirements_all.txt

* Update insteon_local.py

* update library

* fix lint
2017-03-10 11:14:31 +01:00
Robbie Trencheny 11c4d3892f Merge pull request #6001 from jumpkick/patch-2
Improvements for WeMo Insight switches
2017-03-09 21:14:33 -08:00
pvizeli bcd4def0ae pump version 0.3 / make a lot of improvments 2017-03-09 12:00:50 +01:00
Pascal Vizeli 185ccc4fc4 Fix some things 2017-03-09 01:00:57 +01:00
pvizeli 93118fcade Android IP Cam support 2017-03-08 17:48:55 +01:00
siebert 2c5d3387f2 Fix wake_on_lan ping for Linux. (#6480) 2017-03-07 20:57:35 -08:00
Andrey eaaa0442e2 Add a Z-wave workaround to do full refresh on update (#6403)
* Add Zwave refresh services

* services file

* Use dispatcher

* Add zwave prefix to signal

* Add a Z-wave workaround to do full refresh on update
2017-03-05 12:55:52 -08:00
Teemu R 96aae1292b switch.tplink: catch exceptions coming from pyHS100 to avoid flooding the logs when the plug is not available (#6400) 2017-03-05 08:44:34 +01:00
Pascal Vizeli 8232f1ef65 Cleanup async handling (#6388)
* Cleanups unneeded blocks

* Cleanup bootstrap

* dedicated update_ha_state

* Fix imap_email_content

* fx tests

* Fix lint & spell
2017-03-04 15:10:36 -08:00
siebert a5081ac307 Fix wake_on_lan for german version of Windows 10 (#6397) (#6398) 2017-03-04 09:58:01 -08:00
Pascal Vizeli 55dc483c91 Template switch change flow / add restore (#6356)
* Template switch change flow / add restore

* fix tests

* fix binary_sensor template
2017-03-02 14:09:53 +01:00
martinfrancois a08539d88d Added support for multiple codes executed in a row (#5908)
* Added support for multiple codes executed in a row

now codes can be specified either by simply providing a single code, which will then be sent like usual, or multiple codes can be executed in a row, specified in a comma delimited format in the configuration.yaml. For example: 111111,222222,333333,444444 would mean 111111 would be sent first, followed by 222222 and 333333 and 444444.

* rpi_rf: added line breaks to not exceed 79 characters per line

* include validation for correct formatting of codes

added regex which only allows either a single number (like 1252456245) or a sequence of commas followed by another number.

* added line breaks to not exceed 79 characters per line

* fix for 'continuation line under-indented for visual indent'

* another try at 'continuation line under-indented for visual indent'

* changed from regex to list for easier maintainability

* removed unnecessary splitting of strings
2017-03-02 00:10:49 -08:00
Pascal Vizeli 41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Andrey b27ba9660b Some zwave cleanup (#6203) 2017-02-24 16:17:27 +02:00
jumpkick fc5e25a07b Incorporate comment suggestions
- Separate attribs from coffeemaker condition
- Set power units for threshold to mW to be consistent with others
- Adjust on-time labels to be more clear
2017-02-23 18:03:49 -05:00
Andrey 1d32bced1c Create zwave devices on OZW thread and only add them during discovery (#6096)
* Create zwave devices on OZW thread and only add them during discovery.

* Read and write devices dict from loop thread.

* More async

* replace callback with coroutine

* import common function instead of callin git
2017-02-23 13:06:28 -08:00
Pascal Vizeli 106b7a9d8f Cleanup run_callback_threadsafe (#6187)
* Cleanup run_callback_threadsafe

* fix spell

* Revert image_processing, they need to wait for update
2017-02-23 12:57:25 -08:00
Erik 1c6ba989a9 Support for naming vehicle. Support for selecting what resources to display 2017-02-23 12:00:51 +01:00
jumpkick ef87d4dad4 Update device_state_attributes only
This gets rid of the other stuff and just updates device_state_attributes, leaving the default properties alone.
2017-02-23 04:54:09 -05:00